Skip to content

Commit 50d699b

Browse files
authored
Update to Buildtools 2.0, Remove remaining project.json's (dotnet#2373)
* Exclusively use the 2.0 CLI and 2.0 buildtools. * Fix Linux problems. * Don't run chmod on Windows. * Make sure DOTNET_SKIP_FIRST_TIME_EXPERIENCE is set in init-tools. * Clean up some MSBuild properties * Auto-update WCF dependencies * Delete root-level global.json * Change how dependency versions are specified. Use full versions rather than concatenated strings. * Use "azureedge" download URL in init-tools * Use TargetFramework=netstandard1.0 instead of dnxcore50 in deps.csproj * Link CoreFxVersion to Microsoft.Private.CoreFx.NETCoreApp * Use "DotnetRestoreCommand" instead of "DnuRestoreCommand" in properties. * Check RunningOnUnix in dir.props (recommended pattern) * Change an additional use of DnuSourceList to DotnetSourceList
1 parent a11337e commit 50d699b

36 files changed

+294
-536
lines changed

BuildToolsVersion.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.27-prerelease-01430-03
1+
2.0.0-prerelease-01611-07

DotnetCLISdkVersion.txt

-1
This file was deleted.

DotnetCLIVersion.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0-preview2-1-003182
1+
2.0.0-preview1-005899

build.proj

+3-7
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<ItemGroup>
4848
<CustomTaskDependencies Include="$(BuildToolsTaskDir)Newtonsoft.Json.dll" />
4949
<CustomTaskDependencies Include="$(BuildToolsTaskDir)Microsoft.DotNet.PlatformAbstractions.dll" />
50-
<CustomTaskDependencies Include="$(PackagesDir)Microsoft.Extensions.DependencyModel\1.1.1\lib\$(DependencyModelTFM)\Microsoft.Extensions.DependencyModel.dll" />
50+
<CustomTaskDependencies Include="$(PackagesDir)microsoft.extensions.dependencymodel\1.1.1\lib\$(DependencyModelTFM)\Microsoft.Extensions.DependencyModel.dll" />
5151
</ItemGroup>
5252
<Copy SourceFiles="@(CustomTaskDependencies)"
5353
DestinationFolder="$(LocalBuildToolsTaskDir)"
@@ -57,11 +57,7 @@
5757

5858
<Target Name="BatchRestorePackages" Condition="'$(RestoreDuringBuild)'=='true'">
5959
<Message Importance="High" Text="Restoring all packages..." />
60-
61-
<Exec Command="$(DnuRestoreCommand) %(DnuRestoreDirs.AdditionalArgs) %(DnuRestoreDirs.Identity)" StandardOutputImportance="Low" CustomErrorRegularExpression="^Unable to locate .*" />
62-
63-
<!-- SDK project restore. Eventually this should be the only group being restored. -->
64-
<Exec Condition="'@(SdkRestoreProjects)' != ''" Command="$(SdkRestoreCommand) &quot;%(SdkRestoreProjects.FullPath)&quot; %(SdkRestoreProjects.ExtraRestoreArgs)" StandardOutputImportance="Low" />
60+
<Exec Condition="'@(SdkRestoreProjects)' != ''" Command="$(DotnetRestoreCommand) &quot;%(SdkRestoreProjects.FullPath)&quot; %(SdkRestoreProjects.ExtraRestoreArgs)" StandardOutputImportance="Low" />
6561
</Target>
6662

6763
<!-- Task from buildtools that uses lockfiles to validate that packages restored are exactly what were specified. -->
@@ -90,4 +86,4 @@
9086
<RemoveDir Directories="$(BinDir)" />
9187
</Target>
9288

93-
</Project>
89+
</Project>

dependencies.props

