Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->
<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. -->
<DebugType>none</DebugType>
Expand Down Expand Up @@ -259,7 +260,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant
</ItemGroup>

<WriteLinesToFile
File="$(VersionFileIntermediateOutputPath)"
File="$(VersionTxtFileIntermediateOutputPath)"
Lines="@(VersionLines)"
Overwrite="true" />

<WriteLinesToFile
File="$(DotVersionFileIntermediateOutputPath)"
Lines="@(VersionLines)"
Overwrite="true" />
</Target>
Expand Down Expand Up @@ -402,7 +408,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant

<Target Name="_ResolveSharedFrameworkContent" DependsOnTargets="ResolveReferences;Crossgen">
<ItemGroup>
<SharedFxContent Include="$(VersionFileIntermediateOutputPath)" />
<SharedFxContent Include="$(DotVersionFileIntermediateOutputPath)" />
<SharedFxContent Include="$(ProjectDepsFilePath)" />
<SharedFxContent Include="$(ProjectRuntimeConfigFilePath)" />
<SharedFxContent Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' != '.pdb'" />
Expand Down Expand Up @@ -501,7 +507,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
BeforeTargets="_GetPackageFiles">

<ItemGroup>
<None Include="$(VersionFileIntermediateOutputPath)" Pack="true" PackagePath="." />
<None Include="$(VersionTxtFileIntermediateOutputPath)" Pack="true" PackagePath="." />
</ItemGroup>
</Target>

Expand Down
4 changes: 3 additions & 1 deletion src/Framework/test/SharedFxTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class SharedFxTests
{
private readonly string _expectedTfm;
private readonly string _expectedRid;
private readonly string _expectedVersionFileName;
private readonly string _sharedFxRoot;
private readonly ITestOutputHelper _output;

Expand All @@ -26,6 +27,7 @@ public SharedFxTests(ITestOutputHelper output)
_sharedFxRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH"))
? Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", TestData.GetTestDataValue("RuntimePackageVersion"))
: Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH");
_expectedVersionFileName = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH")) ? ".version" : "Microsoft.AspNetCore.App.versions.txt";
}

[Fact]
Expand Down Expand Up @@ -133,7 +135,7 @@ public void ItContainsValidDepsJson()
[Fact]
public void ItContainsVersionFile()
{
var versionFile = Path.Combine(_sharedFxRoot, "Microsoft.AspNetCore.App.versions.txt");
var versionFile = Path.Combine(_sharedFxRoot, _expectedVersionFileName);
AssertEx.FileExists(versionFile);
var lines = File.ReadAllLines(versionFile);
Assert.Equal(2, lines.Length);
Expand Down