Skip to content

Commit

Permalink
Fixes build error when building a project containing XAML files
Browse files Browse the repository at this point in the history
The XAML targets generate a temporary project file that is used
to generate the types used in the XAML, as part of the MarkupCompilePass1
pass. If the generated code files aren't passed in to the
GenerateTemporaryTargetAssembly via the @(_GeneratedCodeFiles)
item group that is collected by MarkupCompilePass1, the build fails
if any part of the code references the generated types.

The build error will also be super cryptic since the project failing
to build will be a temporary .csproj rather than the actual containing
project, where intellisense will show that nothing is wrong
whatesoever.
  • Loading branch information
kzu committed Sep 27, 2016
1 parent d492b3d commit 3ff0168
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/GitInfo/build/GitInfo.targets
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@

<ItemGroup>
<Compile Include="$(GitInfoThisAssemblyFile)" />
</ItemGroup>
<_GeneratedCodeFiles Include="$(GitInfoThisAssemblyFile)" />
</ItemGroup>

</Target>

Expand Down

0 comments on commit 3ff0168

Please sign in to comment.