Changing .net references in vb program from .NET 2.0 to .NET 4.0

Brian
Brian used Ask the Experts™
on
I have a vb.net program that was done several years ago and has references to .NET 2.0. How can I change this to .NET 4?
.NET 2.0
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Have you already changed your project's targeted framework to your desired version (4.x)?

Also, I'd strongly recommend going to at LEAST 4.6. Go as high as you can while staying compatible with your target audience's framework. So if you're in an office environment where everyone should be on 4.6.2, then target 4.6.2.
BrianSystems Administrator

Author

Commented:
How do I change the project's targeted framework?  I added C:\Windows\Microsoft.NET\Framework\v4.x to my reference paths, but that did not change the version listed under References.
Reference Path
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018
Commented:
Hi Brian,

If you have th source code with you, you can do that from Application Page or Project Properties dialog. Please keep a backup of the project and be ready to fix (possible) breaking changes.

Once you have opened the project in Visual Studio -> right click on the Project -> Properties -> Application -> Target Framework.

All the best.

Regards,
Chinmay.
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

Commented:
Yeah, what he said. (points up) :)
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Yikes :P you already said that.. I keep the tabs open and answer them one by one :P
BrianSystems Administrator

Author

Commented:
Thanks for the help!
Top Expert 2016

Commented:
change it here and the references will change by themselves
2019-04-29_16-58-38.png

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial