-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Update ExcelDna.Integration NuGet Package to support the new PackageReference format #188
Comments
In this context, we might investigate reference assemblies too: dotnet/roslyn#20418 |
@augustoproiete So is your suggestion that ExcelDna.Integration not adjust the Private tag, and that the ExcelDna.AddIn build task will delete the ExcelDna.Integration file? I'm still not even sure this is worth bothering with... |
Here's a bit of info on the Private tag (according to the StackOverflow where I'm copying from, "the comment in Microsoft.Common.CurrentVersion.targets:1620 where it is applied"): <!--
============================================================
ResolveAssemblyReferences
Given the list of assemblies, find the closure of all assemblies that they depend on. These are
what we need to copy to the output directory.
[IN]
@(Reference) - List of assembly references as fusion names.
@(_ResolvedProjectReferencePaths) - List of project references produced by projects that this project depends on.
The 'Private' attribute on the reference corresponds to the Copy Local flag in IDE.
The 'Private' flag can have three possible values:
- 'True' means the reference should be Copied Local
- 'False' means the reference should not be Copied Local
- [Missing] means this task will decide whether to treat this reference as CopyLocal or not.
[OUT]
@(ReferencePath) - Paths to resolved primary files.
@(ReferenceDependencyPaths) - Paths to resolved dependency files.
@(_ReferenceRelatedPaths) - Paths to .xmls and .pdbs.
@(ReferenceSatellitePaths) - Paths to satellites.
@(_ReferenceSerializationAssemblyPaths) - Paths to XML serialization assemblies created by sgen.
@(_ReferenceScatterPaths) - Paths to scatter files.
@(ReferenceCopyLocalPaths) - Paths to files that should be copied to the local directory.
============================================================
--> |
Yes on not adjusting the That also improves the experience of developers who need to reference this package when not creating an Excel Add-In. As I mentioned above, when creating Unit Test projects for Excel-DNA add-ins, developers need to reference this DLL because of The |
I agree - it would be good to remove the Install.ps1 from ExcelDna.Integration if we there is a way to do what you suggest in the ExcelDna.AddIn build step. I don't know enough about the msbuild passes to know how much we can interfere with the build process. |
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 |
I think the plan for
There is some evidence that I used to think having the correct version |
…ring the build This overrides the CopyLocal setting that the developer might have set. Relates to Excel-DNA#188
Spin-off of #138 to discuss how we want to support the
PackageReference
format in theExcelDna.Integration
NuGet package.Background
ExcelDna.AddIn
NuGet package it comes with XLL templates that includes theExcelDna.Integration
assembly embedded in itExcelDna.AddIn
NuGet package NuGet package also depends on theExcelDna.Integration
NuGet package, which brings a copy of theExcelDna.Integration
assembly and references it in the project - necessary for developing add-insExcelDna.Integration
relies on a PowerShell script that sets the reference toExcelDna.Integration
to beCopyLocal=false
to make sure this assembly doesn't get copied to the$(TargetDir)
because we want to use the version that's embedded in the XLL template that comes withExcelDna.AddIn
- and historically it caused problems to haveExcelDna.Integration.dll
in the same folder - this may be something to revisit in a different issue in the future, but for the purposes of this issue let's keep the same behavior we have today which is make sure we don't have a copy ofExcelDna.Integration.dll
in the output folder of an Excel Add-InKnown issues
PackageReference
format does not support theinstall.ps1
PowerShell script that runs during installation of the packageExcelDna.Integration
assembly in other projects, such as Unit Test projects, and in those cases they actually need a copy ofExcelDna.Integration.dll
in the output folder of their unit test projectProposed solution
I believe the
CopyLocal=false
behavior should be a concern of theExcelDna.AddIn
package instead, and not a concern ofExcelDna.Integration
.As part of adding support for
PackageReference
format, we should remove theinstall.ps1
from theExcelDna.Integration
and projects that add this NuGet package to their projects will get a regular reference toExcelDna.Integration
as expected (which fixes the issue for unit test projects, etc.).We'll let the
ExcelDna.AddIn
NuGet package handle enforce theCopyLocal=false
behavior itself.Thoughts?
/cc @govert @screig
The text was updated successfully, but these errors were encountered: