File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
PolySharp.TypeForwards.Tests Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFrameworks >net472;net48;net481;netstandard2.0;net6.0;net7 .0;net8 .0</TargetFrameworks >
4+ <TargetFrameworks >net472;net48;net481;netstandard2.0;netstandard2.1;net8 .0;net9 .0</TargetFrameworks >
55 <RestoreSources >
66 https://api.nuget.org/v3/index.json;
77 ..\..\artifacts;
1111
1212 <ItemGroup >
1313 <PackageReference Include =" PolySharp" Version =" $(PackageVersion)" />
14- <PackageReference Include =" System.Memory" Version =" 4.5.5" Condition =" '$(TargetFramework)' == 'net472' OR '$(TargetFramework)' == 'net48' OR ' $(TargetFramework)' == 'net481' OR '$(TargetFramework)' == 'netstandard2 .0'" />
14+ <PackageReference Include =" System.Memory" Version =" 4.5.5" Condition =" !$([MSBuild]::IsTargetFrameworkCompatible(' $(TargetFramework)', 'net8 .0')) " />
1515 </ItemGroup >
1616
1717 <ItemGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFrameworks >net472;net48;netstandard2.0;netstandard2.1;net6.0;net7.0 ;net8.0;net9.0</TargetFrameworks >
4+ <TargetFrameworks >net472;net48;net481; netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks >
55 <PolySharpIncludeRuntimeSupportedAttributes >true</PolySharpIncludeRuntimeSupportedAttributes >
66 </PropertyGroup >
77
88 <ItemGroup >
99 <CompilerVisibleProperty Include =" PolySharpIncludeRuntimeSupportedAttributes" />
1010 </ItemGroup >
1111
12- <ItemGroup Condition =" '$(TargetFramework)' == 'net472' OR '$(TargetFramework)' == 'net48' OR ' $(TargetFramework)' == 'netstandard2 .0'" >
12+ <ItemGroup Condition =" !$([MSBuild]::IsTargetFrameworkCompatible(' $(TargetFramework)', 'net8 .0')) " >
1313 <PackageReference Include =" System.Memory" Version =" 4.5.5" />
1414 </ItemGroup >
1515
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFrameworks >net472;net48;net6.0;net7 .0;net8 .0</TargetFrameworks >
4+ <TargetFrameworks >net472;net48;net481;net8 .0;net9 .0</TargetFrameworks >
55 <NoWarn >$(NoWarn);CS1591</NoWarn >
66 <PolySharpUsePublicAccessibilityForGeneratedTypes >true</PolySharpUsePublicAccessibilityForGeneratedTypes >
77 </PropertyGroup >
1616 <PackageReference Include =" MSTest.TestFramework" Version =" 3.6.2" />
1717 </ItemGroup >
1818
19- <ItemGroup Condition =" '$(TargetFramework)' == 'net472' OR ' $(TargetFramework)' == 'net48' " >
19+ <ItemGroup Condition =" !$([MSBuild]::IsTargetFrameworkCompatible(' $(TargetFramework)', 'net8.0')) " >
2020 <PackageReference Include =" System.Memory" Version =" 4.5.5" />
2121 </ItemGroup >
2222
Original file line number Diff line number Diff line change 11using System ;
22using System . Linq ;
33using System . Reflection ;
4- #if NET6_0_OR_GREATER
4+ #if NET8_0_OR_GREATER
55using System . Runtime . CompilerServices ;
66#endif
77using Microsoft . VisualStudio . TestTools . UnitTesting ;
@@ -14,7 +14,7 @@ public class TypeForwardTests
1414 [ TestMethod ]
1515 public void Index_IsForwarded ( )
1616 {
17- #if NET6_0_OR_GREATER
17+ #if NET8_0_OR_GREATER
1818 Assert . AreEqual ( typeof ( object ) . Assembly , typeof ( Index ) . Assembly ) ;
1919 Assert . AreEqual ( typeof ( Index ) . Assembly . GetName ( ) . Name ! , typeof ( TypeForwardTests ) . Assembly . GetType ( "System.Index" ) ! . Assembly . GetName ( ) . Name ) ;
2020#else
@@ -25,7 +25,7 @@ public void Index_IsForwarded()
2525 [ TestMethod ]
2626 public void Range_IsForwarded ( )
2727 {
28- #if NET6_0_OR_GREATER
28+ #if NET8_0_OR_GREATER
2929 Assert . AreEqual ( typeof ( object ) . Assembly , typeof ( Range ) . Assembly ) ;
3030 Assert . AreEqual ( typeof ( Range ) . Assembly . GetName ( ) . Name ! , typeof ( TypeForwardTests ) . Assembly . GetType ( "System.Range" ) ! . Assembly . GetName ( ) . Name ) ;
3131#else
@@ -45,7 +45,7 @@ public void IsExternalInit_IsForwarded()
4545 Assert . AreEqual ( 1 , returnRequiredModifiers . Length ) ; // There is a single modreq
4646 Assert . AreEqual ( "System.Runtime.CompilerServices.IsExternalInit" , returnRequiredModifiers [ 0 ] . FullName ) ; // The modreq is IsExternalInit
4747
48- #if NET6_0_OR_GREATER
48+ #if NET8_0_OR_GREATER
4949 Assert . AreEqual ( typeof ( object ) . Assembly , typeof ( IsExternalInit ) . Assembly ) ; // The IsExternalInit should be the one from the BCL
5050
5151 string isExternalInitAssemblyName = typeof ( IsExternalInit ) . Assembly . GetName ( ) . Name ! ;
You can’t perform that action at this time.
0 commit comments