Skip to content

Commit d1c2fd4

Browse files
committed
Close test coverage gap on full framework msbuild
1 parent 411f959 commit d1c2fd4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopExe.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,33 @@ public void It_appends_rid_to_outdir_correctly(string identifier, string rid, bo
173173
}
174174
}
175175

176+
[Fact]
177+
public void It_builds_multitargeted_with_default_rid()
178+
{
179+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
180+
{
181+
return;
182+
}
183+
184+
var testAsset = _testAssetsManager
185+
.CopyTestAsset("HelloWorld")
186+
.WithSource()
187+
.WithProjectChanges(project =>
188+
{
189+
var ns = project.Root.Name.Namespace;
190+
var propertyGroup = project.Root.Elements(ns + "PropertyGroup").First();
191+
propertyGroup.Element(ns + "TargetFramework").Remove();
192+
propertyGroup.Add(new XElement(ns + "TargetFrameworks", "net46;netcoreapp1.1"));
193+
})
194+
.Restore();
195+
196+
var buildCommand = new BuildCommand(Stage0MSBuild, testAsset.TestRoot);
197+
buildCommand
198+
.Execute()
199+
.Should()
200+
.Pass();
201+
}
202+
176203
[Theory]
177204
[InlineData("win7-x86", "x86")]
178205
[InlineData("win8-x86-aot", "x86")]

0 commit comments

Comments
 (0)