+24-4
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@
1212
<CoreFxCurrentRef>f37bb2d81830cefb80a785a2b2ce1bd664ab8a68</CoreFxCurrentRef>
1313
<CoreClrCurrentRef>a44d1158c8f2cf53d54cf35567f2ec59057b3093</CoreClrCurrentRef>
1414
<StandardCurrentRef>1117fab956560c88ebb3fbaa339b6fa04c29a364</StandardCurrentRef>
15+
<WCFCurrentRef>284ab8a84d40ad2d42e6f3680ce159aaea82d77d</WCFCurrentRef>
1516
</PropertyGroup>
1617

1718
<PropertyGroup>
19+
<CoreFxVersion>4.4.0-preview2-25311-04</CoreFxVersion>
1820
<PlatformPackageVersion>2.0.0-preview2-25311-04</PlatformPackageVersion>
1921
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>2.0.0-preview2-25309-01</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
2022
<MicrosoftNETCoreRuntimeJitPackageVersion>$(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)</MicrosoftNETCoreRuntimeJitPackageVersion>
23+
<NETStandardVersion>2.0.0-preview2-25311-01</NETStandardVersion>
24+
<DiaSymReaderNativeVersion>1.4.1</DiaSymReaderNativeVersion>
25+
<WcfVersion>4.4.0-preview2-25311-02</WcfVersion>
2126
</PropertyGroup>
2227

2328
<!-- Package dependency verification/auto-upgrade configuration. -->
@@ -40,11 +45,20 @@
4045
<BuildInfoPath>$(BaseDotNetBuildInfo)standard/$(DependencyBranch)</BuildInfoPath>
4146
<CurrentRef>$(StandardCurrentRef)</CurrentRef>
4247
</RemoteDependencyBuildInfo>
48+
<RemoteDependencyBuildInfo Include="WCF">
49+
<BuildInfoPath>$(BaseDotNetBuildInfo)wcf/$(DependencyBranch)</BuildInfoPath>
50+
<CurrentRef>$(WCFCurrentRef)</CurrentRef>
51+
</RemoteDependencyBuildInfo>
4352

4453
<DependencyBuildInfo Include="@(RemoteDependencyBuildInfo)">
4554
<RawVersionsBaseUrl>https://raw.githubusercontent.com/dotnet/versions</RawVersionsBaseUrl>
4655
</DependencyBuildInfo>
4756

57+
<XmlUpdateStep Include="CoreFx">
58+
<Path>$(MSBuildThisFileFullPath)</Path>
59+
<ElementName>CoreFxVersion</ElementName>
60+
<PackageId>Microsoft.Private.CoreFx.NETCoreApp</PackageId>
61+
</XmlUpdateStep>
4862
<XmlUpdateStep Include="CoreFx">
4963
<Path>$(MSBuildThisFileFullPath)</Path>
5064
<ElementName>PlatformPackageVersion</ElementName>
@@ -55,9 +69,15 @@
5569
<ElementName>MicrosoftNETCoreRuntimeCoreCLRPackageVersion</ElementName>
5670
<PackageId>Microsoft.NETCore.Runtime.CoreCLR</PackageId>
5771
</XmlUpdateStep>
58-
59-
<!-- project.json files to update -->
60-
<ProjectJsonFiles Include="$(MSBuildThisFileDirectory)**\project.json.template" />
61-
<ProjectJsonFiles Include="$(MSBuildThisFileDirectory)src\pkg\deps\project.json" />
72+
<XmlUpdateStep Include="Standard">
73+
<Path>$(MSBuildThisFileFullPath)</Path>
74+
<ElementName>NETStandardVersion</ElementName>
75+
<PackageId>NETStandard.Library</PackageId>
76+
</XmlUpdateStep>
77+
<XmlUpdateStep Include="WCF">
78+
<Path>$(MSBuildThisFileFullPath)</Path>
79+
<ElementName>WcfVersion</ElementName>
80+
<PackageId>System.ServiceModel.Duplex</PackageId>
81+
</XmlUpdateStep>
6282
</ItemGroup>
6383
</Project>

dir.props

