dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI

Home Page:https://dot.net/core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SDK 6.0.301 -> 6.0.302 upgrade breaks our build

AArnott opened this issue · comments

Describe the bug

The VS-Platform repo build broke when the .NET SDK version installed on local dev boxes went from 6.0.301 to 6.0.302 (which released yesterday). Some kind of breaking change was made in this version of the SDK.

To Reproduce

On a machine with 6.0.301 or 6.0.302 installed

git clone https://devdiv@dev.azure.com/devdiv/DevDiv/_git/_optimized/VS-Platform
cd VS-Platform
git checkout 359c6d2f1db9b1adc15b11262aaf74ac625af938
.\init -Feature Editor
msbuild /t:rebuild src\Editor\VisualStudio\Impl\EditorImpl.csproj /r

If 6.0.302 is present, you'll see a bunch of build errors around the CsWin32 source generator we use, such as:

C:\Users\andarno\source\repos\VS-Platform\src\Editor\VisualStudio\Impl\Microsoft.Windows.CsWin32\Microsoft.Windows.CsWin32.SourceGenerator\Windows.Win32.PInvoke.User32.g.cs(331,52): error CS0111: Type 'PInvoke' already defines a member called 'SetWindowPos' with the same parameter types [C:\Users\andarno\source\repos\VS-Platform\src\Editor\VisualStudio\Impl\EditorImpl_jqjdp0fp_wpftmp.csproj]

But with 6.0.300 or 6.0.301, the build succeeds.

Further technical details

VS 17.4 Preview 1 (32711.401.main) is installed and where the msbuild.exe used in the repro steps comes from.

This is a dupe of #26542 which is caused by dotnet/wpf#6792 a workarounds are pinning the SDK or dotnet/wpf#6680 (comment)

This is the issue tracking the fix. dotnet/wpf#6792

@chsienki is it a dupe? I'm not using wpf or CommunityToolkit.MVVC but still go problems when upgrading to VS 17.2.6 yesterday. I made a dev community issue

To summerize that:

  • After the update the build broke
  • After a full reinstall of 17.2.6 the build worked again, but intellisense was broken for test and utility projects (cannot find analyzers)
  • after manually opening all the problematic projects, the analyzer paths were (automatically) fixed and I could work again

This cost me the better half of my working day yesterday, which was very inconvenient.

Note, I am developing w WinUI3 app, so maybe CommunityToolkit.WinUI.UI.Controls gave similar issue?

@JochemPalmsens yeah the root issue is the same.
I was able to fix it using these instructions: dotnet/wpf#6792 (comment)

This did not get fixed in 6.0.303 or 6.0.400. Sorely disappointing given how broken source generators are by this regression and we waited a month for the fix and it didn't come. What's going on?

I confirm I also experience this issue with 6.0.303, and I have just tried 6.0.400 which does not fix it on my side either.
In our company we are stuck in 6.0.301

This is expected to be fixed this month (second Tuesday) in 6.0.304 and 6.0.401.

I just tried 6.0.401 today and it does appear to in fact fix the problem!