enable Microsoft.DiaSymReader* packages to be overridden during build

This commit is contained in:
Brett V. Forsgren 2018-02-01 15:16:11 -08:00
Родитель 5d88640df7
Коммит 8bfe56ec64
5 изменённых файлов: 81 добавлений и 2 удалений

Просмотреть файл

@ -603,6 +603,27 @@ if "%RestorePackages%" == "true" (
)
)
echo ----------- Done with package restore, starting dependency uptake check -------------
if not "%PB_PackageVersionPropsUrl%" == "" (
set dependencyUptakeDir=%~dp0Tools\dependencyUptake
if not exist "!dependencyUptakeDir!" mkdir "!dependencyUptakeDir!"
:: download package version overrides
echo powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'"
powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'"
if ERRORLEVEL 1 echo Error downloading package version properties && goto :failure
:: prepare dependency uptake files
echo %_msbuildexe% %msbuildflags% %~dp0build\projects\PrepareDependencyUptake.proj /t:Build
%_msbuildexe% %msbuildflags% %~dp0build\projects\PrepareDependencyUptake.proj /t:Build
if ERRORLEVEL 1 echo Error building dependency uptake files && goto :failure
:: restore dependencies
%_nugetexe% restore !dependencyUptakeDir!\packages.config -PackagesDirectory packages -ConfigFile !dependencyUptakeDir!\NuGet.config
if ERRORLEVEL 1 echo Error restoring dependency uptake packages && goto :failure
)
if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" (
:: Restore the Tools directory
call %~dp0init-tools.cmd

Просмотреть файл

@ -333,6 +333,22 @@ fi
# TODO: Check for existence of fsi (either on the system, or from the FSharp.Compiler.Tools package that was restored).
build_status "Done with package restore, starting dependency uptake check"
if [ "$PB_PACKAGEVERSIONPROPSURL" != "" ]; then
dependencyUptakeDir="${_scriptdir}Tools/dependencyUptake"
mkdir -p "$dependencyUptakeDir"
# download package version overrides
{ printeval "curl '$PB_PACKAGEVERSIONPROPSURL' -o '$dependencyUptakeDir/PackageVersions.props'"; } || failwith "downloading package version properties failed"
# prepare dependency uptake files
{ printeval "$_msbuildexe $msbuildflags ${scriptdir}build/projects/PrepareDependencyUptake.proj /t:Build"; } || failwith "building dependency uptake files failed"
# restore dependencies
{ printeval "$_nugetexe restore '$dependencyUptakeDir/packages.config' -PackagesDirectory packages -ConfigFile '$dependencyUptakeDir/NuGet.config'"; } || failwith "restoring dependency uptake packages failed"
fi
build_status "Done with package restore, starting proto"
# Decide if Proto need building

Просмотреть файл

@ -0,0 +1,35 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DependencyUptakeDirectory>$(MSBuildThisFileDirectory)..\..\Tools\dependencyUptake</DependencyUptakeDirectory>
<PackageVersionsPropsFile>$(DependencyUptakeDirectory)\PackageVersions.props</PackageVersionsPropsFile>
<PackagesConfigFile>$(DependencyUptakeDirectory)\packages.config</PackagesConfigFile>
<NuGetConfigFile>$(DependencyUptakeDirectory)\NuGet.config</NuGetConfigFile>
</PropertyGroup>
<Import Project="$(PackageVersionsPropsFile)" />
<!-- Prepare a dummy packages.config -->
<ItemGroup>
<PackagesConfigLines Include="&lt;packages&gt;" />
<PackagesConfigLines Include=" &lt;package id=&quot;Microsoft.DiaSymReader&quot; version=&quot;$(MicrosoftDiaSymReaderPackageVersion)&quot; /&gt;" />
<PackagesConfigLines Include=" &lt;package id=&quot;Microsoft.DiaSymReader.PortablePdb&quot; version=&quot;$(MicrosoftDiaSymReaderPortablePdbPackageVersion)&quot; /&gt;" />
<PackagesConfigLines Include="&lt;/packages&gt;" />
</ItemGroup>
<!-- Prepare a dummy NuGet.config -->
<ItemGroup>
<NuGetConfigLines Include="&lt;configuration&gt;" />
<NuGetConfigLines Include=" &lt;packageSources&gt;" />
<NuGetConfigLines Include=" &lt;clear /&gt;" />
<NuGetConfigLines Include=" &lt;add key=&quot;dependency-uptake&quot; value=&quot;$(PB_RestoreSource)&quot; /&gt;" />
<NuGetConfigLines Include=" &lt;/packageSources&gt;" />
<NuGetConfigLines Include="&lt;/configuration&gt;" />
</ItemGroup>
<Target Name="Build">
<WriteLinesToFile File="$(PackagesConfigFile)" Lines="@(PackagesConfigLines)" Overwrite="true" />
<WriteLinesToFile File="$(NuGetConfigFile)" Lines="@(NuGetConfigLines)" Overwrite="true" />
</Target>
</Project>

Просмотреть файл

@ -84,6 +84,9 @@
<MicrosoftVisualStudioThreadingVersion>15.3.23</MicrosoftVisualStudioThreadingVersion>
<MicrosoftVisualStudioValidationVersion>15.3.15</MicrosoftVisualStudioValidationVersion>
<MicrosoftDiaSymReaderPackageVersion>1.1.0</MicrosoftDiaSymReaderPackageVersion>
<MicrosoftDiaSymReaderPortablePdbPackageVersion>1.2.0</MicrosoftDiaSymReaderPortablePdbPackageVersion>
<!-- Always qualify the IntermediateOutputPath by the TargetDotnetProfile if any exists -->
<IntermediateOutputPath>obj\$(Configuration)\$(TargetDotnetProfile)\</IntermediateOutputPath>
<IntermediateOutputPath Condition="'$(PortableProfileBeingReferenced)' != ''">obj\$(Configuration)\$(TargetDotnetProfile)\$(PortableProfileBeingReferenced)\</IntermediateOutputPath>
@ -100,6 +103,8 @@
<MonoPackaging Condition="'$(TargetDotnetProfile)' != 'coreclr' AND '$(OS)' == 'Unix'">true</MonoPackaging>
<DependencyUptakePackageVersionPropsFile>$(MSBuildThisFileDirectory)..\Tools\dependencyUptake\PackageVersions.props</DependencyUptakePackageVersionPropsFile>
<!-- Localization -->
<DisableLocalization Condition="'$(MonoPackaging)' == 'true'">true</DisableLocalization>
<UpdateXlfOnBuild Condition="'$(CI)' != '1'">true</UpdateXlfOnBuild>
@ -107,6 +112,8 @@
</PropertyGroup>
<Import Project="$(DependencyUptakePackageVersionPropsFile)" Condition="Exists('$(DependencyUptakePackageVersionPropsFile)')" />
<!-- Default setting. Some get modified later in FSharpSource.targets -->
<PropertyGroup>
<SkipSigning>false</SkipSigning>

Просмотреть файл

@ -669,10 +669,10 @@
<Reference Include="System.Numerics" />
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.PortablePdb.$(MicrosoftDiaSymReaderPortablePdbPackageVersion)\lib\netstandard1.1\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.DiaSymReader">
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.$(MicrosoftDiaSymReaderPackageVersion)\lib\netstandard1.1\Microsoft.DiaSymReader.dll</HintPath>
</Reference>
<Reference Include="System.Reflection.Metadata">
<HintPath>..\..\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>