+13-38
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@
5454
<LocalBuildToolsTaskDir Condition="'$(MSBuildRuntimeType)' != 'Core'">$(LocalToolRuntimePath)net46/</LocalBuildToolsTaskDir>
5555
<PackagingTaskDir Condition="'$(BuildToolsTaskDir)' != ''">$(BuildToolsTaskDir)</PackagingTaskDir>
5656
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
57-
<DotnetSdkPath Condition="'$(DotnetSdkPath)'==''">$(ToolsDir)dotnetclisdk/</DotnetSdkPath>
5857
</PropertyGroup>
5958

60-
<!-- Setting up Versioning -->
61-
<Import Condition="Exists('$(ToolsDir)BuildVersion.targets')" Project="$(ToolsDir)BuildVersion.targets" />
59+
<!-- Import Build tools common props file where repo-independent properties are found -->
60+
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
6261

6362
<!-- Versioning -->
6463
<PropertyGroup>
@@ -116,54 +115,30 @@
116115
<HostPolicyVersion Condition="'$(UseShippedHostPolicyPackage)' == 'true'">2.0.0</HostPolicyVersion>
117116
</PropertyGroup>
118117

119-
<!-- Import Build tools common props file where repo-independent properties are found -->
120-
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
121-
122118
<!-- list of nuget package sources passed to dnu -->
123119
<ItemGroup>
124120
<!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. -->
125-
<DnuSourceList Include="$(OverridePackageSource)" />
126-
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-core/api/v3/index.json" />
127-
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/cli-deps/api/v3/index.json" />
128-
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" />
129-
<DnuSourceList Include="https:%2F%2Fwww.myget.org/F/nugetbuild/api/v3/index.json" />
130-
<DnuSourceList Include="https:%2F%2Fapi.nuget.org/v3/index.json" />
131-
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
121+
<DotnetSourceList Include="$(OverridePackageSource)" />
122+
<DotnetSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-core/api/v3/index.json" />
123+
<DotnetSourceList Include="https:%2F%2Fdotnet.myget.org/F/cli-deps/api/v3/index.json" />
124+
<DotnetSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" />
125+
<DotnetSourceList Include="https:%2F%2Fwww.myget.org/F/nugetbuild/api/v3/index.json" />
126+
<DotnetSourceList Include="https:%2F%2Fapi.nuget.org/v3/index.json" />
127+
<DotnetSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
132128
</ItemGroup>
133129

