-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix Publish failing when an app targets netcoreapp1.1 and a P2P to a project that targets netcoreapp1.1 #581
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
Conversation
…project that references NETCore.App 1.1.0. The issue is that NETCore.App 1.1.0 now references DiaSymReader.Native nuget package and DiaSymReader.Native includes a "Content" item for the native assemblies. So the app gets duplicate "Content" items, one from the app project and one from the P2P project. When you have 2 duplicate Content items publish fails with: "error MSB3094: "DestinationFiles" refers to 1 item(s), and "SourceFiles" refers to 2 item(s). They must have the same number of items."
/cc @srivatsn @nguerrera @dsplaisted This bug is blocking the CLI from moving from netcoreapp1.0 to netcoreapp1.1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Could you add a test?
Doh! Looks like I've been out of the game for a while... |
@nguerrera - added a test |
👍 |
Just ran into this. Glad it's fixed now. FYI for anyone else stuck on this error and trying to use RC.2 bits can workaround this by adding this: <PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.4.0" ExcludeAssets="Build" /> |
Hello, Get stuck over here. The two files whic I have modified to resolve the issue are attached. My project is "ASP .Net Core Web Application (.Net Framework)" and referring Windows Class Library .Net Framework 4.6.2
The Error I get is
As suggested, Microsoft.NET.Publish.targets has the following entry
Please tell me if I am missing anything. |
Somehow, rebooting a machine has worked. I am good with the fix |
In my case I still have problems publishing the web app, with the "DestinationFiles" refers to 1 item(s), and "SourceFiles" refers to 2 item(s). They must have the same number of items." error. I tried the changes suggested by @nguerrera but it's still failing. Is there a way to get a build with the latest changes? |
…0190413.1 (dotnet#581) - Microsoft.AspNetCore.Mvc.Analyzers - 3.0.0-preview5-19213-01 - Microsoft.AspNetCore.Mvc.Api.Analyzers - 3.0.0-preview5-19213-01
The issue is that NETCore.App 1.1.0 now references DiaSymReader.Native nuget package and DiaSymReader.Native includes a "Content" item for the native assemblies. So the app gets duplicate "Content" items, one from the app project and one from the P2P project. When you have 2 duplicate Content items publish fails with:
"error MSB3094: "DestinationFiles" refers to 1 item(s), and "SourceFiles" refers to 2 item(s). They must have the same number of items."
Attached is a project that repros the issue with
dotnet restore
anddotnet publish
the App project.DiaSymTest.zip