问题标签 [post-build]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3506 浏览

visual-studio - 在 Visual Studio 中自定义生成后事件

有没有办法自定义构建后事件宏,我想将新程序集移动到由程序集版本命名的同一目录中的子文件夹,即

复制 $(TargetDir)$(TargetFileName) $(TargetDir)$( ASSEMBLYVERSION )\$(TargetFileName)

然而,没有这样的“宏观”。有点像这样构建可执行文件以获得版本

我们让 foo.bat 通过调用打印您传入的程序集版本的托管应用程序来评估目标的版本,例如 GetVersion.exe

有任何想法吗??当然有一种方法可以直接自定义宏??

0 投票
19 回答
172659 浏览

visual-studio-2008 - Post Build 以代码 1 退出

我有一个带有后期构建事件的项目:

每次在我的机器上都能正常工作。我有一个新开发人员,他总是收到“以代码 1 退出”错误。我让她在 DOS 提示符下运行相同的命令,它运行良好。这可能是什么原因造成的?有没有办法解决真正的错误?

我们都使用 Visual Studio 2008。

0 投票
1 回答
2374 浏览

.net - 关于 .NET 和 Xenocode Postbuild 的问题

参考这个话题(和接受的答案)

不是只有.NET Windows(模拟器除外)吗?使用 Xenocode Postbuild 将如何影响应用程序的可移植性?使用 Xenocode Postbuild 编译我的应用程序会影响它的大小/速度吗?哪一条路?

一般来说:VS.NET 编译与 Xenocode 编译的本机二进制文件有什么区别/优点/缺点?


关于 Xenocode 中“免费试用”功能的问题;我无法让它工作;我填写了我的电子邮件等,但是当我单击按钮时,什么也没有发生,并且在一段时间后程序冻结并崩溃。看起来它正在尝试连接到服务器,但失败了,或者其他什么。有人知道为什么吗?有没有其他方法可以免费试用 Xenocode Postbuild?

0 投票
2 回答
1497 浏览

.net - 如何使用 MSBuild 和 Cruise Control 排除构建后作业

我们有一个库项目,用于我们所有的中心重用代码,称为“CentralLibs.dll”

这个库在部署期间在我们所有的服务器上都获得了 GAC,因此为了让 DEV 在本地工作时更方便,有一个构建后事件,可以使用新的 DLL 构建后自动更新他们的本地 GAC。

我们最近设置了 Cruise Control,因为 SDK 没有安装在构建服务器上,所以它在构建后事件中呕吐,但考虑到它,我真的不希望每次构建发生时库 GAC 都在那里发生反正。

有什么方法可以对我们的 CC.NET MSBuild 命令应用额外的开关,告诉它不要运行构建后事件。目前它看起来像。

我想我正在寻找/nopostbuild可以应用于<buildArgs>标签的开关之类的东西

是否存在这样的参数。MSBuild.exe / 运气不好?细节

0 投票
2 回答
174 浏览

post-build - 使用 omake 进行构建后测试

有没有办法将构建后命令添加到 omakefile?我希望它在每次构建成功时自动运行单元测试,但不确定执行此操作的最佳方法。

0 投票
2 回答
165 浏览

visual-studio-2008 - 如何在没有构建的情况下调用构建后脚本!

有谁知道我如何在不进行构建的情况下执行构建后操作?
有很多 xcopy 命令,单独使用它们会很好......但是由于所有 VS 宏,您不能将它们放入单独的 cmd 文件中。

谢谢克里斯

0 投票
2 回答
4998 浏览

c# - Visual Studio 生成事件中的空格和反斜杠

我有一个应用程序应该可以在构建前和构建后事件处理方面帮助我的项目。我正在使用 ndesk.options 进行命令行参数解析。当我的项目路径包含空格时,这给了我奇怪的结果。我认为这是 ndesk.options 的错,但我想应该归咎于我自己的应用程序。我将我的应用程序称为构建后事件,如下所示:

args[] 上的简单 foreach 显示以下内容:

发生的事情是每个参数中的最后一个 " 被视为已转义。因此,尾部的反斜杠被删除了。整个事情被视为单个参数。

现在我认为我只是简单地逃避第一个“也很聪明,就像这样:

在这种情况下,生成的 args[] 如下所示:

参数中的尾部反斜杠仍然被吞下,第一个参数现在被拆分。

将此 args[] 传递给 ndesk.options 将产生错误的结果。

正确的命令行应该如何显示,以便正确的元素最终出现在正确的 args[] 插槽中?或者,应该如何解析带有或不带有 ndesk.options 的命令行参数?欢迎任何建议。

提前致谢

0 投票
1 回答
1314 浏览

msbuild - 如何将 Visual Studio 项目的程序集版本传递给另一个项目以在构建后事件中使用?

我有两个项目的解决方案:

  • 我的应用程序 1.2.54 (C# WinForms)
  • 我的应用程序设置 1.0.0.0(WiX 设置)

我想将构建后事件添加到 WiX 设置项目以运行批处理文件并将我的应用程序的程序集版本号的命令行参数传递给它。代码可能如下所示:

但这会导致以下错误:

未处理的异常:无法评估表达式 """.My Application"。找不到方法“System.String.My Application”。C:\我的应用程序\我的应用程序设置\我的应用程序 Setup.wixproj

错误:无法评估表达式“”“.My Application”。找不到方法“System.String.My Application”。C:\我的应用程序\我的应用程序设置\我的应用程序 Setup.wixproj

我希望能够以某种方式将“1.2.54”传递给 MyBatchFile.bat。

0 投票
1 回答
125 浏览

visual-studio - 构建时自动更改 Visual Studio 源代码(更新 DBML 等)

每次通过 DBML 重建时,我都必须为各个字段调整自动生成值等的设置。

是否有内置工具可用于在构建时自动执行 DBML 中的更改?我正在使用 Visual Studio 2008。

0 投票
4 回答
3098 浏览

visual-studio-2008 - "Attach to Process" as a post-build event

I have an application that runs hosted under the "w3wp.exe" process.

While debugging, I often find myself following these steps:

1 - Make some change

2 - Build the project

3 - Attach to "w3wp.exe" using the "attach to process" dialog under the Tools menu.

4 - Perform some action in the application to make my code execute, so I can step through it in the debugger

I'd like to automate step 3 in the post-build script, so that the IDE automatically attaches to the process after the build is completed. Note that I already launch the application as a part of the post-build process, so I can count on the process existing at this point.

Does anyone know a way to automate the "attach to process" command? Something from the command line would be especially nice, but a macro would do, too.

I'm using Visual Studio 2008 under Windows 7, 64 bit.

Edit @InSane basically gave me the right answer, but it does not work because I need to debug managed code, rather than native code. It seems that vsjitdebugger defaults to Native code, and thus my breakpoint is not hit. From inside the IDE, I can specify "managed code" and the debugger attaches as expected. So is there any way to point vsjitdebugger to managed code?