134-
<!-- list of directories to perform batch restore -->
130+
<!-- list of projects to perform batch restore -->
135131
<ItemGroup>
136-
<_DnuExcludeProjectJsonFiles Include="$(MSBuildThisFileDirectory)src\pkg\projects\**\project.json" />
137-
<_DnuExcludeProjectJsonFiles Include="$(MSBuildThisFileDirectory)src\test\**\project.json" />
138-
<_DnuExcludeProjectJsonFiles Include="$(MSBuildThisFileDirectory)Bin\**\project.json" />
139-
140-
<_ProjectJsonFiles Include="$(MSBuildThisFileDirectory)**\project.json" Exclude="@(_DnuExcludeProjectJsonFiles)" />
141-
<DnuRestoreDirs Include="@(_ProjectJsonFiles->'%(RootDir)%(Directory)')">
142-
<AdditionalArgs>%(AdditionalArgs) --disable-parallel</AdditionalArgs>
143-
</DnuRestoreDirs>
144-
<DnuRestoreDirs Include="$(MSBuildThisFileDirectory)src/pkg/deps" />
145-
132+
<SdkRestoreProjects Include="$(MSBuildThisFileDirectory)src\pkg\deps\deps.csproj" />
146133
<SdkRestoreProjects Include="$(MSBuildThisFileDirectory)src\managed\Microsoft.DotNet.PlatformAbstractions\Microsoft.DotNet.PlatformAbstractions.csproj" />
147134
<SdkRestoreProjects Include="$(MSBuildThisFileDirectory)src\managed\Microsoft.Extensions.DependencyModel\Microsoft.Extensions.DependencyModel.csproj">
148135
<!-- Workaround https://github.com/NuGet/Home/issues/4337 -->
149136
<ExtraRestoreArgs>/p:VersionSuffix=$(VersionSuffix)</ExtraRestoreArgs>
150137
</SdkRestoreProjects>
151138
</ItemGroup>
152-
153139
<PropertyGroup>
154-
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
155-
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
156-
<DotnetSdkToolCommand Condition="'$(DotnetSdkToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetSdkPath)dotnet.exe</DotnetSdkToolCommand>
157-
<DotnetSdkToolCommand Condition="'$(DotnetSdkToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetSdkPath)dotnet</DotnetSdkToolCommand>
158-
<OverrideToolHost Condition="'$(MSBuildRuntimeType)' == 'Core'">$(DotnetToolCommand)</OverrideToolHost>
159-
<DnuRestoreSource>@(DnuSourceList -> '--source %(Identity)', ' ')</DnuRestoreSource>
160-
<DnuRestorePrefix Condition="'$(OsEnvironment)' != 'Windows_NT'">DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1</DnuRestorePrefix>
161-
<DnuRestoreCommand>$(DnuRestorePrefix) "$(DotnetToolCommand)"</DnuRestoreCommand>
162-
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
163-
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('/\'.ToCharArray()))" $(DnuRestoreSource)</DnuRestoreCommand>
164-
<DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand>
165-
166-
<SdkRestoreCommand>$(DotnetSdkToolCommand) restore --packages "$(PackagesDir.TrimEnd('/\'.ToCharArray()))" $(DnuRestoreSource)</SdkRestoreCommand>
140+
<DotnetRestorePrefix Condition="'$(RunningOnUnix)' == 'true'">DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 </DotnetRestorePrefix>
141+
<DotnetRestoreCommand>$(DotnetRestorePrefix)$(DotnetRestoreCommand)</DotnetRestoreCommand>
167142
</PropertyGroup>
168143

169144
<PropertyGroup Condition="'$(BuildAllProjects)'=='true'">

global.json

-4
This file was deleted.

init-tools.cmd

+5-43
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,11 @@ if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages\
66
if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools
77
set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
88
if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%dotnet.exe
9-
set DOTNET_SDK_PATH=%TOOLRUNTIME_DIR%\dotnetclisdk\
10-
if [%DOTNET_SDK_CMD%]==[] set DOTNET_SDK_CMD=%DOTNET_SDK_PATH%dotnet.exe
119
if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
1210
set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt"
1311
set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\
14-
set PROJECT_JSON_PATH=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
15-
set PROJECT_JSON_FILE=%PROJECT_JSON_PATH%\project.json
16-
set PROJECT_JSON_CONTENTS={ "dependencies": { "Microsoft.DotNet.BuildTools": "%BUILDTOOLS_VERSION%" }, "frameworks": { "netcoreapp1.0": { } } }
17-
set BUILD_TOOLS_SEMAPHORE=%PROJECT_JSON_PATH%\init-tools.completed
18-
set DUMMY_GLOBAL_JSON_PATH=%PACKAGES_DIR%global.json
12+
set INIT_TOOLS_RESTORE_PROJECT=%~dp0init-tools.msbuild
13+
set BUILD_TOOLS_SEMAPHORE=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%\init-tools.completed
1914

2015
:: We do not want to run the first-time experience.
2116
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
@@ -34,21 +29,15 @@ if exist "%BUILD_TOOLS_SEMAPHORE%" (
3429

3530
if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
3631

37-
if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
38-
echo %PROJECT_JSON_CONTENTS% > "%PROJECT_JSON_FILE%"
3932
echo Running %0 > "%INIT_TOOLS_LOG%"
4033

4134
set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
4235
if exist "%DOTNET_CMD%" goto :afterdotnetinstall
4336

44-
:: core-setup repo has a global.json which causes a conflict with the init-tools publish step
45-
if NOT exist "%PACKAGES_DIR%" mkdir %PACKAGES_DIR% > nul 2>&1
46-
echo { "projects": [] } > %DUMMY_GLOBAL_JSON_PATH%
47-
4837
echo Installing dotnet cli...
4938
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
5039
set DOTNET_ZIP_NAME=dotnet-dev-win-x64.%DOTNET_VERSION%.zip
51-
set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/preview/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
40+
set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
5241
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
5342
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
5443
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; do { try { (New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $retryCount++; Start-Sleep -Seconds (5 * $retryCount); } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
@@ -59,27 +48,10 @@ if NOT exist "%DOTNET_LOCAL_PATH%" (
5948

6049
:afterdotnetinstall
6150

62-
if exist "%DOTNET_SDK_CMD%" goto :afterdotnetsdkinstall
63-
64-
echo Installing dotnet sdk...
65-
set /p DOTNET_SDK_VERSION=< "%~dp0DotnetCLISdkVersion.txt"
66-
if NOT exist "%DOTNET_SDK_PATH%" mkdir "%DOTNET_SDK_PATH%"
67-
set DOTNET_ZIP_NAME=dotnet-dev-win-x64.%DOTNET_SDK_VERSION%.zip
68-
set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Sdk/%DOTNET_SDK_VERSION%/%DOTNET_ZIP_NAME%
69-
set DOTNET_LOCAL_PATH=%DOTNET_SDK_PATH%%DOTNET_ZIP_NAME%
70-
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
71-
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; do { try { (New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $retryCount++; Start-Sleep -Seconds (5 * $retryCount); } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_SDK_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_SDK_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
72-
if NOT exist "%DOTNET_LOCAL_PATH%" (
73-
echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details. 1>&2
74-
exit /b 1
75-
)
76-
77-
:afterdotnetsdkinstall
78-
7951
if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
8052
echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
81-
echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
82-
call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
53+
echo Running: "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%"
54+
call "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%"
8355
if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
8456
echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details. 1>&2
8557
exit /b 1
@@ -96,16 +68,6 @@ if not [%INIT_TOOLS_ERRORLEVEL%]==[0] (
9668
exit /b %INIT_TOOLS_ERRORLEVEL%
9769
)
9870

99-
echo Updating CLI NuGet Frameworks map...
100-
robocopy "%TOOLRUNTIME_DIR%" "%TOOLRUNTIME_DIR%\dotnetcli\sdk\%DOTNET_VERSION%" NuGet.Frameworks.dll /XO >> "%INIT_TOOLS_LOG%"
101-
set UPDATE_CLI_ERRORLEVEL=%ERRORLEVEL%
102-
if %UPDATE_CLI_ERRORLEVEL% GTR 1 (
103-
echo ERROR: Failed to update Nuget for CLI {Error level %UPDATE_CLI_ERRORLEVEL%}. Please check '%INIT_TOOLS_LOG%' for more details. 1>&2
104-
exit /b %UPDATE_CLI_ERRORLEVEL%
105-
)
106-
107-
if exist %~dp0tools-override xcopy /Y/e/s %~dp0tools-override\* %TOOLRUNTIME_DIR%
108-
10971
:: Create sempahore file
11072
echo Done initializing tools.
11173
echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"

init-tools.msbuild

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>netcoreapp1.0</TargetFramework>
4+
<EnableDefaultItems>false</EnableDefaultItems>
5+
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
6+
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)Tools/$(BuildToolsPackageVersion)</BaseIntermediateOutputPath>
7+
</PropertyGroup>
8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.DotNet.BuildTools" Version="$(BuildToolsPackageVersion)" />
10+
</ItemGroup>
11+
</Project>

0 commit comments

Comments
 (0)