Generate RuntimeFrameworkVersion for function tests
This commit is contained in:
Родитель
ec87551415
Коммит
6f7e8010bf
|
@ -0,0 +1,18 @@
|
|||
<Project>
|
||||
<Target Name="GenerateTestProps" AfterTargets="Build">
|
||||
<PropertyGroup>
|
||||
<TestPropsContent>
|
||||
<![CDATA[
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<RuntimeFrameworkVersion Condition="'%24(TargetFramework)' == 'netcoreapp2.0'">$(MicrosoftNETCoreApp20PackageVersion)</RuntimeFrameworkVersion>
|
||||
<RuntimeFrameworkVersion Condition="'%24(TargetFramework)' == 'netcoreapp2.1'">$(MicrosoftNETCoreApp21PackageVersion)</RuntimeFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
]]>
|
||||
</TestPropsContent>
|
||||
</PropertyGroup>
|
||||
<MakeDir Directories="$(OutputPath)TestResources/" />
|
||||
<WriteLinesToFile File="$(OutputPath)TestResources/Directory.Build.targets" Lines="$(TestPropsContent)" Overwrite="true" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -26,4 +26,5 @@
|
|||
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="GenerateTestProps.targets" />
|
||||
</Project>
|
||||
|
|
|
@ -25,6 +25,8 @@ namespace KoreBuild.FunctionalTests
|
|||
Directory.CreateDirectory(workDir);
|
||||
CopyRecursive(templateDir, workDir);
|
||||
CopyRecursive(source, workDir);
|
||||
var db = Path.Combine(AppContext.BaseDirectory, "TestResources", "Directory.Build.targets");
|
||||
File.Copy(db, Path.Combine(workDir, "Directory.Build.targets"), overwrite: true);
|
||||
}
|
||||
|
||||
public string WorkingDirectory { get; }
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
<!--
|
||||
This file will be replaced during tests runs.
|
||||
It's here in source just to keep local dev work isolated from KoreBuild's context. -->
|
||||
<Project />
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
<!--
|
||||
This file will be replaced during tests runs.
|
||||
It's here in source just to keep local dev work isolated from KoreBuild's context. -->
|
||||
<Project />
|
||||
|
|
Загрузка…
Ссылка в новой задаче