Enable use of NCrunch
Rob Mensching committed
Aug 10, 2018 at 23:32 UTC
77b1c956e6037717f98ae01c2ff4e989c0252db8
6 files changed
+98
-19
.gitignore
+48
-10
@@ -19,16 +19,20 @@
19
[Rr]eleases/
20
x64/
21
x86/
22
+[Ww]in32/
23
bld/
24
[Bb]in/
25
[Oo]bj/
26
[Ll]og/
27
27
-# Visual Studio 2015 cache/options directory
28
+# Visual Studio 2015/2017 cache/options directory
29
.vs/
30
# Uncomment if you have tasks that create the project's static files in wwwroot
31
#wwwroot/
32
33
+# Visual Studio 2017 auto generated files
34
+Generated\ Files/
35
+
36
# MSTest test Results
37
[Tt]est[Rr]esult*/
38
[Bb]uild[Ll]og.*
@@ -49,16 +53,21 @@ BenchmarkDotNet.Artifacts/
53
project.lock.json
54
project.fragment.lock.json
55
artifacts/
52
-**/Properties/launchSettings.json
56
57
+# StyleCop
58
+StyleCopReport.xml
59
+
60
+# Files built by Visual Studio
61
*_i.c
62
*_p.c
56
-*_i.h
63
+*_h.h
64
*.ilk
65
*.meta
66
*.obj
67
+*.iobj
68
*.pch
69
*.pdb
70
+*.ipdb
71
*.pgc
72
*.pgd
73
*.rsp
@@ -96,6 +105,9 @@ ipch/
105
*.vspx
106
*.sap
107
108
+# Visual Studio Trace Files
109
+*.e2e
110
+
111
# TFS 2012 Local Workspace
112
$tf/
113
@@ -116,6 +128,10 @@ _TeamCity*
128
# DotCover is a Code Coverage Tool
129
*.dotCover
130
131
+# AxoCover is a Code Coverage Tool
132
+.axoCover/*
133
+!.axoCover/settings.json
134
+
135
# Visual Studio code coverage results
136
*.coverage
137
*.coveragexml
@@ -164,11 +180,11 @@ PublishScripts/
180
# NuGet Packages
181
*.nupkg
182
# The packages folder can be ignored because of Package Restore
167
-**/packages/*
183
+**/[Pp]ackages/*
184
# except build/, which is used as an MSBuild target.
169
-!**/packages/build/
185
+!**/[Pp]ackages/build/
186
# Uncomment if necessary however generally it will be regenerated when needed
171
-#!**/packages/repositories.config
187
+#!**/[Pp]ackages/repositories.config
188
# NuGet v3's project.json files produces more ignorable files
189
*.nuget.props
190
*.nuget.targets
@@ -205,6 +221,10 @@ ClientBin/
221
*.publishsettings
222
orleans.codegen.cs
223
224
+# Including strong name files can present a security risk
225
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
226
+#*.snk
227
+
228
# Since there are multiple workflows, uncomment next line to ignore bower_components
229
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
230
#bower_components/
@@ -219,6 +239,8 @@ _UpgradeReport_Files/
239
Backup*/
240
UpgradeLog*.XML
241
UpgradeLog*.htm
242
+ServiceFabricBackup/
243
+*.rptproj.bak
244
245
# SQL Server files
246
*.mdf
@@ -229,6 +251,7 @@ UpgradeLog*.htm
251
*.rdl.data
252
*.bim.layout
253
*.bim_*.settings
254
+*.rptproj.rsuser
255
256
# Microsoft Fakes
257
FakesAssemblies/
@@ -240,9 +263,6 @@ FakesAssemblies/
263
.ntvs_analysis.dat
264
node_modules/
265
243
-# Typescript v1 declaration files
244
-typings/
245
-
266
# Visual Studio 6 build log
267
*.plg
268
@@ -292,4 +312,22 @@ __pycache__/
312
*.btp.cs
313
*.btm.cs
314
*.odx.cs
295
-*.xsd.cs
\ No newline at end of file
315
+*.xsd.cs
316
+
317
+# OpenCover UI analysis results
318
+OpenCover/
319
+
320
+# Azure Stream Analytics local run output
321
+ASALocalRun/
322
+
323
+# MSBuild Binary and Structured Log
324
+*.binlog
325
+
326
+# NVidia Nsight GPU debugger configuration file
327
+*.nvuser
328
+
329
+# MFractors (Xamarin productivity tool) working folder
330
+.mfractor/
331
+
332
+# Local History for Visual Studio
333
+.localhistory/
src/Cpp.Build.props
+2
-3
@@ -3,9 +3,8 @@
3
4
<Project>
5
<PropertyGroup>
6
- <Platform Condition=" '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7
- <BaseOutputPath>$(OutputPath)</BaseOutputPath>
8
- <IntDir>$(BaseIntermediateOutputPath)$(Platform)\</IntDir>
6
+ <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7
+ <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8
<OutDir>$(OutputPath)$(Platform)\</OutDir>
9
</PropertyGroup>
10
src/Directory.Build.props
+11
-4
@@ -1,16 +1,23 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
-
3
+<!--
4
+ Do NOT modify this file. Update the canonical version in Home\src\Directory.Build.props
5
+ then update all of the repos.
6
+-->
7
<Project>
8
<PropertyGroup>
9
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8
- <BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
9
- <OutputPath>$(MSBuildThisFileDirectory)..\build\$(Configuration)\</OutputPath>
10
+ <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
11
+
12
+ <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
13
+ <BaseOutputPath>$(MSBuildThisFileDirectory)..\build\</BaseOutputPath>
14
+ <BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(ProjectName)\</BaseIntermediateOutputPath>
15
+ <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
16
17
<Authors>WiX Toolset Team</Authors>
18
<Company>WiX Toolset</Company>
19
<Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
20
+ <Product>WiX Toolset</Product>
21
</PropertyGroup>
22
23
<PropertyGroup>
src/WixToolset.Core.Native/WixToolset.Core.Native.csproj
+26
-1
@@ -13,7 +13,12 @@
13
<PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
14
</ItemGroup>
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)'=='' ">
22
<MSBuild Projects="..\wixnative\wixnative.vcxproj" Properties="Platform=Win32" Targets="Build;BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup">
23
<Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" />
24
</MSBuild>
@@ -21,7 +26,11 @@
26
<Output TaskParameter="TargetOutputs" ItemName="_NativeProjectOutput" />
27
</MSBuild>
28
29
+ <WriteLinesToFile File="$(NativeFileListPath)" Lines="@(_NativeProjectOutput)" Overwrite="true" />
30
+
31
<ItemGroup>
32
+ <FileWrites Include="$(NativeFileListPath)" />
33
+
34
<AllItemsFullPathWithTargetPath Include="@(_NativeProjectOutput->'%(FullPath)')">
35
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
36
<TargetPath>%(Filename)%(Extension)</TargetPath>
@@ -29,6 +38,22 @@
38
</ItemGroup>
39
</Target>
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
+
57
<Target Name="SetNuspecProperties" AfterTargets="CoreBuild">
58
<PropertyGroup>
59
<NuspecBasePath>$(OutputPath)</NuspecBasePath>
src/WixToolset.Core.Native/WixToolset.Core.Native.v3.ncrunchproject
new
+10
@@ -0,0 +1,10 @@
1
+<ProjectConfiguration>
2
+ <Settings>
3
+ <AdditionalFilesToIncludeForProject>
4
+ <Value>..\..\build\Debug\Win32\wixnative.x86.exe</Value>
5
+ <Value>..\..\build\Debug\Win32\wixnative.x86.pdb</Value>
6
+ <Value>..\..\build\Debug\x64\wixnative.amd64.exe</Value>
7
+ <Value>..\..\build\Debug\x64\wixnative.amd64.pdb</Value>
8
+ </AdditionalFilesToIncludeForProject>
9
+ </Settings>
10
+</ProjectConfiguration>
\ No newline at end of file
src/wixnative/wixnative.vcxproj
+1
-1
@@ -75,7 +75,7 @@
75
</ItemGroup>
76
77
<Target Name="Pack" DependsOnTargets="GetBuildVersion">
78
- <Exec Command="nuget pack runtime.win.WixToolset.Core.Native.nuspec -BasePath "$(BaseOutputPath)\" -OutputDirectory "$(BaseOutputPath)\" -NoPackageAnalysis -Properties Configuration=$(Configuration);Id=runtime.win.WixToolset.Core.Native;Version="$(BuildVersionSimple)";Platform=$(PlatformTarget);Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"" />
78
+ <Exec Command='nuget pack runtime.win.WixToolset.Core.Native.nuspec -BasePath "$(BaseOutputPath)$(Configuration)" -OutputDirectory "$(BaseOutputPath)$(Configuration)" -NoPackageAnalysis -Properties Configuration=$(Configuration);Id=runtime.win.WixToolset.Core.Native;Version="$(BuildVersionSimple)";Platform=$(PlatformTarget);Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"' />
79
</Target>
80
81
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />