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

View file

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

View file

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

View file

@ -68,7 +68,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
_pjDotnet = pjDotnet ?? GetPjDotnetPath();
_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()