I had the same problem with C# - after changing the .Net framework from 3.5 to 4.0 and upgrading a 3rd party component (VistaDB) from .Net 2.0 to .Net 4.0 I could not view one of the forms (LaunchFindAlike) in the Designer and received the warning message with the following details:
Could not find type 'LaunchFindAlikeNS.MultiColumnComboBox'
Variable mcboErrorText either undeclared or never assigned
Could not load file or assembly VistaDB.5.NET20 …. The system cannot find the file specified
Variable KeywordListTableAdapter either undeclared or never assigned
Variable SourceIndexesTableAdapter either undeclared or never assigned
Duplicate declaration of member KeywordListTableAdapter
Duplicate declaration of member SourceIndexesTableAdapter
The messages were very perplexing and the 'Goto Code' or Show Call Stack displays were not helpful.
I tried comparing files LaunchFindAlike.csproj (using Notepad++) for the new version with the .Net 3.5 version and found a number of differences. (The LaunchFindAlike.Designer.csproj files were identical). Some of the differences were
<reference include="VistaDB.5.NET40, Version=18.104.22.168, Culture=neutral, PublicKeyToken=dfc935afe2125461, processorArchitecture=MSIL">
I changed LaunchFindAlike.csproj (.Net 4.0) to remove everything after .NET40 as shown below
I removed other differences in the statements and then found that I could view the form but not build the project due to the file
Project\...\LaunchFindAlike\Properties\Settings.Designer.cs not being present. I copied this file from Project\...\LaunchFindAlike and the project then built OK.
The details of the fix may be different for other users but manually editing the .csproj file for the offending form to make it resemble the earlier version seems to be a useul path. Make sure you keep a backup before changing .Net frameworks.