-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2️⃣ Add netstandard2.0 support (#87)
* 2️⃣ Add netstandard2.0 support * 🧪 Run tests on netcore as well
- Loading branch information
1 parent
56d1ea2
commit b6ebcf2
Showing
4 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Diagnostics; | ||
|
||
namespace System.Runtime.CompilerServices | ||
{ | ||
// HACK: Needed to make ModuleInitializer work | ||
[ExcludeFromCodeCoverage] | ||
[DebuggerNonUserCode] | ||
[AttributeUsage(AttributeTargets.Method, Inherited = false)] | ||
public sealed class ModuleInitializerAttribute : Attribute { } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> | ||
<LangVersion>10</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Remove="IsExternalInit.cs" /> | ||
</ItemGroup> | ||
|
||
<!-- Hacks to make netstandard more usable --> | ||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<!-- Needed to make indexes work --> | ||
<PackageReference Include="IndexRange" Version="1.0.2" /> | ||
<!-- Needed to make C#9 features work --> | ||
<Compile Include="IsExternalInit.cs" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace System.Runtime.CompilerServices | ||
{ | ||
// HACK: This is needed in order to use C#9+ features in netstandard | ||
public class IsExternalInit { } | ||
} |