You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure of the proper repository for this issue. If this repository is not appropriate, please move this to another repository.
Describe the bug
dotnet cli and Visual Studio restore SDK-style netfx 2.0 projects differently. The packages.lock.json that dotnet cli restores includes Microsoft.NETFramework.ReferenceAssemblies and Microsoft.NETFramework.ReferenceAssemblies.net20. But Visual Studio doesn't. This causes an error in locked mode restore.
We talked about this internally, and our eventual conclusion is that this is currently by-design.
The way this probably works is that the SDK is adding a reference to microsoft.NETFramework.ReferenceAssemblies. Probably .NET 2.0 is compiled against the implementation in program files, and the SDK doesn't know how to look that up, so it uses the reference assembly pack. We need that package in order to be able to target .NET 2.0. VS does succeeds in finding them, so it doesn't need that.
If you want restore to work the same way in VS and from the SDK, you can add an explicit reference to Microsoft.NETFramework.ReferenceAssemblies, and then it will be there in both cases.
That said, we might be able to build that behavior into the SDK to unify the two. I think this is an appropriate repo for that work.
I'm not sure of the proper repository for this issue. If this repository is not appropriate, please move this to another repository.
Describe the bug
dotnet cli and Visual Studio restore SDK-style netfx 2.0 projects differently. The packages.lock.json that dotnet cli restores includes Microsoft.NETFramework.ReferenceAssemblies and Microsoft.NETFramework.ReferenceAssemblies.net20. But Visual Studio doesn't. This causes an error in locked mode restore.
To Reproduce
Try restoring this project in visual studio and dotnet cli respectively.
Exceptions (if any)
Further technical details
.NET SDK 8.0.204, Visual Studio 17.9.6
The text was updated successfully, but these errors were encountered: