Fixing the build.

This commit is contained in:
Livar Cunha 2017-04-08 00:29:20 -07:00
parent e286c65d25
commit c8b042fd1b
5 changed files with 31 additions and 13 deletions

View file

@ -28,7 +28,7 @@
Condition="!Exists('$(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive)')">
<Url>$(BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl)/$(BackwardsCompatibility110CombinedFrameworkHostCompressedFileName)</Url>
<DownloadFileName>$(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive)</DownloadFileName>
<ExtractDestination>$(BackwardsCompatibilitySharedFrameworksPublishDirectory)</ExtractDestination>
<ExtractDestination>$(BackwardsCompatibleSharedFrameworksPublishDirectory)</ExtractDestination>
<!-- don't overwrite the destination because there can be multiple shared fx's and they need to be combined -->
<OverwriteDestination>False</OverwriteDestination>
</_DownloadAndExtractItem>

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<BaseOutputDirectory>$(RepoRoot)/artifacts/$(Rid)</BaseOutputDirectory>
<OutputDirectory>$(BaseOutputDirectory)/stage2</OutputDirectory>
<Stage2WithBackwardsCompatibilityRuntimesOutputDirectory>$(BaseOutputDirectory)/stage2WithBackwardsCompatibilityRuntimes</Stage2WithBackwardsCompatibilityRuntimesOutputDirectory>
<Stage2WithBackwardsCompatibleRuntimesOutputDirectory>$(BaseOutputDirectory)/stage2WithBackwardsCompatibleRuntimes</Stage2WithBackwardsCompatibleRuntimesOutputDirectory>
<SdkOutputDirectory>$(OutputDirectory)/sdk/$(SdkVersion)</SdkOutputDirectory>
<SymbolsDirectory>$(BaseOutputDirectory)/stage2symbols</SymbolsDirectory>
<RoslynDirectory>$(SdkOutputDirectory)/Roslyn</RoslynDirectory>
@ -10,7 +10,7 @@
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
<BackwardsCompatibilitySharedFrameworksPublishDirectory>$(IntermediateDirectory)/backwardsCompatibilitySharedFrameworksPublish</BackwardsCompatibilitySharedFrameworksPublishDirectory>
<BackwardsCompatibleSharedFrameworksPublishDirectory>$(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish</BackwardsCompatibleSharedFrameworksPublishDirectory>
<TestOutputDir>$(RepoRoot)/artifacts/testpackages/</TestOutputDir>
<DotnetInOutputDirectory>$(OutputDirectory)/dotnet$(ExeExtension)</DotnetInOutputDirectory>
<GeneratedMSBuildExtensionsDirectory>$(IntermediateDirectory)/GeneratedMSBuildExtensions</GeneratedMSBuildExtensionsDirectory>

View file

@ -224,20 +224,20 @@
<Delete Files="@(PdbsToClean)" />
</Target>
<Target Name="PublishStage2WithLegacyRuntime"
<Target Name="PublishStage2WithBackwardsCompatibleRuntimes"
AfterTargets="PublishLzmaArchive;">
<ItemGroup>
<LegacySharedFramework Remove="*" />
<LegacySharedFramework Include="$(LegacySharedFrameworkPublishDirectory)/**/*" />
<BackwardsCompatibleSharedFrameworks Remove="*" />
<BackwardsCompatibleSharedFrameworks Include="$(BackwardsCompatibleSharedFrameworksPublishDirectory)/**/*" />
<Stage2Cli Remove="*" />
<Stage2Cli Include="$(OutputDirectory)/**/*" />
</ItemGroup>
<Copy SourceFiles="@(LegacySharedFramework)"
DestinationFiles="@(LegacySharedFramework->'$(Stage2WithLegacyRuntimeOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(BackwardsCompatibleSharedFrameworks)"
DestinationFiles="@(BackwardsCompatibleSharedFrameworks->'$(Stage2WithBackwardsCompatibleRuntimesOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(Stage2Cli)"
DestinationFiles="@(Stage2Cli->'$(Stage2WithLegacyRuntimeOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
DestinationFiles="@(Stage2Cli->'$(Stage2WithBackwardsCompatibleRuntimesOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
</Project>

View file

@ -100,7 +100,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
_pjDotnet = pjDotnet ?? GetPjDotnetPath();
_stage2Sdk = Directory.EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk")).First();
_stage2WithBackwardsCompatibleRuntimesDirectory =
Path.Combine(_artifacts, "stage2WithBackwardsCompatibilityRuntimes");
Path.Combine(_artifacts, "stage2WithBackwardsCompatibleRuntimes");
_testPackages = Path.Combine(RepoRoot, "artifacts", "testpackages", "packages");
}

View file

@ -406,7 +406,7 @@ namespace Microsoft.DotNet.Migration.Tests
"The 'resourceFiles' option is deprecated. Use 'embed' in 'buildOptions' instead.");
}
[RequiresSpecificFrameworkFact("netcoreapp1.0")]
[Fact]
public void MigratingDeprecatedResource()
{
var projectDirectory = TestAssets
@ -431,6 +431,12 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug")
.Should().Pass();
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.1"))
{
// running the app requires netcoreapp1.1
return;
}
var cmd = new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug");
@ -458,7 +464,7 @@ namespace Microsoft.DotNet.Migration.Tests
"The 'resourceBuiltIn' option is deprecated. Use 'embed' in 'buildOptions' instead.");
}
[RequiresSpecificFrameworkFact("netcoreapp1.0")]
[Fact]
public void MigratingDeprecatedResourceBuiltIn()
{
var projectDirectory = TestAssets
@ -483,6 +489,12 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug")
.Should().Pass();
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.1"))
{
// running the app requires netcoreapp1.1
return;
}
var cmd = new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug");
@ -510,7 +522,7 @@ namespace Microsoft.DotNet.Migration.Tests
"The 'resourceExclude' option is deprecated. Use 'embed' in 'buildOptions' instead.");
}
[RequiresSpecificFrameworkFact("netcoreapp1.0")]
[Fact]
public void MigratingDeprecatedResourceExclude()
{
var projectDirectory = TestAssets
@ -534,6 +546,12 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug")
.Should().Pass();
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.1"))
{
// running the app requires netcoreapp1.1
return;
}
var cmd = new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug");