-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExcelDna.AddIn NuGet package installation fails as a PackageReference #138
Comments
PR #147 was a step towards us not needing to run a Powershell script when installing the NuGet package, which in turn is a step towards the story of us supporting I'd like to start discussing next steps. At the moment, we do 3 different things in the
Thoughts? |
My first thought are:
My suggestion is:
I'd rather make it a bit more tricky (but still possible) to do the PackageReference, rather then confusing or making it harder for 'normal' users. Just my first thoughts... |
Those three points are all valid. My personal biggest concern, and it may will be misplaced, was around the post build pack task, with the new structure that comes with csproj settings. The current post build event is currently of the form:
How will this work with a shared packages folder that is not under the solution folder? The dna file I could manage myself, but I have no idea how to dynamically references the shared packages folder. |
We've discussed in the past moving the packing into the build task. That might be a reasonable change that helps with this too. |
Agreed. Moving packing to the build task is the way to go. /cc @screig As for your other comments, @govert:
I'm not sure they'll go back to allowing us to use
Doesn't seem like an issue these days with VS2017, but it does seem to me that
NuGet by default would only remove the .dna file from the project, if the file is identical to the one that came with the package (i.e. user didn't change anything), and when reinstalling, NuGet doesn't replace the file unless the user tells it to, thus we can make it safe to uninstall and reinstall, without the current features in The main difference is that that the .dna file no longer would have the name of the project - it would be a static file name that we define.
We can have a .dna file added to the project when supporting PackageReference.
Perhaps something for a separate discussion, but we could get rid of this step too if we wanted, and not have
This is no longer on the Powershell, so if we update the current nuget package to add the |
@screig Note that the ExcelDna.AddIn v0.34 NuGet package already deals with the packing in the custom build task, and no longer adds or requires any post-build steps. It might be nice to incorporate the packing code into the add-in tasks assembly, but that would make no difference to the current issue. @augustoproiete I am not willing to complicate or change the current-style NuGet experience for the sake of the so-far rarely used and problematic PackageReference style. We've just formalised how to deal with .dna file targeting 32-bit and 64-bit etc. in the great work you did for v 0.34. I would like this to be stable for a few years - and perhaps even document it a bit better than here: https://github.com/Excel-DNA/ExcelDna/wiki/Build-Output-Customization. Future VS versions might change how we think about PackageReference, but it is many years premature to worry much about that now. In its current state it's a mess (not just for Excel-DNA) and seems to me irrelevant to normal desktop development. |
@govert I stayed on 33.9 because I had constructed a custom post build event and I have seen an upgrade wipe it out. I will try v34, Thanks! Edit, just FYI, switching over to 34.6 means I don't need a post build event, however the ribbon no longer loads. |
well I would up-vote for the new style, not because of the new package reference style per say. All my other projects that I have my ExcelDna project referencing, are now net standard. Calling Net Standard from Net Framework should be seamless but it is not. It would be cleaner if this were net-standard too. |
Re PackageReference not having support for install.ps1, it seems Microsoft might be working on something to resolve that: NuGet/Home#5963 |
@augustoproiete That NuGet issue is from September last year. What signs of movement do you see? |
@augustoproiete For us an easier start might be to try to move ExcelDna.Integration so it works with PackageReference. It just uses the install.ps1 to set Copy Local = false. |
/cc @govert |
Good idea! |
@augustoproiete OK, they've set some tags. There is no suggestion on the table yet of what to do. The ExcelDna.Integration case is funny in this context - we really need something called a "Reference assembly" that doesn't have any code. Internally they have tools that make these, but it has taken several years of promises, issues and "tag" settings and I think it has still not shipped in Roslyn. I'm happy to consider a configuration for our packages that works with PackageReference, but I'm not sure why we're letting the NuGet guys stuff us around. But I suspect if we wait a year or two they'll figure out that the need significantly more flexibility in what the package can do if they want to drop the general install.ps1 PowerShell support. |
Is there a current workaround for PackageReference issue ? meaning is it possible to run the install.ps1 manually |
I think you one can manually set up the .dna file, which is the main work the install.ps1 does. It would be useful as a start to make some instructions for setting things up manually, if you have some time to figure it out. |
FWIW, there was a recentish response to this issue: NuGet/Home#6330 |
Sadly that didn't work but i will try out creating a brand new project and see how it works and perform the operation together. |
FYI @govert pointed me to this discussion in the Visual Studio Developer Community which is about the need for restarting Visual Studio after making changes to |
Closing this in favour of #188 for tracking the PackageReference support. |
This is due to install.ps1 not being supported for PackageReference. See https://groups.google.com/forum/#!topic/exceldna/GOqEBI6aiUI
The text was updated successfully, but these errors were encountered: