Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
XAML files are not supported #810
Attached is a simple repro solution.
Issue 1: XAML files are treated as
Yes. I can manually override things (as I did in the sample) so that the UI designer in VS and everything else works.
I would think that, of the four issues I listed, two of them are applicable to the SDK repository (as they impact command line builds) and two to the Project System repository (they really only impact the IDE).
here are some workarounds for now
issues 1 and 2:
referenced this issue
Sep 9, 2017
more complete version of the workarounds i use these days - import this at the end of a csproj
<Project> <!-- https://github.com/dotnet/sdk/issues/810 - the temporary project has the wrong file extension --> <PropertyGroup> <LanguageTargets>$(MSBuildToolsPath)\Microsoft.CSharp.targets</LanguageTargets> <StartWorkingDirectory Condition="'$(OutputType)' == 'WinExe'">bin/$(Configuration)/$(TargetFramework)</StartWorkingDirectory> </PropertyGroup> <!-- Page items aren't included by the SDK --> <ItemGroup> <Page Include="**\*.xaml" Exclude="@(ApplicationDefinition)" SubType="Designer" Generator="MSBuild:Compile" /> <Compile Update="**\*.xaml.cs" SubType="Code" DependentUpon="%(Filename)" /> <UpToDateCheckInput Include="**\*.xaml" /> </ItemGroup> <!-- https://github.com/dotnet/project-system/issues/2488 - .g.cs files don't get built --> <Target Name="WorkaroundForXAMLIntellisenseBuildIssue" AfterTargets="_CheckCompileDesignTimePrerequisite"> <PropertyGroup> <BuildingProject>false</BuildingProject> </PropertyGroup> </Target> </Project>