Visual Studio post build event returns error MSB3073

I am getting the following error while doing some post build operations from Visual Studio 2015.

"C:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(4291,5): error MSB3073: The command 'if 'Release'=='Release' (

...

C:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(4291,5): error MSB3073: )' exited with code 9009. -- FAILED"

What could be the issue here? I tried the following 'Post Build' event script:

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

I have also tried the following (without the quotes):

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

One important note: The issue is happening only on few projects within the same solution, whereas the others are working fine. No difference that I have noticed yet in the code.


To Solve the error Error MSB3073

first of all change the solution mode to "Min-Release-dependency" then right click on the project in the solutions explorer

Properties ==> Custom Build Setup==> General ==> Command line : choose inherit from parent and then click on apply and OK, then rebuild the solution.

it should build with no errors.

链接地址: http://www.djcxy.com/p/44216.html

上一篇: 如何以编程方式检查iOS应用中是否存在键盘?

下一篇: Visual Studio发布生成事件返回错误MSB3073