-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Microsoft.DiaSymReader.Native.x86.dll ends up in nuget package #15137
Comments
@ericstj I believe the condition is there to detect older versions of nuget that use packages.config. Perhaps we should check for presence of packages.config? |
Checking for We could potentially improve this by setting a property in the targets/props files auto generated for project.json/packagereference to declare the mode NuGet brought the package in under. NuGet/Home#3928 For NETCore apps the problem is just that this target is used at all since the dlls come from runtimes, right? Fixing this targets file to work PackageReference would solve that. I've opened NuGet/Home#3927 to track excluding content items coming from packages, the pack3 behavior you are seeing seems wrong. |
I have changed the .props file like so:
Changed the condition and added |
|
OK, I'll add that. Thanks for pointing it out. Is it now correct? |
@natemcmaster Could you confirm that the above snippet is correct and complete now? Thanks. |
@tmat LGTM |
@tmat good to close now? |
Yup. |
@tmat This can be prevented by adding |
@natemcmaster commented on Fri Oct 21 2016
Microsoft.DiaSymReader.Native 1.4.0 includes a .props file as included below. This includes a condition
!Exists('project.json') AND !Exists('$(MSBuildProjectName).project.json')
. The deprecation of project.json means that when users upgrade from a project.json build system to a MSBuild system (and thus deletes project.json), this .props file will include Microsoft.DiaSymReader.Native.{arch}.dll as 'content' in all projects using the .NET Core SDK.Example:
dotnet build3 on a netcoreapp will copy the file to the output directory
The extra file in the output directory may be harmless for "dotnet run", but it's still wrong for .NET Core projects which resolve native assets from the nuget cache.
The worse problem is "dotnet pack3", which includes all 'content' items. This means Microsoft.DiaSymReader.Native.x86.dll and Microsoft.DiaSymReader.Native.amd64.dll will end up in the nuget package of anyone performing "dotnet pack3" on a csproj that uses Microsoft.NETCore.App.
The offending props file, from .nuget\packages\microsoft.diasymreader.native\1.4.0\build\microsoft.diasymreader.native.props
cc @emgarten @piotrpMSFT
@ericstj commented on Thu Nov 10 2016
This isn't a CoreFx package, please open in https://github.com/dotnet/roslyn/issues
@joperezr commented on Thu Nov 10 2016
thanks @ericstj I'll move this issue over to roslyn repo.
The text was updated successfully, but these errors were encountered: