<TestContextVariable Include="MNA_VERSION=$(NETCoreAppRuntimePackageVersion)" />
<TestContextVariable Include="MNA_TFM=$(NETCoreAppFramework)" />
<TestContextVariable Include="DOTNET_SDK_PATH=$(DotNetRoot)" />
+ <TestContextVariable Include="TEST_PROJECTS_PROPS_TARGETS_FOLDER=$(MSBuildThisFileDirectory)" />
</ItemGroup>
<WriteLinesToFile
<!--
This file is imported by the test projects from the artifacts dir or the src/tests dir. It
provides basic info needed for restore and build with the vanilla SDK.
+ Since this file doesn't include the Arcade SDK, we need to find the root eng folder
+ in a different manner than using the $(RepositoryEngineeringDir) variable.
-->
- <Import Project="eng\Versions.props" />
- <Import Project="src\test\Assets\TestProjects\MNADeprecationWorkaround.props" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),global.json))\eng\Versions.props" />
+ <Import Project="Assets\TestProjects\MNADeprecationWorkaround.props" />
<PropertyGroup>
<!--
public string BuildArchitecture { get; }
public string TargetRID { get; }
public string MicrosoftNETCoreAppVersion { get; }
+ public string TestProjectsMSBuildFilesFolder { get; }
public string Configuration { get; }
public string RepoRoot { get; }
public string BaseArtifactsFolder { get; }
BuildRID = GetTestContextVariable("BUILDRID");
BuildArchitecture = GetTestContextVariable("BUILD_ARCHITECTURE");
MicrosoftNETCoreAppVersion = microsoftNETCoreAppVersion ?? GetTestContextVariable("MNA_VERSION");
+ TestProjectsMSBuildFilesFolder = GetTestContextVariable("TEST_PROJECTS_PROPS_TARGETS_FOLDER");
Configuration = GetTestContextVariable("BUILD_CONFIGURATION");
string osPlatformConfig = $"{BuildRID}.{Configuration}";
string.Join(
Environment.NewLine,
"<Project>",
- $" <Import Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), TestProjects.{type}))\\TestProjects.{type}\" />",
+ $" <Import Project=\"{RepoDirProvider.TestProjectsMSBuildFilesFolder}/TestProjects.{type}\" />",
"</Project>"));
private void EnsureFileWithContent(string path, string content)