Can i edit a .NET 6 Console C# project in .NET 4.7.2?

Viewed 23

I used to program in .NET 4.7.2 (and still do), but my High School uses .NET 6

Currently we have started using C# console in .NET 6

I don't want to update to .NET 6 because i would also have to change my Unity editor version to one that supports VS2022

Is it possible to open .NET 6 projects in .NET 4.7.2, or am i gonna have to update Unity and reinstall VS, while scouring every part of my C:// partition to clean up junk/leftovers? I am very tight on free space especially on C://

1 Answers

No, you can't (if you mean anything more then editing text, cause for this you can use even notepad). But depending on language features used potentially you can copy-paste code into a .NET Framework 4.7.2 project and compile it. Or not, cause at least some newer features are not supported by older framework version.

Also you don't need full blown VS upgrade. You can look into installing just the .NET 6 SDK and VS Code (which requires less space compared to VS 2022).

Though I hugely recommend to extend your disk.

Related