5b5d69c95d
This change is to add Sdk.props and Sdk.targets of Microsoft.Docker.Sdk into CLI. This unblocks the scenario where a VS solution contains a few .NET Core projects as well as a docker-compose.dcproj project and people want to build the solution from command line with .NET Core CLI. With the Sdk.props and Sdk.targets being present in CLI, building docker-compose.dcproj becomes no-op so it won't block building the other .NET Core projects.
32 lines
No EOL
1 KiB
C#
32 lines
No EOL
1 KiB
C#
// 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 FluentAssertions;
|
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
|
using Xunit;
|
|
|
|
namespace Microsoft.DotNet.Cli.Build.Tests
|
|
{
|
|
public class GivenDotnetBuildBuildsDcproj : TestBase
|
|
{
|
|
[Fact]
|
|
public void ItPrintsBuildSummary()
|
|
{
|
|
var testAppName = "docker-compose";
|
|
var testInstance = TestAssets.Get(testAppName)
|
|
.CreateInstance(testAppName)
|
|
.WithSourceFiles()
|
|
.WithRestoreFiles();
|
|
|
|
string expectedBuildSummary = @"Build succeeded.
|
|
0 Warning(s)
|
|
0 Error(s)";
|
|
|
|
var cmd = new BuildCommand()
|
|
.WithWorkingDirectory(testInstance.Root)
|
|
.ExecuteWithCapturedOutput();
|
|
cmd.Should().Pass();
|
|
cmd.StdOut.Should().ContainVisuallySameFragment(expectedBuildSummary);
|
|
}
|
|
}
|
|
} |