.Net project location is not trusted

this just goes to show how quickly things change in software development - or maybe... how long I've been working on halo books.

I was working on a C# WinForm project and I started to get a strange error when I opened the solution. the error is: "The project location is not trusted. Running the application may result in security exceptions when it attempts to perform actions which require full trust."

it is possible to ignore the error and go about your business, but I was curious so I did some googling. it turns out that this issue is commonly associated with web apps or projects that are run from network drives. my project is a WinForm app on the C: drive, so this didn't help me.

only after searching numerous pages did I find that there is a 'new' feature that applies security permissions downloaded zip files. this triggered some alarm bells because my app does use a sample project that I downloaded.

anyway, the solution is easy. you must unblock the sample code before unzipping. to do this, right-click the Zip files, choose Properties, click UnBlock, click Apply and then unzip.

this is probably common knowledge to those who work with sample code so it's sort of ironic. after all, I used to do that for a living.