Attempting to actually fix the build this time. We were not pointing to the right packages cache before.

This commit is contained in:
Livar Cunha 2016-11-01 12:46:29 -07:00
parent a95ddb4074
commit c7858afc48
5 changed files with 16 additions and 24 deletions

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="test-packages" value="$fullpath$" />
</packageSources>
</configuration>

View file

@ -74,10 +74,12 @@ namespace Microsoft.DotNet.TestFramework
var thisAssembly = typeof(TestAssetInstance).GetTypeInfo().Assembly; var thisAssembly = typeof(TestAssetInstance).GetTypeInfo().Assembly;
var newNuGetConfig = Root.GetFile("Nuget.config"); var newNuGetConfig = Root.GetFile("Nuget.config");
using (var resource = thisAssembly.GetManifestResourceStream("NuGet.template.config")) var content = @"<?xml version=""1.0"" encoding=""utf-8""?>
{ <configuration>
var streamReader = new StreamReader(resource); <packageSources>
var content = streamReader.ReadToEnd(); <add key=""test-packages"" value=""$fullpath$"" />
</packageSources>
</configuration>";
content = content.Replace("$fullpath$", nugetCache); content = content.Replace("$fullpath$", nugetCache);
using (var newNuGetConfigStream = using (var newNuGetConfigStream =
@ -86,7 +88,6 @@ namespace Microsoft.DotNet.TestFramework
var contentBytes = new UTF8Encoding(true).GetBytes(content); var contentBytes = new UTF8Encoding(true).GetBytes(content);
newNuGetConfigStream.Write(contentBytes, 0, contentBytes.Length); newNuGetConfigStream.Write(contentBytes, 0, contentBytes.Length);
} }
}
return this; return this;
} }

View file

@ -2,12 +2,7 @@
"version": "1.0.0-preview3-*", "version": "1.0.0-preview3-*",
"description": "Microsoft.DotNet.TestFramework Class Library", "description": "Microsoft.DotNet.TestFramework Class Library",
"buildOptions": { "buildOptions": {
"keyFile": "../../tools/Key.snk", "keyFile": "../../tools/Key.snk"
"embed": {
"include": [
"NuGet.template.config"
]
}
}, },
"dependencies": { "dependencies": {
"Microsoft.DotNet.Cli.Utils": { "Microsoft.DotNet.Cli.Utils": {

View file

@ -122,6 +122,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var buildCommand = new BuildCommand() var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithConfiguration(configuration) .WithConfiguration(configuration)
.WithRuntime(runtime)
.WithCapturedOutput() .WithCapturedOutput()
.Execute() .Execute()
.Should().Pass(); .Should().Pass();
@ -160,6 +161,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var buildCommand = new BuildCommand() var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root) .WithWorkingDirectory(testInstance.Root)
.WithConfiguration(configuration) .WithConfiguration(configuration)
.WithRuntime(runtime)
.WithCapturedOutput() .WithCapturedOutput()
.Execute() .Execute()
.Should().Pass(); .Should().Pass();

View file

@ -68,7 +68,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages"); _nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
_pjDotnet = pjDotnet ?? GetPjDotnetPath(); _pjDotnet = pjDotnet ?? GetPjDotnetPath();
_stage2Sdk = Directory.EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk")).First(); _stage2Sdk = Directory.EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk")).First();
_testPackages = Path.Combine(_artifacts, "tests", "packages"); _testPackages = Path.Combine(RepoRoot, "artifacts", "testpackages", "packages");
} }
private string GetPjDotnetPath() private string GetPjDotnetPath()