Annoying VS Security Dialog

Alex_W

Member
Joined
Jan 5, 2009
Messages
22
Programming Experience
Beginner
Out of the blue VS 2008 has started showing a security warning dialog every time I create a new project or open an existing one as follows:

"The {application name} project file has been customized and could present a security risk by executing custom build steps when opened in Microsoft Visual Studio. If this project came from an untrustworthy source, it could cause damage to your computer or compromise your private information."

Two options given are:
1) Load Project for Browsing
2) Load Project Normally

A 'More Details' button opens a message box with:
"An item referring to the file "" was found in the project file "C:\Users\Administrator\AppData\Local\Temporary Projects\WindowsApplication1\WindowsApplication1.vbproj". Since this file is located in a system directory, root directory or network share it could be harmful to write to this file."

1) I havent changed any settings since before getting this error and have kept all directories the same
2) file locations are in "C:\Users\Administrator\Documents\Visual Studio 2008\" - with full permissions
3) Vista UAC is turned off
4) I am using the Administrator login
5) I tried Tools>Options>Projects and Solutions>General - and un-checked "Warn user when the project location is not trusted" - didnt work.

Seems after google'ing that lots of people are getting this but havent found a solution yet.

Any help much appreciated!
 
This is copied from the MSDN, might be worth taking a look at. Besides that I would try deleting your project file, create a new one and add all your files back and see if that works. If it still doesnt, you might have to try adding the files back to a new project one at a time to see which one exactly is causing the problem.

Non-standard Import Elements
A list of standard .targets files is stored in the registry at HKEY_LOCALMACHINE\Software\Microsoft\VisualStudio\8.0\MSBuild\SafeImports\.

If a project file imports a .targets file that is not stored in the registry, it is determined to be a potential security risk.

Potentially Dangerous Targets
The IDE runs several targets while loading a project. If one of these targets has been overridden in a custom project file, it is recognized as a potential security risk. The targets that the IDE runs while loading a project include the following:

Compile
GetFrameworkPaths
AllProjectOutputGroupsDependencies
AllProjectOutputGroups
CopyRunEnvironmentFiles
ResolveComReferences
ResolveAssemblyReferences
ResolveNativeReferences
 
Thanks for the reply Tom, I dont have 8.0 reg key, instead its 9.0 with Debugger & Setup folders inside.

The error comes up every single time I create a new project of open an exisiting one if I havent already unchecked the box that says notify me every time I run this project.

Think I'll have to see what a re-install does.
 
Ok I'm tearing my hair out now, I completely re-installed Visual Studio 2008 (after having to download the uninstall tool because manually it wouldnt let me).

Then I got a registry access failure which is apparently to do with having previously uninstalled the program so I got a fix for that...

But the same dialog still comes up! I tried creating folders directly on c:\ and pointing the Project folder their but whenever I create a new project ths security dialog comes up and you have to choose to not notify you in the future otherwise you see it every time you load it!

Screen shot attached - any ideas anyone??
 

Attachments

  • vs2008error.jpg
    vs2008error.jpg
    180.2 KB · Views: 37
Try moving your project to C:\Documents and Settings\YourName\My Documents\Visual Studio 2008\Projects and see if that makes a difference.

Other then that I can only suggest starting a new project file and adding the forms back one at a time and/or checking that registry entry to see if your directory is listed as safe.
 
I am running as the Administrator so all permissions should be there. thats the default directory VS sets anyway. Just re-installed which hasnt made any difference at all.

Does anyone have any other ideas?
 
Back
Top