mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
Use TargetFramework conditions consistently in libraries (#35956)
* Use TargetFramework condition consistently in libs * Add docs section to describe the guideline * Update Microsoft.Extensions.DependencyInjection.csproj * Outline TargetFramework DesingTimeBuild issue * Update Microsoft.Extensions.DependencyInjection.csproj
This commit is contained in:
1 parent
ab71303f5c
commit
2cda9035cb
56 files changed
+159
-125
No files matched your search
+2
-2
@@ -1,7 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<AllowUnsafeBlocks Condition="'$(TargetsWindows)' == 'true'">true</AllowUnsafeBlocks>
|
||||
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
|
||||
<TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;netstandard2.0;netstandard2.0-Windows_NT;net461-Windows_NT;$(NetFrameworkCurrent)-Windows_NT</TargetFrameworks>
|
||||
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
|
||||
<ExcludeCurrentFullFrameworkFromPackage>true</ExcludeCurrentFullFrameworkFromPackage>
|
||||
@@ -10,6 +8,8 @@
|
||||
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
|
||||
<PropertyGroup>
|
||||
<IsPartialFacadeAssembly Condition="$(TargetFramework.StartsWith('net4'))">true</IsPartialFacadeAssembly>
|
||||
<AllowUnsafeBlocks Condition="'$(TargetsWindows)' == 'true'">true</AllowUnsafeBlocks>
|
||||
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="!$(TargetFramework.StartsWith('$(NetCoreAppCurrent)'))">
|
||||
<Compile Include="$(CommonPath)System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs" />
|
||||
|
||||
Reference in new issue
Block a user