“安全警告”对话框(MSBuild 项目文件)

 

发布日期: 2016年4月

<_caps3a_sxs _xmlns3a_caps="https://schemas.microsoft.com/build/caps/2013/11"><_caps3a_sxstarget>“安全警告”对话框警告开发人员与项目有关的安全问题。UI 元素对于此解决方案中的每一个项目都询问我选择此选项,将针对解决方案中的每个项目向您给出提示。  这是默认设置。  位于具有潜在危险的位置的项目项位于原本安全的 .targets 文件中的某些项使用用户定义的项目属性设置自己的路径。  为了防止项覆盖重要的文件,包含计算为下列位置之一或其任何子目录的项路径的项目文件,将被视为具有潜在的安全风险,除非它们还位于解决方案文件或项目文件目录中或其下的目录中:  任何驱动器的根目录。Windows 目录,如 C:\Windows\。Program Files 目录,如 C:\Program Files\。网络共享。MSBuild MSBuild Reference MSBuild Concepts <_caps3a_sxssource>The Security Warning dialog box warns developers about security issues with projects.UI ElementsAsk me for every project in this solutionSelect this option to be prompted for every project in the solution.  This is set by default.  Project Items in Potentially Dangerous LocationsSome items in otherwise safe .targets files use user-defined project properties set their paths.  To prevent an item from overwriting an important file, project files that contain item paths that evaluate to one of the following locations or any subdirectories of these locations are considered to be potential security risks unless they are also located in or below the solution file or project file directory:  The root directory of any drive.The Windows directory, for example, C:\Windows\.The Program Files directory, for example, C:\Program Files\.Network shares.MSBuild MSBuild Reference MSBuild Concepts