user3153918
user3153918

Reputation: 193

error MSB3073: The command exited with code 3

When I try build the solution created in Visual Studio 2013 in Visual Studio 2015,

I got the follow error:

"18>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1250,5): error MSB3073: The command ""%CommonProgramFiles(x86)%\microsoft shared\TextTemplating\12.0\TextTransform.exe" -a !!build!true "C:\Users\b3bi\Documents\Visual Studio 2015\Projects\SKNL\trunk\GDP\My Project\AssemblyInfo.tt"" exited with code 3."

The file in this error shows is:

<PropertyGroup>
    <PreBuildEventDependsOn></PreBuildEventDependsOn>
  </PropertyGroup>
  <Target
      Name="PreBuildEvent"
      Condition="'$(PreBuildEvent)'!=''"
      DependsOnTargets="$(PreBuildEventDependsOn)">

    **<Exec WorkingDirectory="$(OutDir)" Command="$(PreBuildEvent)" />**

  </Target>

Someone knows what is the problem?

Upvotes: 19

Views: 44301

Answers (4)

Vadim
Vadim

Reputation: 19

it's decide my problem

dotnet tool install --global protobuf-net.Protogen --version 3.1.22

Upvotes: -1

Lino
Lino

Reputation: 174

After installing vs 22 and un installing 2019 I faced this issue, I checked the runtimes and 'Microsoft.NETCore.App', version '3.1.0' was missing downloaded it from [here][1] and everything worked fine.

plz note that the dll that was mentioned in the error, was targeting 3.0.1, you may need to install a different version according to the version u r targeting [1]: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-3.1.416-windows-x64-installer

Upvotes: 0

osim_ans
osim_ans

Reputation: 457

I was getting same error while build in azure pipeline, After installing the framework 'Microsoft.NETCore.App', version '3.1.0', I was able to resolve this error.

Upvotes: 1

ToFo
ToFo

Reputation: 1683

The path is wrong. In my case the WiX version was updated in the files. But I had not changed the name (the version number) in the code, thus leading to the path error - which is reffered to as "code 3".

The answer is therefore to edit the path in the pre-build event command line (Project Settings -> Pre-Build Event), so that it is correct.

Upvotes: 17

Related Questions