aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.Native/WixToolset.Core.Native.csproj')
-rw-r--r--src/WixToolset.Core.Native/WixToolset.Core.Native.csproj27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj
index b02c00ad..e2431fef 100644
--- a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj
+++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj
@@ -13,7 +13,12 @@
13 <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" /> 13 <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
14 </ItemGroup> 14 </ItemGroup>
15 15
16 <Target Name="BuildWixNative" BeforeTargets="GetCopyToOutputDirectoryItems"> 16 <PropertyGroup>
17 <NativeFileListPath Condition=" '$(NCrunch)'=='' ">$(MSBuildProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt</NativeFileListPath>
18 <NativeFileListPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt</NativeFileListPath>
19 </PropertyGroup>
20
21 <Target Name="BuildWixNative" BeforeTargets="GetCopyToOutputDirectoryItems" Condition=" '$(NCrunch)'=='' ">
17 <MSBuild Projects="..\wixnative\wixnative.vcxproj" Properties="Platform=Win32" Targets="Build;BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup"> 22 <MSBuild Projects="..\wixnative\wixnative.vcxproj" Properties="Platform=Win32" Targets="Build;BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup">
18 <Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" /> 23 <Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" />
19 </MSBuild> 24 </MSBuild>
@@ -21,7 +26,11 @@
21 <Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" /> 26 <Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" />
22 </MSBuild> 27 </MSBuild>
23 28
29 <WriteLinesToFile File="$(NativeFileListPath)" Lines="@(_NativeProjectOutput)" Overwrite="true" />
30
24 <ItemGroup> 31 <ItemGroup>
32 <FileWrites Include="$(NativeFileListPath)" />
33
25 <AllItemsFullPathWithTargetPath Include="@(_NativeProjectOutput->'%(FullPath)')"> 34 <AllItemsFullPathWithTargetPath Include="@(_NativeProjectOutput->'%(FullPath)')">
26 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 35 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27 <TargetPath>%(Filename)%(Extension)</TargetPath> 36 <TargetPath>%(Filename)%(Extension)</TargetPath>
@@ -29,6 +38,22 @@
29 </ItemGroup> 38 </ItemGroup>
30 </Target> 39 </Target>
31 40
41 <Target Name="NCrunchCopyNative" AfterTargets="AfterBuild" Condition=" '$(NCrunch)'=='1' ">
42 <ReadLinesFromFile File="$(NativeFileListPath)">
43 <Output TaskParameter="Lines" ItemName="_NCrunchNativeProjectOutput" />
44 </ReadLinesFromFile>
45
46 <Error Text="You must build $(MSBuildProjectName) to create the referenced native projects. Once built, 'Reload and rebuild' the project in the NCrunch Tests. The $(NativeFileListPath) file must not be empty." Condition=" '@(_NCrunchNativeProjectOutput)'=='' " />
47
48 <Copy SourceFiles="@(_NCrunchNativeProjectOutput)" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true">
49 <Output TaskParameter="CopiedFiles" ItemName="_NCrunchNativeCopied" />
50 </Copy>
51
52 <ItemGroup>
53 <FileWrites Include="@(_NCrunchNativeCopied)" />
54 </ItemGroup>
55 </Target>
56
32 <Target Name="SetNuspecProperties" AfterTargets="CoreBuild"> 57 <Target Name="SetNuspecProperties" AfterTargets="CoreBuild">
33 <PropertyGroup> 58 <PropertyGroup>
34 <NuspecBasePath>$(OutputPath)</NuspecBasePath> 59 <NuspecBasePath>$(OutputPath)</NuspecBasePath>