dotnet / roslyn-sdk

Roslyn-SDK templates and Syntax Visualizer
MIT License
517 stars 256 forks source link

Add reference assemblies for net6.0-[platform] TFMs #892

Closed Youssef1313 closed 3 years ago

Youssef1313 commented 3 years ago

https://github.com/dotnet/designs/blob/main/accepted/2021/net6.0-tfms/net6.0-tfms.md#design

Youssef1313 commented 3 years ago

@sharwell Is this possible? If yes, it would be nice to have :)

jmarolf commented 3 years ago

So the ask is to have Net60Windows, Net60Android, etc in addition to Net60 like we have here?

https://github.com/dotnet/roslyn-sdk/blob/b7df823f6a23d8fb316c8ee2c25237df7c151123/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/ReferenceAssemblies.cs#L887

I have no problem with that, but it would require there to be nuget packages with these references. Currently we rely on Microsoft.NETCore.App.Ref.

This is my best understanding of the reference nuget packages and how they map. You will need to add all the reference from Microsoft.NETCore.App.Ref as well.

Property Name Nuget Package
Net60Windows Microsoft.WindowsDesktop.App.Ref
Net60Android Microsoft.Android.Ref
Net60iOS Microsoft.iOS.Ref
Net60MacOS Microsoft.macOS.Ref
Net60MacCatalyst Microsoft.MacCatalyst.Ref
Net60TvOS Microsoft.tvOS.Ref
Net60Tizen ???
Youssef1313 commented 3 years ago

@jmarolf Yes that's exactly what I'm asking for. I'm not sure whether there are NuGet packages for these or not. But the lack of these reference assemblies makes testing analyzers/generators that are very domain-specific in these areas nearly impossible.

Youssef1313 commented 3 years ago

@jmarolf Thanks!! That was too fast :)