gpt4 book ai didi

c# - Visual Studio 生成后事件返回错误 MSB3073

转载 作者:行者123 更新时间:2023-12-04 17:55:52 28 4
gpt4 key购买 nike

我在 Visual Studio 2015 中执行一些构建后操作时遇到以下错误。

"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4291,5): error MSB3073: The command 'if 'Release'=='Release' (

...

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4291,5): error MSB3073: )' exited with code 9009. -- FAILED"

这可能是什么问题?我尝试了以下“构建后”事件脚本:

<PostBuildEvent>if "$(ConfigurationName)"=="Release" (
...
)</PostBuildEvent>

我也试过以下(不带引号):

<PostBuildEvent>if $(ConfigurationName)==Release (
...
)</PostBuildEvent>

重要说明:该问题仅在同一解决方案中的少数项目中发生,而其他项目运行良好。我在代码中没有注意到任何区别。

最佳答案

解决错误Error MSB3073

首先将解决方案模式更改为“Min-Release-dependency”,然后在解决方案资源管理器中右键单击项目

Properties ==> Custom Build Setup==> General ==> Command line : 选择 inherit from parent 然后点击 apply 和 OK,然后重建解决方案。

它应该没有错误地构建。

关于c# - Visual Studio 生成后事件返回错误 MSB3073,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40479743/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com