The most probable reason is that the assembly can't be loaded from the GAC or from the project's BIN folder. I just resolved a bad reference to the System.EnterpriseServices assembly. There are three ways to solve the problem.
The first and easiest is to just place a reference to the assembly which will load it to your BIN folder. However, this is only a temporary solution and you'll probably end up doing this with all of your projects.
The second is to use the configuration tool in the administrator tools of the start menu (start/control panel/administrator tools/NET framework 2.0 configuration), to remove the assembly and then reinstall it. If you've never used the configuration tool, this might not be a good option, but it is a long term solution. Alternatively, you can use the GACUtil tool from the command line.
Easier, but time consuming, is to have Visual Studio repair itself using Add/Remove Programs.
|