Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Type is not defined" error on project build

I created a new VB.net windows applications project and added a reference to my utilities project like I have done many times before. When I start coding, the editor will find the utility namespace without difficulty but when I build I get "Type My.Utils.Data is not defined".

I've compared my project to my other projects and can't find a difference.

When I try to debug, I get a dialog saying "Visual Studio cannot start debugging because the debug target "C:.....\myproject.exe" is missing

like image 994
sreimer Avatar asked Aug 15 '13 14:08

sreimer


1 Answers

You need to make sure that the consuming project is targeting a .NET Framework version which is equal to or higher than the other project that it is referencing. If the referenced project is targeting a higher version of the framework, Visual Studio will not give you a useful message like, "Wrong Framework Version". Instead, it gives you a very confusing error about the assembly being missing, even though it's there.

like image 192
Steven Doggart Avatar answered Oct 23 '22 11:10

Steven Doggart