DCSIMG
Security Warning for <Project Name> Dialog Box - David Sackstein's Blog

Security Warning for <Project Name> Dialog Box

Recently, a message with this caption started popping up when I open some of my projects with Visual Studio 2008.

The detailed text of the message is:

The <Project 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.

  • Load Project for Browsing
  • Load Project Normally

A “More Details” button follows. When I press it I get a message box with:
An item referring to the file "" was found in the project file <Project File Path>. Since this file is located in a system directory, root directory or network share it could be harmful to write to this file.

Needless to say, I haven’t (knowingly) added custom build steps to these projects, nor had I knowingly add references to a file named “”.

The most annoying thing about this warning is that there seems to be no way to turn it off for next time. It appears everytime I open the project.

I googled this and there are many complaints, but no answers that I could find. (Some developers reinstalled Visual Studio 2008 and the problem didnt go away.)

I managed to work around the problem in every case I encountered it, and here is how. But beware, I dont know real cause of the problem or what side effects this change may have, so take my tip at your own risk : )

Workaround

  1. Open the project.
  2. When the Security Dialog comes up, press OK to load the project.
  3. In Solution Explorer right click on the project and select “Unload Project”
  4. Right click again on the project and select “Edit <Project Name>.csproj”
  5. In the first PropertyGroup element under the root element, delete the <ProjectGuid> element.
  6. Save the project file.
  7. In Solution Explorer, right click again on the project and select “Reload Project”

Hey Presto, the security dialog box doesn’t appear any more.

To Undo

The ProjectGuid is still stored in your solution file for the project.

An easy way to get it back into your project is as follows.

  1. Follow steps 1-4 in the Workaround.
  2. Add an empty <ProjectGuid></ProjectGuid> element anywhere (XML valid) in the first PropertyGroup element.
  3. Load the project again.
  4. Select Save All (or press OK on the prompt to save the project when you close the solution).

This restores the original ProjectGuid value inside the element you added (and with it, the annoying security dialog).

Afterword

As I cant explain this workaround, it is not a solution as far as I am concerned. I will continue looking out for a proper one, and if you know or find one meanwhile, please comment and share it !

Published Monday, May 18, 2009 11:27 PM by David Sackstein
תגים:,

Comments

# Security Warning for &lt;Project Name&gt; Dialog Box - David&#39;s Blog

Pingback from  Security Warning for &lt;Project Name&gt; Dialog Box - David&#39;s Blog

# re: Security Warning for <Project Name> Dialog Box

Sunday, June 14, 2009 1:55 AM by Rob

Make sure:

C:\Users\{user}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

exists.

# re: Security Warning for <Project Name> Dialog Box

Thursday, July 16, 2009 11:38 PM by Todd

Following the comment above, and a similar comment on another site, I played around a bit (using Windows XP) and found that VS resets the All Users Startup directory to C:\Documents and Settings\All Users\Start Menu\Programs\Startup. If this directory doesn't exist, it is reset to '' in the registry, and the error is displayed. Adding this directory corrected the issue. I've customized the location of my user directories, including Startup, and it doesn't seem to care about that (in Windows XP, at least).

# re: Security Warning for <Project Name> Dialog Box

Saturday, August 01, 2009 11:07 PM by Boris

2 Rob: Thank you very much for your post. I've created startup folder in Vista and the messages are now gone!

# re: Security Warning for <Project Name> Dialog Box

Wednesday, August 05, 2009 10:50 PM by michael

i tried it and didnt work

# re: Security Warning for <Project Name> Dialog Box

Wednesday, October 28, 2009 5:31 PM by Greg

I saw this dialog come up after I changed the build output to the install directory of the MS Project Add-in I was developing.

# re: Security Warning for <Project Name> Dialog Box

Tuesday, April 13, 2010 5:04 PM by Ruben Barteliink

There's a SafeImports reg key (HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\MSBuild\SafeImports on my machine) that lists the trusted imports. I'm asked an SO question at: stackoverflow.com/.../msbuild-safeimports

# Annoying VS 2008 Security Warning

Monday, May 03, 2010 3:01 PM by Anton Setiawan

Annoying VS 2008 Security Warning

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above:
Powered by Community Server (Commercial Edition), by Telligent Systems