Added better native interop build target, updated projects to use new target

This commit is contained in:
Andrew Forster
2016-12-13 08:11:31 -08:00
parent 38867679bb
commit 91fd484c1e
12 changed files with 162 additions and 93 deletions

View File

@@ -146,9 +146,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)Build\Facebook.Yoga.AfterBuild.targets" Label="YogaAfterBuild" />
<Target Name="AfterBuild" DependsOnTargets="$(YogaAfterBuild)">
<Copy SourceFiles="@(InteropDll)" DestinationFolder="$(OutputPath)" ContinueOnError="false" />
<Copy SourceFiles="@(InteropPDB)" DestinationFolder="$(OutputPath)" ContinueOnError="false" />
<Import Project="$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets" Condition="Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Label="ImportNativeInteropTargets" />
<Target Name="EnsureNativeInteropImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references a native interop target that is missing. The missing build target is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets'))" />
</Target>
</Project>

View File

@@ -146,9 +146,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)Build\Facebook.Yoga.AfterBuild.targets" Label="YogaAfterBuild" />
<Target Name="AfterBuild" DependsOnTargets="$(YogaAfterBuild)">
<Copy SourceFiles="@(InteropDll)" DestinationFolder="$(OutputPath)" ContinueOnError="false" />
<Copy SourceFiles="@(InteropPDB)" DestinationFolder="$(OutputPath)" ContinueOnError="false" />
<Import Project="$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets" Condition="Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Label="ImportNativeInteropTargets" />
<Target Name="EnsureNativeInteropImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references a native interop target that is missing. The missing build target is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets'))" />
</Target>
</Project>

View File

@@ -14,6 +14,8 @@
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -146,9 +148,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)Build\Facebook.Yoga.AfterBuild.targets" Label="YogaAfterBuild" />
<Target Name="AfterBuild" DependsOnTargets="$(YogaAfterBuild)">
<Copy SourceFiles="@(InteropDll)" DestinationFolder="$(OutputPath)" ContinueOnError="false" />
<Copy SourceFiles="@(InteropPDB)" DestinationFolder="$(OutputPath)" ContinueOnError="false" />
<Import Project="$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets" Condition="Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Label="ImportNativeInteropTargets" />
<Target Name="EnsureNativeInteropImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references a native interop target that is missing. The missing build target is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets'))" />
</Target>
</Project>

View File

@@ -147,9 +147,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)Build\Facebook.Yoga.AfterBuild.targets" Label="YogaAfterBuild" />
<Target Name="AfterBuild" DependsOnTargets="$(YogaAfterBuild)">
<Copy SourceFiles="@(InteropDll)" DestinationFolder="$(OutputPath)" ContinueOnError="false" />
<Copy SourceFiles="@(InteropPDB)" DestinationFolder="$(OutputPath)" ContinueOnError="false" />
<Import Project="$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets" Condition="Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Label="ImportNativeInteropTargets" />
<Target Name="EnsureNativeInteropImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references a native interop target that is missing. The missing build target is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets'))" />
</Target>
</Project>

View File

@@ -136,11 +136,11 @@
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
<Import Project="$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets" Condition="Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Label="ImportNativeInteropTargets" />
<Target Name="EnsureNativeInteropImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references a native interop target that is missing. The missing build target is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)Build\Facebook.Yoga.NativeInterop.targets'))" />
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,6 +1,6 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0"
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2"
},
"frameworks": {
"uap10.0": {}