forked from dotnet/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not transform solution project dependencies into ProjectReference …
…dependencies Fixes dotnet#7075 Fixes dotnet/msbuild#2274
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...oft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithSolutionTypeProjectDependencies.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright (c) .NET Foundation and contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.IO; | ||
using Microsoft.NET.TestFramework; | ||
using Microsoft.NET.TestFramework.Assertions; | ||
using Microsoft.NET.TestFramework.Commands; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace Microsoft.NET.Build.Tests | ||
{ | ||
public class GivenThatWeWantToBuildASolutionWithSolutionTypeProjectDependencies : SdkTest | ||
{ | ||
public GivenThatWeWantToBuildASolutionWithSolutionTypeProjectDependencies(ITestOutputHelper log) : base(log) | ||
{ | ||
} | ||
|
||
[Fact] | ||
public void It_builds_solution_successfully() | ||
{ | ||
var testAsset = _testAssetsManager | ||
.CopyTestAsset("SolutionBasedProjectDependencies") | ||
.WithSource(); | ||
|
||
testAsset.Restore(Log, Path.Combine(testAsset.TestRoot, "SolutionWithProjectDependency.sln")); | ||
|
||
var buildCommand = new BuildCommand(Log, testAsset.TestRoot, "SolutionWithProjectDependency.sln"); | ||
buildCommand | ||
.Execute() | ||
.Should() | ||
.Pass(); | ||
|
||
var netCoreProjectOutput = new DirectoryInfo(Path.Combine(testAsset.Path, "Core", "bin", "Debug", "netcoreapp1.1")); | ||
var fullFrameworkProjectOutput = new DirectoryInfo(Path.Combine(testAsset.Path, "FF", "bin", "Debug", "net451")); | ||
|
||
netCoreProjectOutput | ||
.Should() | ||
.OnlyHaveFiles(new[] { | ||
"Core.runtimeconfig.dev.json", | ||
"Core.runtimeconfig.json", | ||
"Core.deps.json", | ||
"Core.dll", | ||
"Core.pdb" | ||
}); | ||
|
||
fullFrameworkProjectOutput | ||
.Should() | ||
.OnlyHaveFiles(new[] { | ||
"FF.exe", | ||
"FF.pdb" | ||
}); | ||
} | ||
} | ||
} |