-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to net9.0 #11000
base: main
Are you sure you want to change the base?
Update to net9.0 #11000
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you push this as a draft PR to claim 11,000? 😄
@@ -63,7 +63,6 @@ | |||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(_MicrosoftExtensionsPackageVersion)" /> | |||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(_MicrosoftExtensionsPackageVersion)" /> | |||
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(_MicrosoftExtensionsPackageVersion)" /> | |||
<PackageVersion Include="Microsoft.Extensions.NonCapturingTimer.Sources" Version="5.0.0-preview.4.20205.1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see this go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this source package would need more warnings to be suppressed with net9 (I'm not yet sure why, but some existing IDE* error codes started newly being reported with net9.0). It seems better to just include the one source file from this source package directly and make it conform to our editorconfig. I also fixed up some missing file headers that got missed because of the IDE0073 being ignored previously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is only used in one place in the MS.VS.Razor.LegacyEditor proejct. Could you move this file there?
@@ -22,8 +24,15 @@ public CodeGenerationIntegrationTest(bool designTime = false) | |||
: base(layer: TestProject.Layer.Compiler) | |||
{ | |||
this.designTime = designTime; | |||
BaseCompilation = BaseCompilation.AddReferences( | |||
MetadataReference.CreateFromFile(typeof(TestTagHelperDescriptors).Assembly.Location)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assembly reference started failing due to now being net9.0 but others (via Basic.Reference.Assemblies) being net8.0.
Refactoring of the following file (TestTagHelperDescriptors.cs) is related to this.
@@ -63,7 +63,6 @@ | |||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(_MicrosoftExtensionsPackageVersion)" /> | |||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(_MicrosoftExtensionsPackageVersion)" /> | |||
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(_MicrosoftExtensionsPackageVersion)" /> | |||
<PackageVersion Include="Microsoft.Extensions.NonCapturingTimer.Sources" Version="5.0.0-preview.4.20205.1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this source package would need more warnings to be suppressed with net9 (I'm not yet sure why, but some existing IDE* error codes started newly being reported with net9.0). It seems better to just include the one source file from this source package directly and make it conform to our editorconfig. I also fixed up some missing file headers that got missed because of the IDE0073 being ignored previously.
@@ -77,7 +77,7 @@ | |||
--> | |||
<Otherwise> | |||
<PropertyGroup> | |||
<DefaultNetCoreTargetFramework>net8.0</DefaultNetCoreTargetFramework> | |||
<DefaultNetCoreTargetFramework>net9.0</DefaultNetCoreTargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I guess it's not that simple, parts that deploy to VS/VSCode need to stay on net8.0. I will at least extract the independent parts of this PR for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it more of a gradual change, you could add net9 to the multi-targeting, and we can continue to change it as the needs of SDK/VS/VSCode change. There are some tradeoffs to making the multi-targeting conditional to being on a CI machine or not.
Doing this in roslyn (dotnet/roslyn#75465) and didn't want to leave razor behind.