11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <Project ToolsVersion =" 14.0" DefaultTargets =" All" InitialTargets =" Configure" TreatAsLocalProperty =" RootSuffix" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
2+ <Project DefaultTargets =" All" InitialTargets =" Configure" TreatAsLocalProperty =" RootSuffix" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3+ <Import Project =" corebuild\corebuild.props" />
34 <Import Project =" build.props" />
45
56 <PropertyGroup Condition =" '$(IsCIBuild)' != 'true'" >
1920 <CommonBuildProperties >WarningLevel=0;NoWarn=1591;Out=$(Out);Configuration=$(Configuration);RunCodeAnalysis=$(RunCodeAnalysis);PackageOutputPath=$(Out)</CommonBuildProperties >
2021 <DefaultImportance Condition =" '$(DefaultImportance)' == '' " >high</DefaultImportance >
2122 <PS >%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe</PS >
23+ <GitInfoReportImportance >high</GitInfoReportImportance >
2224 </PropertyGroup >
2325
2426 <ItemGroup >
2830 <TestProject Include =" src\Build\**\*Tests.csproj" />
2931 </ItemGroup >
3032
33+ <ItemGroup >
34+ <PackageReference Include =" GitInfo" Version =" 2.0.0" />
35+ <PackageReference Include =" xunit.runner.console" Version =" 2.3.0-beta4-build3742" />
36+ <PackageReference Include =" OpenCover" Version =" 4.6.519" />
37+ <PackageReference Include =" ReportGenerator" Version =" 2.4.5" />
38+ </ItemGroup >
39+
3140 <Target Name =" All" DependsOnTargets =" Build;Test;Package" />
3241
3342 <Target Name =" Clean" >
3948
4049 <Target Name =" Rebuild" DependsOnTargets =" Clean;Build" />
4150
42- <Target Name =" Build" >
51+ <Target Name =" Build" DependsOnTargets =" GitInfoReport;GetPackageVersion" >
52+ <!-- For now this is an informative version #, used to update CI -->
53+ <Message Text =" Building version $(PackageVersion)" Importance =" high" />
54+ <!-- Update AppVeyor build # to match the actual one being used -->
55+ <Exec Command =" appveyor UpdateBuild -Version $(PackageVersion)"
56+ Condition =" '$(APPVEYOR)' == 'true' "
57+ ConsoleToMSBuild =" true"
58+ ContinueOnError =" WarnAndContinue" />
59+
4360 <Exec Command =" rmdir $(Out) /S /Q" Condition =" Exists('$(Out)') " ContinueOnError =" true" StandardOutputImportance =" low" />
4461 <MakeDir Directories =" $(Out)" Condition =" !Exists('$(Out)')" />
4562 <Message Text =" Build properties: $(CommonBuildProperties)." Importance =" high" />
6784 <MakeDir Directories =" $(Out)" Condition =" !Exists('$(Out)')" />
6885
6986 <PropertyGroup >
70- <XunitConsole >"$(PackagesPath)\xunit.runner.console\tools\xunit.console.exe "</XunitConsole >
87+ <XunitConsole >"$(XunitConsolePath) "</XunitConsole >
7188 <XunitOptions >$(XunitOptions) -html $(Out)\test.html -xml $(Out)\test.xml -parallel all -noshadow</XunitOptions >
7289 </PropertyGroup >
7390
7491 <Exec Command =" $(XunitConsole) @(TestAssembly, ' ') $(XunitOptions)" ConsoleToMSBuild =" true" />
7592 </Target >
7693
77- <Target Name =" Restore" >
94+ <Target Name =" AfterRestore " AfterTargets = " Restore" >
7895 <ItemGroup >
7996 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_library_with_non_nugetized_reference\b.sln" />
8097 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_multi_platform_solution\forms.sln" />
8198 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_library_with_json_dependencies\a.csproj" />
8299 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_packaging_project_with_netstandard\a.nuproj" />
83100 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_library_with_private_assets_reference\a.csproj" />
84-
85101 </ItemGroup >
86102
87103 <MSBuild Projects =" @(Solution);@(TestProject);@(RestoreProject)" Targets =" Restore" Properties =" $(CommonBuildProperties)" />
123139 <Exec Command =" start $(Out)\coverage\index.htm" />
124140 </Target >
125141
126- <!-- Configure and restore initial targets and packages -->
127- <Import Project =" src\NuGet.Restore.targets" />
128- <PropertyGroup >
129- <GitInfoTargets >$(PackagesPath)\GitInfo\build\GitInfo.targets</GitInfoTargets >
130- <XunitConsole >$(PackagesPath)\xunit.runner.console\tools\xunit.console.x86.exe</XunitConsole >
131- <XunitBuildDir >$([System.IO.Path]::Combine('$(MSBuildThisFileDirectory)', '.nuget', 'packages', 'xunit.runner.msbuild', 'build'))</XunitBuildDir >
132- <XunitProps >$([System.IO.Path]::Combine($(XunitBuildDir), 'xunit.runner.msbuild.props'))</XunitProps >
133- <PendingRestore Condition =" !Exists('$(GitInfoTargets)') Or !Exists('$(XunitConsole)') Or !Exists('$(XunitProps)') " >true</PendingRestore >
134- </PropertyGroup >
135- <Import Project =" $(XunitProps)" Condition =" Exists('$(XunitProps)')" />
136142 <Target Name =" GitVersion" >
137143 <PropertyGroup >
138144 <GitSemVerMajor >1</GitSemVerMajor >
139145 <GitSemVerMinor >0</GitSemVerMinor >
140146 <GitSemVerPatch >0</GitSemVerPatch >
141147 </PropertyGroup >
142148 </Target >
143- <Import Project =" $(GitInfoTargets)" Condition =" Exists('$(GitInfoTargets)')" />
144149 <Import Project =" src\PackageVersion.targets" />
145150
146- <Target Name =" Configure" DependsOnTargets = " DownloadNuGet;GetPackageVersion " >
151+ <Target Name =" Configure" >
147152 <Message Importance =" high" Text =" *********************************************************************************************************************" />
148153 <Message Importance =" high" Text =" $([System.Environment]::CommandLine)" />
149154 <Message Importance =" high" Text =" *********************************************************************************************************************" />
150-
151- <Exec Command =' "$(NuGet)" Install "$(MSBuildThisFileDirectory)packages.config" -OutputDirectory "$(PackagesPath)" -ExcludeVersion -Verbosity quiet'
152- StandardOutputImportance =" low"
153- Condition =" '$(PendingRestore)' == 'true' " />
154-
155- <!-- Invoke GitVersion just like the project-level targets do -->
156- <MSBuild Projects =" $(GitInfoTargets)" Targets =" GitVersion;GitInfoReport" Properties =" GitInfoReportImportance=high" >
157- <Output TaskParameter =" TargetOutputs" ItemName =" GitInfo" />
158- </MSBuild >
159-
160- <!-- For now this is an informative version #, used to update CI -->
161- <Message Text =" Building version $(PackageVersion)" Importance =" high" />
162-
163- <!-- Update AppVeyor build # to match the actual one being used -->
164- <Exec Command =" appveyor UpdateBuild -Version $(PackageVersion)" Condition =" '$(APPVEYOR)' == 'true' "
165- ConsoleToMSBuild =" true"
166- ContinueOnError =" WarnAndContinue" />
167155 </Target >
168- </Project >
156+
157+ <Import Project =" corebuild\corebuild.targets" />
158+ </Project >
0 commit comments