зеркало из https://github.com/microsoft/vstest.git
152 строки
8.2 KiB
XML
152 строки
8.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project>
|
|
|
|
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
|
<Import Project="$(RepositoryEngineeringDir)Analyzers.props" />
|
|
|
|
<PropertyGroup>
|
|
<RepoRoot Condition=" '$(RepoRoot)' == '' ">$([MSBuild]::NormalizeDirectory('$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'LICENSE'))'))</RepoRoot>
|
|
<IsSourceFile>false</IsSourceFile>
|
|
<IsSourceFile Condition="$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)).StartsWith('src/')) OR $([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)).StartsWith('src\'))">true</IsSourceFile>
|
|
<SrcPackageFolder>$(RepoRoot)src\package\</SrcPackageFolder>
|
|
<Nullable>enable</Nullable>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<!--
|
|
This version is read by vsts-prebuild.ps1 and is a base for the current version, this should be updated at the start of
|
|
new iteration to the goal number. This is also used to version the local packages. This version needs to be statically
|
|
readable when we read the file as xml, don't move it to a .props file, unless you change the build server process
|
|
-->
|
|
<TPVersionPrefix>17.10.0</TPVersionPrefix>
|
|
<!--
|
|
Versioning is defined from the build script. Use a default dev build if it's not defined.
|
|
Sets the AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion
|
|
-->
|
|
<Version Condition="'$(Version)' == ''">$(TPVersionPrefix)-dev</Version>
|
|
<!-- Override the AssemblyVersion as 15.0.0 since protocol depends on this version for serialization. This is also defined in build script. -->
|
|
<AssemblyVersion Condition="'$(AssemblyVersion)' == ''">15.0.0</AssemblyVersion>
|
|
<!-- Auto generating binding redirects breaks testhost when running under net8.0 vstest.console as .NET Framework net462. -->
|
|
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
|
|
<!-- But not autogenerating binding redirects also breaks build occasionally, so we tell MSBuild to unify assembly versions,
|
|
without outputting binding redirectes. -->
|
|
<AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
|
|
</PropertyGroup>
|
|
|
|
<!-- Language configuration -->
|
|
<PropertyGroup>
|
|
<!-- default to allowing all language features -->
|
|
<LangVersion>preview</LangVersion>
|
|
<!-- enable strict mode for Roslyn compiler -->
|
|
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
|
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
|
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
|
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
|
<!-- default to max warnlevel -->
|
|
<AnalysisLevel>preview</AnalysisLevel>
|
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
<NoWarn>$(NoWarn);CA1416;RS0037</NoWarn>
|
|
</PropertyGroup>
|
|
|
|
<!-- The TFMs to build and test against. -->
|
|
<PropertyGroup>
|
|
<!-- Naming is based on dotnet/runtime one -->
|
|
<NetFrameworkMinimum>net462</NetFrameworkMinimum>
|
|
<NetCoreAppMinimum>net8.0</NetCoreAppMinimum>
|
|
<NetCoreAppStable>net9.0</NetCoreAppStable>
|
|
<!--
|
|
Arcade is making things hard to work with. This property is unset when its value is equal to NetMinimum.
|
|
https://github.com/dotnet/arcade/blob/66c9c5397d599af40f2a94989241944f5a73442a/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkDefaults.props#L16-L18
|
|
Because I don't want to complexify further the logic on VSTest just for that, I will set it to NetMinimum.
|
|
-->
|
|
<NetPrevious Condition=" $(NetPrevious) == '' ">$(NetMinimum)</NetPrevious>
|
|
|
|
<!--
|
|
vstest.console.exe is shipped with VS, we can use the version of .NET Framework that VS requires to run (this might differ from the version is requires to install).
|
|
https://learn.microsoft.com/en-us/visualstudio/releases/2022/system-requirements#additional-requirements-and-guidance
|
|
-->
|
|
<NetFrameworkRunnerTargetFramework>net48</NetFrameworkRunnerTargetFramework>
|
|
<!--
|
|
vstest.console.dll or datacollector.dll are shipped with .NET SDK, target the tfms into which we insert.
|
|
-->
|
|
<NetSDKTargetFramework>$(NetCoreAppStable)</NetSDKTargetFramework>
|
|
<!--
|
|
vstest.console.dll and datacollector.dll are shipped in TestPlatform.Portable package, that should support
|
|
the oldest currently supported .NET, because we don't know with which runtime it will be used.
|
|
vstest.console.exe and datacollector.exe are shipped in there as well, choose the lowest version of
|
|
.NET Frameowork to support as well.
|
|
-->
|
|
<NetPortableTargetFrameworks>$(NetCoreAppMinimum)</NetPortableTargetFrameworks>
|
|
<NetRunnerTargetFrameworks>$(NetSDKTargetFramework);$(NetPortableTargetFrameworks)</NetRunnerTargetFrameworks>
|
|
<RunnerTargetFrameworks>$(NetFrameworkRunnerTargetFramework);$(NetRunnerTargetFrameworks)</RunnerTargetFrameworks>
|
|
|
|
<!--
|
|
|
|
-->
|
|
<BundledExtensionTargetFrameworks>$(RunnerTargetFrameworks)</BundledExtensionTargetFrameworks>
|
|
<!--
|
|
Extensions that are shipped as standalone packages need to be netstandard2.0, because we don't know on which runtime
|
|
we will run.
|
|
|
|
This is the same for bundled extensions that are shipped together with vstest.console or datacollector. In ideal case
|
|
they would not need netstandard, but we load the same dll into .NET and .NET Framework datacollector.
|
|
So the need to target netstandard2.0 as well.
|
|
-->
|
|
<ExtensionTargetFrameworks>netstandard2.0</ExtensionTargetFrameworks>
|
|
|
|
<!--
|
|
Testhosts need to run on all currently supported target frameworks and newer.
|
|
https://learn.microsoft.com/en-us/visualstudio/releases/2022/compatibility#-visual-studio-2022-support-for-net-development
|
|
https://dotnet.microsoft.com/en-us/platform/support/policy
|
|
https://learn.microsoft.com/en-us/lifecycle/products/microsoft-net-framework
|
|
|
|
Currently that is net8 (until November 10, 2026) and .NET Framework 4.6.2 (until Jan 12, 2027).
|
|
-->
|
|
<TestHostMinimumTargetFrameworks>$(NetCoreAppMinimum);$(NetFrameworkMinimum)</TestHostMinimumTargetFrameworks>
|
|
<!--
|
|
Testhost needs to support every target framework from the minimum, and it also needs to build
|
|
all the .NET Framework target frameworks that are newer than the minimum, because we ship each of those
|
|
executables separately, and use it to load dlls into specific version of .NET Framework based on user
|
|
settings.
|
|
|
|
https://learn.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks
|
|
-->
|
|
<TestHostAllTargetFrameworks>$(TestHostMinimumTargetFrameworks);net47;net471;net472;net48;net481</TestHostAllTargetFrameworks>
|
|
|
|
<!--
|
|
Library that is loaded by others and by us. We don't know where it will run (e.b. TranslationLayer),
|
|
we need to support all frameworks from minimum, and also netstandard2.0.
|
|
-->
|
|
<LibraryTargetFrameworks>$(NetFrameworkMinimum);netstandard2.0</LibraryTargetFrameworks>
|
|
</PropertyGroup>
|
|
|
|
<!-- Build & pack config -->
|
|
<PropertyGroup>
|
|
<Copyright>$(CopyrightMicrosoft)</Copyright>
|
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
|
<!-- Prevent warning about deprecated target frameworks -->
|
|
<CheckEolTargetFramework>false</CheckEolTargetFramework>
|
|
<DefineConstants Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(DefineConstants);DOTNET_BUILD_FROM_SOURCE</DefineConstants>
|
|
<!-- PDB -->
|
|
<DebugSymbols>true</DebugSymbols>
|
|
<DebugType>embedded</DebugType>
|
|
<!-- Default to all packages generating a corresponding symbol package -->
|
|
<IncludeSymbols>true</IncludeSymbols>
|
|
<!-- Workaround for AD0001 in analyzers with .NET 9. See https://github.com/dotnet/arcade/issues/14311 -->
|
|
<BuildWithNetFrameworkHostedCompiler>true</BuildWithNetFrameworkHostedCompiler>
|
|
</PropertyGroup>
|
|
|
|
<!-- Sign config -->
|
|
<PropertyGroup>
|
|
<StrongNameKeyId>Microsoft</StrongNameKeyId>
|
|
</PropertyGroup>
|
|
|
|
<!-- Test config -->
|
|
<PropertyGroup>
|
|
<TestRunnerName>MSTest</TestRunnerName>
|
|
<!-- Skip windows only tests on non-windows systems. -->
|
|
<TestRunnerAdditionalArguments Condition=" '$(OS)' != 'Windows_NT' ">$(TestRunnerAdditionalArguments) --filter "TestCategory!=Windows&TestCategory!=Windows-Review"</TestRunnerAdditionalArguments>
|
|
</PropertyGroup>
|
|
|
|
</Project>
|