Click here to Skip to main content
15,891,136 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: .Net versions: clearing the mud? Pin
raddevus29-Jan-22 17:07
mvaraddevus29-Jan-22 17:07 
GeneralRe: .Net versions: clearing the mud? Pin
Sander Rossel30-Jan-22 1:09
professionalSander Rossel30-Jan-22 1:09 
JokeRe: .Net versions: clearing the mud? Pin
Kornfeld Eliyahu Peter30-Jan-22 2:59
professionalKornfeld Eliyahu Peter30-Jan-22 2:59 
GeneralRe: .Net versions: clearing the mud? Pin
Sander Rossel30-Jan-22 9:34
professionalSander Rossel30-Jan-22 9:34 
GeneralRe: .Net versions: clearing the mud? Pin
MSBassSinger1-Feb-22 12:05
professionalMSBassSinger1-Feb-22 12:05 
GeneralRe: .Net versions: clearing the mud? Pin
Sander Rossel1-Feb-22 22:22
professionalSander Rossel1-Feb-22 22:22 
GeneralRe: .Net versions: clearing the mud? Pin
Gerry Schmitz30-Jan-22 4:59
mveGerry Schmitz30-Jan-22 4:59 
GeneralRe: .Net versions: clearing the mud? Pin
Richard Deeming30-Jan-22 22:03
mveRichard Deeming30-Jan-22 22:03 
And then, just in case things weren't confusing enough:
Using C# 9 outside .NET 5 · Discussion #47701 · dotnet/roslyn · GitHub[^]

Some C# 9/10 features work fine in .NET Framework (4.7.2 / 4.8) projects. Some features can be enabled by adding specific class definitions to your project. And some just won't work at all.

But Visual Studio won't let you select C# 9 / 10 as the language version in a .NET Framework project. You have to manually edit the project file to specify the <LangVersion>.

Which is relatively easy to do in a new "SDK-style" project - just double click the project file, and it opens within Visual Studio so you can edit it. But not so easy in the old project format, where you have to "unload project" before Visual Studio lets you edit the project file.

And although there's a command-line tool to update your projects to the new format[^], not all projects are supported. For example, ASP.NET MVC 5 / WebAPI 2 / WebForms projects can't be updated.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: .Net versions: clearing the mud? Pin
maze331-Jan-22 0:14
professionalmaze331-Jan-22 0:14 
GeneralRe: .Net versions: clearing the mud? Pin
raddevus31-Jan-22 3:00
mvaraddevus31-Jan-22 3:00 
GeneralRe: .Net versions: clearing the mud? Pin
MSBassSinger1-Feb-22 12:02
professionalMSBassSinger1-Feb-22 12:02 
GeneralRe: .Net versions: clearing the mud? Pin
raddevus1-Feb-22 16:54
mvaraddevus1-Feb-22 16:54 
RantI am not getting some of my Amazon/Parcel packages now Pin
Slacker00729-Jan-22 7:34
professionalSlacker00729-Jan-22 7:34 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
Gary R. Wheeler29-Jan-22 7:47
Gary R. Wheeler29-Jan-22 7:47 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
Roger Wright29-Jan-22 8:59
professionalRoger Wright29-Jan-22 8:59 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
Slacker00729-Jan-22 9:28
professionalSlacker00729-Jan-22 9:28 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
Eddy Vluggen29-Jan-22 9:04
professionalEddy Vluggen29-Jan-22 9:04 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
Slacker00729-Jan-22 9:24
professionalSlacker00729-Jan-22 9:24 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
Eddy Vluggen29-Jan-22 23:27
professionalEddy Vluggen29-Jan-22 23:27 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
OriginalGriff29-Jan-22 10:47
mveOriginalGriff29-Jan-22 10:47 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
David O'Neil29-Jan-22 11:40
professionalDavid O'Neil29-Jan-22 11:40 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
Richard Andrew x6430-Jan-22 4:34
professionalRichard Andrew x6430-Jan-22 4:34 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
David O'Neil30-Jan-22 8:51
professionalDavid O'Neil30-Jan-22 8:51 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
Richard Andrew x6430-Jan-22 10:06
professionalRichard Andrew x6430-Jan-22 10:06 
GeneralRe: I am not getting some of my Amazon/Parcel packages now Pin
David O'Neil30-Jan-22 10:26
professionalDavid O'Neil30-Jan-22 10:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.