XAML files are not supported
See original GitHub issueAttached is a simple repro solution. WpfCps.zip
Issue 1: XAML files are treated as None
, when they should be treated as Page
with Generator=MSBuild:Compile
and SubType=Designer
metadata.
Issue 2: Page
items are not visible in the Solution Explorer
Issue 3: xaml.cs files are not properly nested under the xaml file
Issue 4: Compilation fails with: 1>C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(419,45): error MSB4057: The target "CoreCompile" does not exist in the project.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:8 (6 by maintainers)
Top Results From Across the Web
XAML files are not supported · Issue #1467 · dotnet/project- ...
The only issue I have is when I use globbing - the dependent .xaml.cs files are not nested. Reported there microsoft/VSProjectSystem#169.
Read more >Xaml files not working properly in my project
I found a solution to this problem.I opened VS installer and then went to VS 2022, clicked on more and opened the "Repair"...
Read more >Troubleshooting XAML Hot Reload - Visual Studio
If Hot Reload isn't available · Verify that XAML Hot Reload is enabled · Verify that you use Start Debugging rather than Attach...
Read more >Unable to open XAML files with XAML Designer in Source ...
The XAML designer does not support loose type support. You need to have the solution loaded with your XAML file specified into the...
Read more >An XAML file may not load correctly after you edit a Team ...
Describes a fix for a problem in which an XAML file may not load correctly after you edit a Team ... A supported...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
more complete version of the workarounds i use these days - import this at the end of a csproj
here are some workarounds for now
issues 1 and 2:
<Page Include="**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" />
issue 3:
<Compile Update="**\*.xaml.cs" SubType="Code" DependentUpon="%(Filename)" />
issue 4:
<LanguageTargets>$(MSBuildToolsPath)\Microsoft.CSharp.targets</LanguageTargets>