dotnet / project-system

The .NET Project System for Visual Studio
MIT License
971 stars 389 forks source link

An error pops up when adding reference to Winforms .net core application #4487

Open OliaG opened 5 years ago

OliaG commented 5 years ago

From @Marie-Shi on January 17, 2019 9:26

OS: RS4 x64 VS: 16.0.0 Preview 3.0 [28516.179.d16.0stg] .NET SDK: .NET Core 3.0.100-preview-010110

More info: This issue cannot repro on Console and Class library .net core applications.

Steps to Reproduce:

  1. Install .NET Core 3.0 SDK available from https://github.com/dotnet/core-sdk.
  2. Create a Winforms .Net Core application by command: dotnet new winforms –o “xxx”.
  3. Open the project and right click ‘Dependencies’ to choose ‘Add Reference’.
  4. Click ‘Browser’ button to choose *.dll(e.g.: System.Windows.Forms.dll) from C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.0.0-preview-27315-14, then click ‘OK’ button.

Actual: An error pops up. Please see the below screenshot: image Exception log: Add_Reference_CallStack.txt

Expected: System.Windows.Forms.dll can be added successfully.

Copied from original issue: dotnet/winforms#330

OliaG commented 5 years ago

If this is reproducible only for Microsoft.WindowsDesktop.App, the expected result is to tell the user that this dll is already in the project. It should though allow to add other dependencies without an error.

Pilchie commented 5 years ago

Tagging @jjmew.