diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index 649ad3e25bf2d..e31fc4e0acdbb 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -42,6 +42,7 @@ %(Identity) + diff --git a/src/installer/tests/Assets/TestProjects/LightupClient/LightupClient.csproj b/src/installer/tests/Assets/TestProjects/LightupClient/LightupClient.csproj index f413febe3ff59..06ac4b1d7256b 100644 --- a/src/installer/tests/Assets/TestProjects/LightupClient/LightupClient.csproj +++ b/src/installer/tests/Assets/TestProjects/LightupClient/LightupClient.csproj @@ -4,6 +4,7 @@ $(NetCoreAppCurrent) Exe $(MNAVersion) + true diff --git a/src/installer/tests/HostActivation.Tests/PortableAppActivation.cs b/src/installer/tests/HostActivation.Tests/PortableAppActivation.cs index a2a0d963e1f09..fa3e03bd97201 100644 --- a/src/installer/tests/HostActivation.Tests/PortableAppActivation.cs +++ b/src/installer/tests/HostActivation.Tests/PortableAppActivation.cs @@ -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; diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs index 3aa8886babe37..e3dc7a14a2ee8 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs @@ -400,7 +400,7 @@ static CoreFxFileStatusProvider() try { s_fileSystem_fileStatusField = typeof(FileSystemInfo).GetField("_fileStatus", BindingFlags.NonPublic | BindingFlags.Instance); - s_fileStatus_fileStatusField = s_fileSystem_fileStatusField.FieldType.GetField("_fileStatus", BindingFlags.NonPublic | BindingFlags.Instance); + s_fileStatus_fileStatusField = s_fileSystem_fileStatusField.FieldType.GetField("_fileCache", BindingFlags.NonPublic | BindingFlags.Instance); s_fileStatusModeField = s_fileStatus_fileStatusField.FieldType.GetField("Mode", BindingFlags.NonPublic | BindingFlags.Instance); } catch (Exception ex) diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.props b/src/mono/wasm/build/WasmApp.LocalBuild.props index ea5624a159137..ea87a8bb8ec0e 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.props +++ b/src/mono/wasm/build/WasmApp.LocalBuild.props @@ -23,6 +23,7 @@ <_NetCoreAppToolCurrent>net6.0 + false diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs index a8f67d09eb689..2212d57b2377e 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs @@ -95,6 +95,9 @@ public BuildEnvironment() DefaultBuildArgs = $" /p:RuntimeSrcDir={solutionRoot.FullName} /p:RuntimeConfig={s_runtimeConfig} /p:EMSDK_PATH={emsdkPath} "; } + // for EMSDK runs, we don't want to get the dependencies from workloads + DefaultBuildArgs += " /p:MSBuildEnableWorkloadResolver=false"; + IsWorkload = false; DotNet = "dotnet"; EnvVars = new Dictionary() diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Local.Directory.Build.props b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Local.Directory.Build.props index 1a9c112e747d9..3282feb5b3553 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Local.Directory.Build.props +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Local.Directory.Build.props @@ -1,5 +1,8 @@ + + false + <_WasmTargetsDir Condition="'$(RuntimeSrcDir)' != ''">$(RuntimeSrcDir)\src\mono\wasm\build\ <_WasmTargetsDir Condition="'$(WasmBuildSupportDir)' != ''">$(WasmBuildSupportDir)\wasm\ $(WasmBuildSupportDir)\emsdk\ diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index d44f83d429204..7031b45d72e95 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -275,7 +275,7 @@ else __Command+=" dotnet" fi -$__Command msbuild $CORE_ROOT/wasm-test-runner/WasmTestRunner.proj /p:NetCoreAppCurrent=$(NetCoreAppCurrent) /p:TestAssemblyFileName=$(MsBuildProjectName).dll /p:TestBinDir=`pwd` || exit $? +$__Command msbuild $CORE_ROOT/wasm-test-runner/WasmTestRunner.proj /p:NetCoreAppCurrent=$(NetCoreAppCurrent) /p:TestAssemblyFileName=$(MsBuildProjectName).dll /p:TestBinDir=`pwd` $(CLRTestMSBuildArgs) || exit $? ]]> diff --git a/src/tests/Directory.Build.props b/src/tests/Directory.Build.props index f00de4d102e50..6841b4938e70b 100644 --- a/src/tests/Directory.Build.props +++ b/src/tests/Directory.Build.props @@ -149,4 +149,8 @@ as we do with many of the package versions above --> 2.1.0-preview3-26416-01 + + + /p:MSBuildEnableWorkloadResolver=false +