Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:\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"

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.

like image 324
Kunal Chowdhury Avatar asked Nov 16 '25 15:11

Kunal Chowdhury


1 Answers

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.

like image 90
Akindele M Elias Avatar answered Nov 19 '25 05:11

Akindele M Elias



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!