-
Notifications
You must be signed in to change notification settings - Fork 250
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
"Error occurred while restoring NuGet Package" and InvalidOperationException in Output window when the assembly name is different for different TFMs #8456
Comments
Each PackageReference based NuGet powered project has what we call a PackageId, which defaults to AssemblyName. Having a different PackageId is not a supported scenario. Can you try setting PackageId to something that's same for both frameworks? Few quick things:
|
@nkolev92 I added This seems to work for me even when I conditionally change the |
Yeah, that makes sense. I will rename a bit and leave this issue open to track the improvements for the error message shown. |
Actually, looking at it again, the root cause is: #7717, but I'll still leave it open as this is particular to the error message actually shown. |
I get the following message on the Package Manager Output window when I open my project in Visual Studio 2019 (16.2.2):
The same message precedes the 1>------ Rebuild All started: Project: Foo, Configuration: Release Any CPU ------ line on the Build Output window when I rebuild my project.
I see the following in my Tests Output window:
Here is my .csproj file:
This seems to be related to the conditional PropertyGroup where the AssemblyName is different than the project name. When I remove the following lines from my .csproj file the errors go away:
The text was updated successfully, but these errors were encountered: