Fixing recent ProCon test failures.

This commit is contained in:
jbeisner 2018-06-29 20:10:19 +00:00
parent b29e49e26e
commit ce5493b7d6
4 changed files with 14 additions and 7 deletions

View file

@ -13,11 +13,18 @@
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<Target Name="WriteVersionsFile" BeforeTargets="Restore">
<Target Name="WriteDefaultPatchVersionsFile" BeforeTargets="Restore">
<WriteLinesToFile
File="$(MSBuildThisFileDirectory)/.DefaultPatchVersionForAspNetCoreApp2_1"
Lines="$(DefaultPatchVersionForAspNetCoreApp2_1)"
Overwrite="true"/>
</Target>
<Target Name="WriteBundledVersionsFile" BeforeTargets="Restore">
<WriteLinesToFile
File="$(MSBuildThisFileDirectory)/.BundledAspNetCoreVersion"
Lines="$(MicrosoftAspNetCoreAppPackageVersion)"
Overwrite="true"/>
</Target>
</Project>

View file

@ -48,11 +48,11 @@ namespace EndToEnd
var restoredVersion = GetAspNetCoreAppVersion(assetsFile, portable: true);
restoredVersion.Should().NotBeNull();
var bundledVersionPath = Path.Combine(projectDirectory, ".BundledAspNetCoreVersion");
var bundledVersionPath = Path.Combine(projectDirectory, ".DefaultPatchVersionForAspNetCoreApp2_1");
var bundledVersion = File.ReadAllText(bundledVersionPath).Trim();
restoredVersion.ToNormalizedString().Should().BeEquivalentTo(bundledVersion,
"The bundled aspnetcore versions set in Microsoft.NETCoreSdk.BundledVersions.props should be idenitical to the versions set in DependencyVersions.props." +
"The bundled aspnetcore versions set in Microsoft.NETCoreSdk.BundledVersions.props should be identical to the versions generated." +
"Please update MSBuildExtensions.targets in this repo so these versions match.");
}
@ -98,7 +98,7 @@ namespace EndToEnd
var bundledVersion = File.ReadAllText(bundledVersionPath).Trim();
restoredVersion.ToNormalizedString().Should().BeEquivalentTo(bundledVersion,
"The bundled aspnetcore versions set in Microsoft.NETCoreSdk.BundledVersions.props should be idenitical to the versions set in DependencyVersions.props." +
"The bundled aspnetcore versions set in Microsoft.NETCoreSdk.BundledVersions.props should be identical to the versions set in DependencyVersions.props." +
"Please update MSBuildExtensions.targets in this repo so these versions match.");
}

View file

@ -304,7 +304,7 @@ namespace Microsoft.DotNet.Tests
result.Should().NotBeNull();
result.Args.Should().Contain("--fx-version 2.1.1");
result.Args.Should().Contain("--fx-version 2.1");
}
[Fact]

View file

@ -106,7 +106,7 @@ namespace Microsoft.DotNet.New.Tests
var sharedFxDir = dotnetDir
.GetDirectory("shared", "Microsoft.NETCore.App")
.EnumerateDirectories()
.Single(d => d.Name.StartsWith("2.1.1"));
.Single(d => d.Name.StartsWith("2.1"));
if (packageName == "microsoft.netcore.app")
{