question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WPF projects don't compile

See original GitHub issue

Steps to reproduce:

mkdir WpfFormat
cd WpfFormat
dotnet new wpf
dotnet format --verify-no-changes

The resulting error is:

MainWindow.xaml.cs(25,13): error CS0103: The name 'InitializeComponent' does not exist in the current context [WpfFormat.csproj]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jmarolfcommented, Oct 18, 2021

We will need to talk to the WPF team about what the exact build targets are that they use in their “double build”. If I remember correctly, they generate additional project files that will need to be picked up by the MSBuild workspace.

1reaction
DavidZidarcommented, Oct 14, 2021

This should really be fixed before .NET 6 RTM.

Read more comments on GitHub >

github_iconTop Results From Across the Web

New WPF Project Won't Compile -- Throws Error "The ...
I'm getting started with WPF, but when I create a new WPF project (usuing all default options) it won't compile after VS generates...
Read more >
VS 2019 fails to build WPF projects
I write a unit test for Project B and attempt to run it. Visual Studio compiles the projects again to run the unit...
Read more >
WPF: Project doesn't find its own Classes ("tag not found in ...
I just don't get it, as I said, all the files are in the same project, and they are - as of now...
Read more >
Sharing code between Silverlight and WPF using Build ...
Right-click the project node in Visual Studio's Solution Explorer pane and select “Unload Project” (or select “Unload Project” from the Project menu). The ......
Read more >
WPF: XAML Designer won't recognize types, but compiling ...
I have a little problem with using a non-standard user control in my existing WPF project, not critical, but very annoying.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found