简体   繁体   English

如何使用Visual Studio 2013预构建事件从构建中排除脚本?

[英]How do i use Visual Studio 2013 Pre-Build event to exclude a script from build?

I would like to know how to specify a pre build event that will exclude a script from a class library project build. 我想知道如何指定一个预构建事件,该事件将从类库项目构建中排除脚本。

The info in the Microsoft website is lacking actual examples of this. Microsoft网站上的信息缺少实际的示例。

i have a script named _2DRadar.cs hich I need excluded from the build 我有一个名为_2DRadar.cs的脚本,我需要从构建中排除 在此处输入图片说明

You don't need a post-build event. 您不需要构建后事件。 (and since that's post -build, it wouldn't make any sense) (由于这是构建的,所以没有任何意义)

Just set the Build Action to None. 只需将“生成操作”设置为“无”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何禁止以下命令在预构建事件上抛出错误? - How do I suppress the following commands from throwing errors on a pre-build event? 在Visual Studio 2010中预构建 - Pre-build in Visual Studio 2010 如何以编程方式将AssemblyInfo.cs更新为预生成事件(Visual Studio / msbuild) - How to programatically update AssemblyInfo.cs as a Pre-Build event (Visual Studio / msbuild) Visual Studio C#不会生成因预生成事件而更改的文件 - visual studio c# does not build files that were change by pre-build event 在每次构建时在 Visual Studio C# 中运行预构建事件,而不总是触发目标重建 - Run pre-build event in Visual Studio C# on every build without always triggering target rebuild 如何在C#项目中以编程方式(例如在预生成事件中)以编程方式设置Visual Studio 2015的OutDir属性? - How can I set Visual Studio 2015's OutDir property programatically, e.g. in a pre-build event, in a C# project? 将 C# 文件作为预构建事件运行 Visual Studio (.NET Core) - Run a C# file as a pre-build event Visual Studio (.NET Core) 在 Visual Studio 的预构建中使用 webpack - Using webpack in Visual Studio's pre-build 如何在Visual Studio 2013中进行并行构建? - How to do a parallel build in Visual Studio 2013? 如何在预构建事件中更新.config项目值 - How to update .config item value in pre-build event
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM