[release/3.1] Add .version file to shared framework zip (#21548)
* Add .version file to shared framework zip * Fix test
This commit is contained in:
parent
f0e8ccf2c8
commit
9e2a480925
|
|
@ -67,7 +67,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
<!-- There is no way to suppress the .dev.runtimeconfig.json generation. -->
|
<!-- There is no way to suppress the .dev.runtimeconfig.json generation. -->
|
||||||
<ProjectRuntimeConfigDevFilePath>$(IntermediateOutputPath)ignoreme.dev.runtimeconfig.json</ProjectRuntimeConfigDevFilePath>
|
<ProjectRuntimeConfigDevFilePath>$(IntermediateOutputPath)ignoreme.dev.runtimeconfig.json</ProjectRuntimeConfigDevFilePath>
|
||||||
|
|
||||||
<VersionFileIntermediateOutputPath>$(IntermediateOutputPath)$(SharedFxName).versions.txt</VersionFileIntermediateOutputPath>
|
<VersionTxtFileIntermediateOutputPath>$(IntermediateOutputPath)$(SharedFxName).versions.txt</VersionTxtFileIntermediateOutputPath>
|
||||||
|
<DotVersionFileIntermediateOutputPath>$(IntermediateOutputPath).version</DotVersionFileIntermediateOutputPath>
|
||||||
|
|
||||||
<!-- The project representing the shared framework doesn't produce a .NET assembly or symbols. -->
|
<!-- The project representing the shared framework doesn't produce a .NET assembly or symbols. -->
|
||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
|
|
@ -256,7 +257,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<WriteLinesToFile
|
<WriteLinesToFile
|
||||||
File="$(VersionFileIntermediateOutputPath)"
|
File="$(VersionTxtFileIntermediateOutputPath)"
|
||||||
|
Lines="@(VersionLines)"
|
||||||
|
Overwrite="true" />
|
||||||
|
|
||||||
|
<WriteLinesToFile
|
||||||
|
File="$(DotVersionFileIntermediateOutputPath)"
|
||||||
Lines="@(VersionLines)"
|
Lines="@(VersionLines)"
|
||||||
Overwrite="true" />
|
Overwrite="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
@ -397,7 +403,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
|
|
||||||
<Target Name="_ResolveSharedFrameworkContent" DependsOnTargets="ResolveReferences;Crossgen">
|
<Target Name="_ResolveSharedFrameworkContent" DependsOnTargets="ResolveReferences;Crossgen">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<SharedFxContent Include="$(VersionFileIntermediateOutputPath)" />
|
<SharedFxContent Include="$(DotVersionFileIntermediateOutputPath)" />
|
||||||
<SharedFxContent Include="$(ProjectDepsFilePath)" />
|
<SharedFxContent Include="$(ProjectDepsFilePath)" />
|
||||||
<SharedFxContent Include="$(ProjectRuntimeConfigFilePath)" />
|
<SharedFxContent Include="$(ProjectRuntimeConfigFilePath)" />
|
||||||
<SharedFxContent Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' != '.pdb'" />
|
<SharedFxContent Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' != '.pdb'" />
|
||||||
|
|
@ -496,7 +502,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
BeforeTargets="_GetPackageFiles">
|
BeforeTargets="_GetPackageFiles">
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="$(VersionFileIntermediateOutputPath)" Pack="true" PackagePath="." />
|
<None Include="$(VersionTxtFileIntermediateOutputPath)" Pack="true" PackagePath="." />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ namespace Microsoft.AspNetCore
|
||||||
[Fact]
|
[Fact]
|
||||||
public void ItContainsVersionFile()
|
public void ItContainsVersionFile()
|
||||||
{
|
{
|
||||||
var versionFile = Path.Combine(_sharedFxRoot, "Microsoft.AspNetCore.App.versions.txt");
|
var versionFile = Path.Combine(_sharedFxRoot, ".version");
|
||||||
AssertEx.FileExists(versionFile);
|
AssertEx.FileExists(versionFile);
|
||||||
var lines = File.ReadAllLines(versionFile);
|
var lines = File.ReadAllLines(versionFile);
|
||||||
Assert.Equal(2, lines.Length);
|
Assert.Equal(2, lines.Length);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue