Skip to content

Commit

Permalink
Fix host tests after upgrade to P5
Browse files Browse the repository at this point in the history
In P5 we don't generate .runtimeconfig.dev.json anymore. Some tests started to fail because they relied on the .runtime.dev.json to include local nuget cache in the probing paths.

I changed one of those tests to force-generate .runtimeconfig.dev.json as for the tested scenario it seems to make sense. For the other test I modified it to copy the necessary dependency into the right location instead.
  • Loading branch information
vitek-karas committed Jul 19, 2021
1 parent d0d93fb commit 077b500
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,15 @@ public void Muxer_Exec_activation_of_Build_Output_Portable_DLL_with_DepsJson_Rem
var fixture = sharedTestState.PortableAppFixture_Built
.Copy();

// Move the .deps.json to a subdirectory, note that in this case we have to move all of the app's dependencies
// along with it - in this case Newtonsoft.Json.dll
// For framework dependent apps (dotnet build produces those) the probing directories are:
// - The directory where the .deps.json is
// - Any framework directory
var depsJson = MoveDepsJsonToSubdirectory(fixture);
File.Move(
Path.Combine(Path.GetDirectoryName(fixture.TestProject.AppDll), "Newtonsoft.Json.dll"),
Path.Combine(Path.GetDirectoryName(depsJson), "Newtonsoft.Json.dll"));

var dotnet = fixture.BuiltDotnet;
var appDll = fixture.TestProject.AppDll;
Expand Down

0 comments on commit 077b500

Please sign in to comment.