Skip to content

Build for .NET 5, 6, 7, 8, 9 & 10 and ReferenceAssemblies.Default to locate each respective runtime#1196

Open
thomhurst wants to merge 1 commit intodotnet:mainfrom
thomhurst:feature/referenceassemblies-default-net5onwards
Open

Build for .NET 5, 6, 7, 8, 9 & 10 and ReferenceAssemblies.Default to locate each respective runtime#1196
thomhurst wants to merge 1 commit intodotnet:mainfrom
thomhurst:feature/referenceassemblies-default-net5onwards

Conversation

@thomhurst
Copy link
Copy Markdown

@thomhurst thomhurst commented Dec 1, 2024

Summary

  • Add net5.0 through net10.0 to TestingLibraryTargetFrameworks and TestingLibrarySourceGeneratorTargetFrameworks, enabling the testing libraries to be built for each modern .NET runtime
  • Update ReferenceAssemblies.Default to return the correct reference assemblies for the target framework being compiled against (e.g. Net.Net100 on .NET 10, Net.Net90 on .NET 9, etc.) via conditional compilation
  • Update global.json to .NET 10 SDK to support building net10.0 targets
  • Add System.Resources.Extensions package reference to fix VSSDK1012 build error with newer SDK versions
  • Add CheckNotRecommendedTargetFramework=false to allow building .NET Standard 1.6 with the .NET 10 SDK

@thomhurst thomhurst requested a review from a team as a code owner December 1, 2024 00:12
@thomhurst
Copy link
Copy Markdown
Author

Got a few errors switching to the .NET 9 SDK which I think I've managed to fix, but I've got a new error now that I have no idea what it means or how to fix it:

VSSDK(0,0): error VSSDK1012: (NETCORE_ENGINEERING_TELEMETRY=Build) The cto merger could not read the data from 'D:\a_work\1\s\artifacts\obj\Roslyn.SyntaxVisualizer.Extension\Release\net472\VSPackage.resources.original'. This .resources file should not be read with this reader. The resource reader type is "System.Resources.Extensions.DeserializingResourceReader, System.Resources.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51".

@AraHaan
Copy link
Copy Markdown
Member

AraHaan commented Mar 30, 2026

This PR can be updated to .NET 10 as well.

@thomhurst thomhurst force-pushed the feature/referenceassemblies-default-net5onwards branch from cd37736 to a6a9eec Compare March 30, 2026 22:56
@thomhurst thomhurst changed the title Build for .NET 5, 6, 7, 8 & 9 and ReferenceAssemblies.Default to loca… Build for .NET 5, 6, 7, 8, 9 & 10 and ReferenceAssemblies.Default to locate each respective runtime Mar 30, 2026
@thomhurst thomhurst force-pushed the feature/referenceassemblies-default-net5onwards branch 2 times, most recently from 7cb43a5 to 26a8353 Compare March 30, 2026 23:03
…amework

- Add net5.0 through net10.0 to TestingLibraryTargetFrameworks and
  TestingLibrarySourceGeneratorTargetFrameworks
- Update ReferenceAssemblies.Default to return the correct reference
  assemblies for each target framework via conditional compilation
- Update global.json to .NET 10 SDK (10.0.100) to support building
  net10.0 targets
- Add System.Resources.Extensions to fix VSSDK1012 build error with
  newer SDK versions
- Add CheckNotRecommendedTargetFramework=false to allow building
  .NET Standard 1.6 with the .NET 10 SDK
@thomhurst thomhurst force-pushed the feature/referenceassemblies-default-net5onwards branch from 26a8353 to a52ceac Compare March 30, 2026 23:05
@thomhurst
Copy link
Copy Markdown
Author

@AraHaan added

<!-- Required for the .NET 10 SDK to build out-of-support target frameworks -->
<CheckNotRecommendedTargetFramework>false</CheckNotRecommendedTargetFramework>

<TestingLibraryTargetFrameworks>net10.0;net9.0;net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netstandard1.6;netstandard2.0;net452;net46;net461;net472</TestingLibraryTargetFrameworks>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a maintainer of this project, but IMO it's not worth it to pack for all these TFMs.

I would probably just add net10.0 to the existing TFMs. So it's .NET 10, .NET Core 3.1, .NET Standard 2.0, and .NET Framework 4.7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants