At https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/cross-platform-targeting there are the recommendations for Cross platform. Let’s see what needs to be done for https://github.com/ignatandrei/AOP_With_Roslyn
||DO start with including a netstandard2.0 target.
||Done – the main dll, AOPRoslyn, is already .netstandard2,0
||AVOID including a netstandard1.x target.
||DO include a netstandard2.0 target if you require a netstandard1.x target.
||DO NOT include a .NET Standard target if the library relies on a platform-specific app model.
||CONSIDER targeting .NET implementations in addition to .NET Standard.
||AVOID using multi-targeting with .NET Standard if your source code is the same for all targets.
||CONSIDER adding a target for net461 when you’re offering a netstandard2.0 target.
||OK> see later point 9
||DO distribute your library using a NuGet package.
||DO use a project file’s TargetFrameworks property when multi-targeting
||Struggle to implement/ partially done – modified AOPRoslyn.csproj
||CONSIDER using MSBuild.Sdk.Extras when multi-targeting for UWP and Xamarin as it greatly simplifies your project file.
||DO NOT include a Portable Class Library (PCL) target.
||DO NOT include targets for .NET platforms that are no longer supported.
I tried to modify to include
( Attention: Frameworks , not Framework)
First , you should publish the .csproj
dotnet publish <path to csproj>
should be modified with -f=”netstandard2.0″
Then , each dependency should support it :
error NU1202: Package PortableConsoleLibs 1.0.0 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package PortableConsoleLibs 1.0.0 supports: netcoreapp2.0 (.NETCoreApp,Version=v2.0)
So you should contact the owners to support it – or re-compile the sources, if you have.
So I will stick with
“DO NOT include targets for .NET platforms that are no longer supported.” including NET461.
Conclusion: 11 / 12 it is a good score.