Skip to content

Commit

Permalink
Fixing build issues due to adding WinUI projection (#132)
Browse files Browse the repository at this point in the history
* add targetplatformversion to build

* more fixes

* fix timing of projection generation
  • Loading branch information
stevenbrix authored Apr 13, 2020
1 parent 047d02a commit c37a2aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
11 changes: 0 additions & 11 deletions WinUI/WinUIProjection/Directory.Build.targets

This file was deleted.

6 changes: 5 additions & 1 deletion WinUI/WinUIProjection/WinUIProjection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework>
<Platforms>x64;x86</Platforms>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -11,6 +12,8 @@

<ItemGroup>
<ProjectReference Include="..\..\WinRT.Runtime\WinRT.Runtime.csproj" />
<ProjectReference Include="..\..\cswinrt\cswinrt.vcxproj" />

<!-- Exclude compile and build time assets so we don't think we're building a real WinUI App -->
<PackageReference Include="Microsoft.WinUI" Version="$(MicrosoftWinUIVersion)" GeneratePathProperty="true">
<ExcludeAssets>compile; build</ExcludeAssets>
Expand All @@ -20,7 +23,7 @@
<InternalsVisibleTo Include="WinUITest"/>
</ItemGroup>

<Target Name="GenerateWinUIProjection" BeforeTargets="DispatchToInnerBuilds;Build" Condition="'$(GenerateTestProjection)'=='true'">
<Target Name="GenerateWinUIProjection" BeforeTargets="CoreCompile">
<ItemGroup>
<!--PkgMicrosoft_UI_Xaml is defined by Nuget reference-->
<WinUIWinMDs Include="$(PkgMicrosoft_WinUI)/**/*.winmd" />
Expand All @@ -41,6 +44,7 @@
-exclude Windows.ApplicationModel.Store.Preview
</CsWinRTParams>
</PropertyGroup>
<MakeDir Directories="$(ProjectDir)Generated Files"/>
<WriteLinesToFile File="$(CsWinRTResponseFile)" Lines="$(CsWinRTParams)" Overwrite="true" WriteOnlyWhenDifferent="true" />
<Message Text="$(CsWinRTCommand)" Importance="$(CsWinRTVerbosity)" />
<Exec Command="$(CsWinRTCommand)" />
Expand Down

0 comments on commit c37a2aa

Please sign in to comment.