dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.56k stars 4.54k forks source link

CI doesn't build `net9.0` targets in source generators. #100346

Open eiriktsarpalis opened 3 months ago

eiriktsarpalis commented 3 months ago

A while back we added net9.0 targets to the source generator projects so that they support nullability annotations. These aren't being used by the product but help with local development. We discovered with https://github.com/dotnet/runtime/pull/100345 that these targets aren't being built by CI, so it's easy for them to be broken.

cc @ViktorHofer

dotnet-policy-service[bot] commented 3 months ago

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries See info in area-owners.md if you want to be subscribed.

huoyaoyuan commented 3 months ago

My local development environment lacks SG in VS currently, which is annoying when developing interop-heavy code. Sounds related to this?

ericstj commented 3 months ago

Shouldn't be. These SG builds aren't meant to be run anywhere. Just built to validate nullable annotations.

If SG's aren't working in your dev environment it's probably because you're using a VS that's older than the compiler toolset we're using and they are failing to load. Make sure you're on a preview VS with the 9.0 preview SDK installed.