Use installed shared framework version during deps file generation

instead of the shared framework version bundled with the SDK
This commit is contained in:
John Luo 2017-07-17 13:58:49 -07:00 committed by =
parent 459f453cd4
commit 8dfc6a00e5
3 changed files with 8 additions and 4 deletions

View File

@ -3,7 +3,6 @@
<AspNetCoreIntegrationTestingVersion>0.4.0-*</AspNetCoreIntegrationTestingVersion> <AspNetCoreIntegrationTestingVersion>0.4.0-*</AspNetCoreIntegrationTestingVersion>
<AspNetCoreVersion>2.0.0-*</AspNetCoreVersion> <AspNetCoreVersion>2.0.0-*</AspNetCoreVersion>
<CoreFxVersion>4.4.0-*</CoreFxVersion> <CoreFxVersion>4.4.0-*</CoreFxVersion>
<DepsRuntimeFrameworkVersion>2.0.0-preview3-25514-02</DepsRuntimeFrameworkVersion>
<DotnetDebToolVersion>2.0.0-preview2-*</DotnetDebToolVersion> <DotnetDebToolVersion>2.0.0-preview2-*</DotnetDebToolVersion>
<InternalAspNetCoreSdkVersion>2.0.1-*</InternalAspNetCoreSdkVersion> <InternalAspNetCoreSdkVersion>2.0.1-*</InternalAspNetCoreSdkVersion>
<MoqVersion>4.7.49</MoqVersion> <MoqVersion>4.7.49</MoqVersion>

View File

@ -75,7 +75,7 @@
Condition="Exists('$(DependencyBuildDirectory)')" /> Condition="Exists('$(DependencyBuildDirectory)')" />
</Target> </Target>
<Target Name="BuildPackageCache" DependsOnTargets="UpdateNuGetConfig;AddDiaSymReaderToPath"> <Target Name="BuildPackageCache" DependsOnTargets="UpdateNuGetConfig;AddDiaSymReaderToPath;_ResolveCurrentSharedFrameworkVersion">
<GetOSPlatform> <GetOSPlatform>
<!-- Returns {Linux, macOS, Windows} --> <!-- Returns {Linux, macOS, Windows} -->
<Output TaskParameter="PlatformName" PropertyName="OSPlatform" /> <Output TaskParameter="PlatformName" PropertyName="OSPlatform" />
@ -125,7 +125,7 @@
<Exec Command="dotnet restore" WorkingDirectory="$(HostingStartupTemplatePath)" /> <Exec Command="dotnet restore" WorkingDirectory="$(HostingStartupTemplatePath)" />
<!--- MSBuild caches things if you run inproc so have to use Exec --> <!--- MSBuild caches things if you run inproc so have to use Exec -->
<Exec Command="dotnet msbuild /t:&quot;Restore;Rebuild;CollectDeps&quot; $(HostingStartupTemplateFile) /p:&quot;DepsOutputPath=$(DepsOutputPath);HostingStartupPackageName=%(HostingStartupPackageReference.Identity);HostingStartupPackageVersion=%(Version)&quot;"/> <Exec Command="dotnet msbuild /t:&quot;Restore;Rebuild;CollectDeps&quot; $(HostingStartupTemplateFile) /p:&quot;DepsOutputPath=$(DepsOutputPath);HostingStartupPackageName=%(HostingStartupPackageReference.Identity);HostingStartupPackageVersion=%(Version);RuntimeFrameworkVersion=$(SharedFrameworkVersion)&quot;"/>
<ItemGroup> <ItemGroup>
<PackageStoreManifestFiles Include="$(RuntimeStoreOutputPath)**\artifact.xml"> <PackageStoreManifestFiles Include="$(RuntimeStoreOutputPath)**\artifact.xml">
@ -205,7 +205,10 @@
<Target Name="_ResolveCurrentSharedFrameworkVersion"> <Target Name="_ResolveCurrentSharedFrameworkVersion">
<!-- Parse framework version --> <!-- Parse framework version -->
<Exec Command="powershell.exe $(ToolsDir)GetSharedFrameworkVersion.ps1" ConsoleToMSBuild="true"> <Exec Command="powershell.exe $(ToolsDir)GetSharedFrameworkVersion.ps1" ConsoleToMSBuild="true" Condition="'$(OS)' == 'Windows_NT'">
<Output TaskParameter="ConsoleOutput" PropertyName="SharedFrameworkVersion" />
</Exec>
<Exec Command="bash $(ToolsDir)GetSharedFrameworkVersion.sh" ConsoleToMSBuild="true" Condition="'$(OS)' != 'Windows_NT'">
<Output TaskParameter="ConsoleOutput" PropertyName="SharedFrameworkVersion" /> <Output TaskParameter="ConsoleOutput" PropertyName="SharedFrameworkVersion" />
</Exec> </Exec>
</Target> </Target>

View File

@ -0,0 +1,2 @@
#!/bin/bash
dotnet --info | grep -i version | tail -1 | cut -f 2 -d ":" | tr -d ' '