dotnet / project-system

The .NET Project System for Visual Studio
MIT License
969 stars 387 forks source link

The Properties window display incorrectly after adding Microsoft.Web.WebView2 package to .Net Core WinForms project and select the project name #8335

Closed Ashley-Li closed 2 years ago

Ashley-Li commented 2 years ago

Visual Studio Version: The latest main VS build

Steps to Reproduce:

  1. Create a WinForms Core project.
  2. Select the project and from Manage NuGet Packages... to install the 'Microsoft.Web.WebView2' package.
  3. Select the project name and observe the Properties window.

Or

  1. Extract "testApp.zip" and open it in VS.
  2. Select the project name and observe the Properties window.

Current Behavior The Properties window displays incorrectly and there's a SynthesizedEmpty error. image actual

Expected Behavior The Properties window displays correctly. image

Have you experienced this same issue with .NET Framework designer? No

Have you experienced this same issue with previous previews of VisualStudio? This is a regression issue, it cannot reproduce on VS 16.11.16 with the project targets .NET 5.0 and .NET Core 3.1, but it can reproduce in VS 17.2.6 and the latest Main VS.

More Info

  1. The initial feedback ticket: https://devdiv.visualstudio.com/DevDiv/_queries/edit/1578160
  2. In VS2022, the project targets .NET 5.0 or .NET 6.0, this issue also reproduce.
  3. The issue cannot repro in .NET Framework 4.8.
adamint commented 2 years ago

This doesn't repro on another package (newtonsoft) but confirming it repros on webview2.

Closing this github issue, however, as this seems to be coming from CPS (SynthesizedEmpty string is hardcoded into CPS tools). We should proceed with the feedback ticket for now, and see the results of CPS' investigation