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'" >
2829 <TestProject Include =" src\Build\**\*Tests.csproj" />
2930 </ItemGroup >
3031
32+ <ItemGroup >
33+ <PackageReference Include =" GitInfo" Version =" 2.0.0" />
34+ <PackageReference Include =" xunit.runner.console" Version =" 2.3.0-beta4-build3742" />
35+ <PackageReference Include =" xunit.runner.msbuild" Version =" 2.2.0" />
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" >
6776 <MakeDir Directories =" $(Out)" Condition =" !Exists('$(Out)')" />
6877
6978 <PropertyGroup >
70- <XunitConsole >"$(PackagesPath)\xunit.runner.console\tools\xunit.console.exe "</XunitConsole >
79+ <XunitConsole >"$(XunitConsolePath) "</XunitConsole >
7180 <XunitOptions >$(XunitOptions) -html $(Out)\test.html -xml $(Out)\test.xml -parallel all -noshadow</XunitOptions >
7281 </PropertyGroup >
7382
7483 <Exec Command =" $(XunitConsole) @(TestAssembly, ' ') $(XunitOptions)" ConsoleToMSBuild =" true" />
7584 </Target >
7685
77- <Target Name =" Restore" >
86+ <Target Name =" AfterRestore " AfterTargets = " Restore" >
7887 <ItemGroup >
7988 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_library_with_non_nugetized_reference\b.sln" />
8089 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_multi_platform_solution\forms.sln" />
8190 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_library_with_json_dependencies\a.csproj" />
8291 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_packaging_project_with_netstandard\a.nuproj" />
8392 <RestoreProject Include =" src\Build\NuGet.Build.Packaging.Tests\Scenarios\given_a_library_with_private_assets_reference\a.csproj" />
84-
8593 </ItemGroup >
8694
8795 <MSBuild Projects =" @(Solution);@(TestProject);@(RestoreProject)" Targets =" Restore" Properties =" $(CommonBuildProperties)" />
123131 <Exec Command =" start $(Out)\coverage\index.htm" />
124132 </Target >
125133
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)')" />
136134 <Target Name =" GitVersion" >
137135 <PropertyGroup >
138136 <GitSemVerMajor >1</GitSemVerMajor >
141139 </PropertyGroup >
142140 </Target >
143141 <Import Project =" src\PackageVersion.targets" />
144- <Import Project =" $(GitInfoTargets)" Condition =" Exists('$(GitInfoTargets)')" />
145142
146- <Target Name =" Configure" DependsOnTargets =" DownloadNuGet; GetPackageVersion" >
143+ <Target Name =" Configure" DependsOnTargets =" GetPackageVersion" >
147144 <Message Importance =" high" Text =" *********************************************************************************************************************" />
148145 <Message Importance =" high" Text =" $([System.Environment]::CommandLine)" />
149146 <Message Importance =" high" Text =" *********************************************************************************************************************" />
150147
151- <Exec Command =' "$(NuGet)" Install "$(MSBuildThisFileDirectory)packages.config" -OutputDirectory "$(PackagesPath)" -ExcludeVersion -Verbosity quiet'
152- StandardOutputImportance =" low"
153- Condition =" '$(PendingRestore)' == 'true' " />
154-
155- <Error Text =" Build script NuGet packages were missing and were just restored. Please run the build again." Condition =" '$(PendingRestore)' == 'true' and '$(target)' != 'Restore' " />
156-
157148 <!-- Invoke GitVersion just like the project-level targets do -->
158- <CallTarget Targets =" GitInfoReport" Condition =" '$(PendingRestore )' != 'true '" />
149+ <CallTarget Targets =" GitInfoReport" Condition =" '$(target )' != 'Restore '" />
159150 <!-- For now this is an informative version #, used to update CI -->
160- <Message Text =" Building version $(PackageVersion)" Importance =" high" Condition =" '$(PendingRestore )' != 'true '" />
151+ <Message Text =" Building version $(PackageVersion)" Importance =" high" Condition =" '$(target )' != 'Restore '" />
161152
162153 <PropertyGroup >
163154 <GitInfoReportImportance >high</GitInfoReportImportance >
164155 </PropertyGroup >
165156
166157 <!-- Update AppVeyor build # to match the actual one being used -->
167158 <Exec Command =" appveyor UpdateBuild -Version $(PackageVersion)"
168- Condition =" '$(APPVEYOR)' == 'true' and '$(PendingRestore )' != 'true' "
159+ Condition =" '$(APPVEYOR)' == 'true' and '$(target )' != 'Restore' "
169160 ConsoleToMSBuild =" true"
170161 ContinueOnError =" WarnAndContinue" />
171162 </Target >
172- </Project >
163+
164+ <Import Project =" corebuild\corebuild.targets" />
165+ </Project >
0 commit comments