dotnet / project-system

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

WPF Designer breaks with certain projects #3634

Closed clairernovotny closed 4 years ago

clairernovotny commented 6 years ago

Not sure what combination of things is tripping it up (may be the NuGet SDK resolver, but possibly something else). To be clear, this is with the CPS project system, enhanced with the MSBuild.Sdk.Extras.

To repro: Clone: https://github.com/NuGetPackageExplorer/NuGetPackageExplorer Build. Then open, any of the Xaml files in the NuGetPackageExplorer project (this was MainWindow.xaml).

image

davkean commented 4 years ago

Triage: @davidwengier Please investigate if this still occurs and send back to triage with the cause if it does.

davidwengier commented 4 years ago

I can repro the above with MainWindow.cs, but it seems to be a problem with the XAML, or the editor, specifically this line has an issue around quotes. Changing it as per below unblocks the editor:

From:

<TextBlock Text="{Binding SelectedItem.Name, Mode=OneWay, FallbackValue='', StringFormat='Edit \'{0}\'', Converter={StaticResource StringShortenerConverter}, ConverterParameter=35}" />

to:

<TextBlock Text="{Binding SelectedItem.Name, Mode=OneWay, FallbackValue='', StringFormat='Edit &quot;{0}&quot;', Converter={StaticResource StringShortenerConverter}, ConverterParameter=35}" />

I couldn't repro with any other files, so I'm going to close this. If the above line is definitely correct XAML (sorry, I don't have enough experience with XAML to know) then I would suggest filing feedback through Visual Studio itself.