I'm getting this error since yesterday and after 'searching trying and crying' I've ended up asking the question on here.
An unhandled exception of type 'System.InvalidOperationException' occurred in 'project.exe'
The error is: Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
This project is set to use the 3.5-Framework. The error occurs when the form loads, when my resources have images or anything that uses graphics in it. (removing the form-icon and button-images 'solves' the problem). I've allready tried the following :
This question has been raised in the past, yet no suggestions seem to fix my problem ?
Thanks for reading. Thanks for your time. Bert
As I tried to remember what changed before this error started to occur, i remember setting a System variable I set :
Trying to fix the buggy error
MSBUILD : error MSB4017: Could not run the "GenerateResource" task because MSBuild could not create or connect to a task host with runtime "CLR2" and architecture "x86".
Now it works ... Strange !