diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs index b0c42979ff47..0f4e0b43b8fb 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs @@ -678,6 +678,8 @@ public void ILLink_shows_single_warning_for_packagereferences_only(string target .CopyTestAsset(testAssetName, identifier: targetFramework) .WithSource(); + NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); + var publishCommand = new PublishCommand(testAsset, "App"); publishCommand.Execute($"/p:RuntimeIdentifier={rid}") .Should().Pass() @@ -701,6 +703,8 @@ public void ILLink_accepts_option_to_show_all_warnings(string targetFramework) .CopyTestAsset(testAssetName, identifier: targetFramework) .WithSource(); + NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); + var publishCommand = new PublishCommand(testAsset, "App"); publishCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:TrimmerSingleWarn=false") .Should().Pass() @@ -727,6 +731,8 @@ public void ILLink_can_show_single_warning_per_assembly(string targetFramework) SetMetadata(project, "App", "TrimmerSingleWarn", "true"); }); + NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); + var publishCommand = new PublishCommand(testAsset, "App"); publishCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:TrimmerSingleWarn=false") .Should().Pass() diff --git a/test/TestAssets/TestProjects/TrimmedAppWithReferences/App/App.csproj b/test/TestAssets/TestProjects/TrimmedAppWithReferences/App/App.csproj index 41c2eaa9f450..6ab132e7bb82 100644 --- a/test/TestAssets/TestProjects/TrimmedAppWithReferences/App/App.csproj +++ b/test/TestAssets/TestProjects/TrimmedAppWithReferences/App/App.csproj @@ -9,10 +9,9 @@ - +