diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.props b/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.props index a8fd34dd3221..f00698d03d6c 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.props +++ b/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.props @@ -127,6 +127,13 @@ Copyright (c) .NET Foundation. All rights reserved. $(DotnetHostPath) + + + + false + + diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithSolutionTypeProjectDependencies.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithSolutionTypeProjectDependencies.cs new file mode 100644 index 000000000000..59bf2d47ca91 --- /dev/null +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASolutionWithSolutionTypeProjectDependencies.cs @@ -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" + }); + } + } +}