Reputation: 28069
I've decided to learn Visual Basic .Net as this is what some of my colleagues work with, and this will allow me to work with them on projects.
I have purchased Microsoft Visual Basic 2010 Step by Step and downloaded the sample files. When I am trying to debug the first sample application (a Windows form), it is telling me that it can't load System.Drawing V4.0.0.0. However, if I create a new Windows Form application (C# or VB.Net) this works fine.
I had a look at the References tab in the project settings and System.Windows.Forms is referenced, but the version referenced is 2.0.0.0. I have removed and re-added this reference and it stays at 2.0.0.0 and I still get the error.
Does anybody have any ideas as to what may be going on?
I am using Visual Studio 2010 Professional.
Thanks
Upvotes: 1
Views: 710
Reputation: 65672
Dont target .Net 4.0 CLIENT, target the .Net 4.0 FULL framework
Upvotes: 1
Reputation: 31433
This is because of a discrepancy in the target framework. v4.0.0.0 is targeting .NET framework v4.0 - v2.0.0.0 is targeting .NET framework v2.0. You can change the framework target for your project in
Project ->
(myProject) Properties... ->
Compile ->
Advanced Compile Options ->
Target Framework...
Upvotes: 2