-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WPF: Adding xmlns with clr-namespace to XAML breaks build with cryptic error message #32
Comments
I haven't fully documented this yet as there are some nasty workarounds needed that will be going away soon-ish, I hope. For now, NuGet Package Explorer is a good example to look at: Note the workarounds at the top and bottom of the file: |
@onovotny Also, out-of-the-box the NuGetPackageExplorer doesn't compile for me. Got a copy of the source code as zip, unpacked, and first was confronted with VS migration dialog + afterwards it didn't compile properly. Thanks! |
@onovotny https://github.com/onovotny/MSBuildSdkExtras/blob/master/Samples/WpfApplication/WpfApplication.csproj#L7 |
I'm using VS 2017 15.5 for NuGet Package Explorer. |
I was having the exactly same issue and replacing that line did the trick for me as well. |
Dear Oren
Today I tried converting a bare WPF Project, i.E. one that was created by VS 15.5.7 New -> Project -> WPF App (.Net Framework) to the new csproj sdk format. I got stuck with:
Removing the following line from MainWindow.xaml fixes the build:
ATM I'm quite perplexed how this can have any effect on the build outcome, but I'd guess it's about the WPF two-pass build...?!
Notably, (not) having the same line @ App.xaml doesn't matter.
Sample Project
Using your sample project I can reproduce the same issue.
The steps I performed:
1 ./Samples/WpfApplication/MainWindow.xaml
insert the following as Line 8:
2 ./Samples/WpfApplication/WpfApplication.csproj
I've had to change the target framework to net471 - because I don't have net462 installed.
3 Open Csproj & Build
.. and you'll see
I'd be happy providing a PR for the readme/wiki page to document this, at the least. Any directions for a header, where to place it the document?
The text was updated successfully, but these errors were encountered: