Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build against .Net Framework 3.5 in Visual Studio 2022

I have a project developed with .Net framework version 3.5 that used to be opened in Visual Studio 2012. I have VS 2022 installed on my machine, I opened the solution using it and it suggested upgrading the framework. A more experienced developer told me not to do that without any further explanations. I did not do anything else except closing VS.

Why opening older solutions in newer VS is a bad idea? it only added a hidden .vs folder in the solution's.

Can I build this solution using VS 2022 or I should find the older version and in any case where can I find the necessary SDK since it is no longer available on this page?

like image 439
user10191234 Avatar asked Oct 28 '25 03:10

user10191234


2 Answers

No bad idea. Also: don't be afraid, software like this isn't exactly know for nor written to just mess up your code. Since you mention the only thing which happened when opening the solution was the addition of a .vs directory, I assume that means that your solution, all project files and all source code is in version control - as it shoud be - and that is a line of defense which is hard to beat. So yes: if version control reports no changes, VS didn't make any changes, and there is no problem. And even if there were changes, VS would have told you about it and/or created a backup directory with the original. And you'd still be able to revert them in version control.

As to whether this builds in VS 2022: almost certainly yes, one way or another. You might need to have to install the .Net framework 3.5 development tools with the VS installer. Or otherwise: I'd personally give it a go and just upgrade and build to see what happens. .Net frameworks are all pretty much completely backwards compatible anyway. I'd even suggest to the other developers that it might be time to upgrade (or put another way: ask why it is needed to stick to ancient 3.5 - still targetting Windows XP or so?).

like image 83
stijn Avatar answered Oct 30 '25 03:10

stijn


You can try using vs 2017 or 2019

like image 37
lingchen Avatar answered Oct 30 '25 01:10

lingchen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!