Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eng/BeforeTargetFrameworkInference.targets')
-rw-r--r--eng/BeforeTargetFrameworkInference.targets19
1 files changed, 18 insertions, 1 deletions
diff --git a/eng/BeforeTargetFrameworkInference.targets b/eng/BeforeTargetFrameworkInference.targets
index 60b41284548..70de3444b58 100644
--- a/eng/BeforeTargetFrameworkInference.targets
+++ b/eng/BeforeTargetFrameworkInference.targets
@@ -1,5 +1,22 @@
<Project>
- <Import Project="$(MSBuildThisDirectory)targetframeworksuffix.props" Condition="'$(DesignTimeBuild)' == 'true'" />
+ <PropertyGroup>
+ <TargetPlatformSupported>true</TargetPlatformSupported>
+ <TargetPlatformVersionSupported>true</TargetPlatformVersionSupported>
+
+ <!-- Value of 0.0 produces versionless SupportedOSPlatform attribute.
+ This is required for platforms not expected to have a version,
+ and we currently omit the version for all platforms. -->
+ <SupportedOSPlatformVersion>0.0</SupportedOSPlatformVersion>
+
+ <!-- Disable setting a default Windows platform for .NETStandard and .NET Framework libraries.
+ This ensures that the TargetPlatformIdentifier property is empty for non .NETCoreApp tfms. -->
+ <_EnableDefaultWindowsPlatform>false</_EnableDefaultWindowsPlatform>
+ <_targetPlatformIdentifier Condition="$(TargetFramework.Contains('-'))">$(TargetFramework.SubString($([MSBuild]::Add($(TargetFramework.IndexOf('-')), 1))))</_targetPlatformIdentifier>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(_targetPlatformIdentifier)' != '' and '$(_targetPlatformIdentifier)' != 'windows'">
+ <TargetPlatformVersion>1.0</TargetPlatformVersion>
+ </PropertyGroup>
</Project>