Better choice of target framework

I created a .net console app and the target framework is 4.0. Would it be possible to have a higher framework ? ie 4.8

I doubt anyone would be targeting such a low version ?


(a) yes, you can select any known version, up to and including 4.8 and (b) there’d be many reasons for building for a lower target, eg to keep the audience of who can use your library/app broad?

Well yes but isnt it more friendly to default to the highest version when creating a new project ?

I start adding nugets and code, nothing works until I change the version to something a lot higher.


the default for writing a new app is not to make it run exclusively own the very latest, is it?

I would :slight_smile:

I was updating an app to the latest versions of some assemblies and wanted to test something out. I created a console app, added the assemblies and some test code. When I built it failed to compile, it took me a minute to realize that it’s using v4.

I think if your going to target a specific version you would select it, otherwise I think you would want to run with the latest.

that’s why you get the option to set it :wink:

1 Like

I would suggest to set the default framework to 4.5.

Because from that version, async/await is supported. I personally used quite a lot of await in my codes.

And most windows system do have .net framework 4.5

Sounds like a reasonable compromise; I’ll make 4.5 the default (done) and will look at exposing the option in a future New Project dialog, like VS does.