Sure, too late for that, and yeah it makes sense that you wouldn't want people doing that to pick up a pre-release language version.
What about my idea in the later reply, of making net10.0 have a default of preview in the pre-RC period, which would then have no impact on users of latest?
June 20, 2025 at 10:55 PM
Sure, too late for that, and yeah it makes sense that you wouldn't want people doing that to pick up a pre-release language version.
What about my idea in the later reply, of making net10.0 have a default of preview in the pre-RC period, which would then have no impact on users of latest?
Because that would potentially opt in to unreleased features which we don't want to do once we're using RTM bits. For example, using field in properties shipped as preview in the C# 13.0 time frame.
June 20, 2025 at 9:38 PM
Because that would potentially opt in to unreleased features which we don't want to do once we're using RTM bits. For example, using field in properties shipped as preview in the C# 13.0 time frame.
What if targeting net10.0 had a default LangVersion of preview before it changed to 14.0? That seems to give what I'd want the behavior to be without it also impacting other TFMs negatively by default.
June 20, 2025 at 9:20 PM
What if targeting net10.0 had a default LangVersion of preview before it changed to 14.0? That seems to give what I'd want the behavior to be without it also impacting other TFMs negatively by default.
I suppose if setting LangVersion to latest would mean it would get picked up, then you might run into problems that way, but that's already a bad idea (as the docs point out).
June 20, 2025 at 9:18 PM
I suppose if setting LangVersion to latest would mean it would get picked up, then you might run into problems that way, but that's already a bad idea (as the docs point out).
We use a global.json locked to a major with rollForward set to latestFeature, so we won't pick up a preview automatically. However, even if we didn't have the file, projects using the preview SDK still wouldn't get 14.0 automatically unless we are targeting net10.0 in those projects.
June 20, 2025 at 9:11 PM
We use a global.json locked to a major with rollForward set to latestFeature, so we won't pick up a preview automatically. However, even if we didn't have the file, projects using the preview SDK still wouldn't get 14.0 automatically unless we are targeting net10.0 in those projects.
I feel like if you're already opting in to using the preview SDK and the prerelease .NET target, it's fine to use the preview of the LangVersion it's going to ship with.
June 20, 2025 at 8:27 PM
I feel like if you're already opting in to using the preview SDK and the prerelease .NET target, it's fine to use the preview of the LangVersion it's going to ship with.
I guess that makes sense, but for us that results in a lot of extra cleanup work. We try to align releases with the .NET schedule, so we are prepping repos now. We are already targeting net10.0 with preview SDK, we want 14.0 already and kind of sucks to have to also set preview separately.
June 20, 2025 at 8:26 PM
I guess that makes sense, but for us that results in a lot of extra cleanup work. We try to align releases with the .NET schedule, so we are prepping repos now. We are already targeting net10.0 with preview SDK, we want 14.0 already and kind of sucks to have to also set preview separately.