Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 JSMin 在 .NET 项目上压缩 Javascript,但是由于我不想在项目上创建另一个依赖项,所以我想知道如何在源代码管理中拥有可执行文件,以便在构建项目时,这样我就可以在构建后事件中“运行”该可执行文件。
有什么想法吗 ?
如果您使用 Visual Studio 2010,您可以选择您的项目,然后右键单击,选择属性。当“属性”选项卡打开时,选择“构建事件”。在“构建后事件命令行”中,键入您的命令,例如:
c:\pathto\myprogram.exe dothis
请注意,在这种情况下您可以使用一些内置变量,例如:$(ProjectDir)和$(OutDir).
$(ProjectDir)
$(OutDir)
但这也可以在 MSBuild 项目中完成。