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 TFM to net7.0 for source-build #4742
Conversation
cc @crummel |
build/common.project.props
Outdated
<NETCoreTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</NETCoreTargetFramework> | ||
<NETCoreTestTargetFramework>net6.0</NETCoreTestTargetFramework> | ||
<NETCoreTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true'">net7.0</NETCoreTargetFramework> | ||
<NETCoreTestTargetFramework>net7.0</NETCoreTestTargetFramework> |
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.
Please don't change the target framework in non source build scenarios.
This can cause our builds to fail.
@lbussell |
@nkolev92, I filed an issue, updated the PR body with the template, and addressed your review comments - is there a reason the PR validation isn't running? |
Thanks for the updates @lbussell. The CI doesn't run automatically for non-NuGet members. I've applied the label and kicked off the validation. |
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.
One question, which should not block source-build changes.
@lbussell There are some compiler errors:
|
I'm not sure if I've got the unshipped API format correct - can anyone give me some pointers? |
The roslyn analyzer code fix can create the right syntax for you. You're almost certainly not using Windows and therefore Visual Studio is not an option for you, where roslyn analyzers and code fixes run by default. For reasons I don't understand, Omnisharp (or VSCode?) have them disabled by default, but in VSCode's settings I see an option "Omnisharp: Enably Roslyn Analyzers". |
Also, if you build locally from the command line (cd to |
@@ -186,6 +187,7 @@ public static class CommonFrameworks | |||
// .NET 5.0 and later has NetCoreApp identifier | |||
public static readonly NuGetFramework Net50 = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version5); | |||
public static readonly NuGetFramework Net60 = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6); | |||
public static readonly NuGetFramework Net70 = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7); |
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.
You can always just not add this change as it's not really anything that requires your change. this is merely an optimization for restore.
I was able to get the project loaded in VS and I included the updates it suggested. |
Not sure what the current PR validation failure is - it doesn't look related to my changes: |
@lbussell If you rebase it should get fixed. Ping us here so we can trigger the CI when you've rebased. |
I updated the PR again, can we run CI again? It also looks like the last failure was a timeout - unless you think that's something my change could have caused. |
I also re-ran failed legs from azure devops, looks like mac didn't timeout this time. |
Current test failure looks the same as this PR: #4788 |
Bug
Fixes: NuGet/Home#12000
Regression? Last working version: Not a regression.
Description
I changed all source-build conditioned occurrences of net6.0 TFMs to net7.0.
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation