I need this so often, but every time I forget, how it works (from Visual Studio Help).
Project Folder Not Secure Dialog Box
You attempted to create a project on a UNC path. By default, a UNC path is not a trusted location for a project. Your project may not run correctly when you attempt to debug or run from this location. For more information, see .
The following tools modify the policy affecting the file share.
One simple way to modify the policy affecting a file share is to give a specific file share FullTrust permission using mscorcfg.msc. You must be an administrator on the computer to make this change.
To give a file share FullTrust permission
- Start mscorcfg.msc.
- Expand the Runtime Security Policy node, the Machine node, the Code Groups node, the All_Code node, and then highlight the LocalIntranet_Zone node.
- In the right pane select Add a Child Code Group.
- Choose Create a new Codegroup and enter a name for the code group, then click Next.
- Choose a Condition Type of URL, then enter the UNC path to the share location of your project, using the format file///\\servername\sharename\* where \\servername\sharename is the name of the share. Click Next.
Note Make sure to add the asterisk at the end of the path.
- Choose Use Existing Permission Set of FullTrust, then click Next.
- Click Finish.
- Restart Visual Studio.
Using caspol.exe to accomplish this change, you would use the following command line (you must be an administrator on the computer to make this change.):
caspol -m -ag 1.2 -url urlname FullTrust