Visual studio error msb3073 the command



Visual studio error msb3073 the command

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Asked by:

Question

I have converted a project from VC++ 6.0 to VC++ 2010, and these are the steps I went through when I compiled the project:

  • Clean Solution
  • Rebuild Solution or
  • Build Solution (The 1st time)

Here is the error I get when I follow those steps above:

error MSB3073: The command «regsvr32 /s /c «C:\SourceControl\MyProject\.\Debug\MyProject.dll»
echo regsvr32 exec. time > «.\Debug\regsvr32.trg»
echo Execute mtxrereg.exe before using MTS components in MTS

:VCEnd» exited with code 3. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets 183 6

However, immediately after getting that error where I do just a “Build Solution” ONLY I get Build succeeded

Under Project > Properties > Configuration Properties > Custom Build Step I have Command Line:

regsvr32 /s /c «$(TargetPath)»
echo regsvr32 exec. time > «$(OutDir)regsvr32.trg»
echo Execute mtxrereg.exe before using MTS components in MTS

Does anyone know why this happens and how I can resolve it?

NOTE: I do have VS 2010 set to “Run As Administrator”

All replies

Thanks for your post in the MSDN Forum.

Based my experience and analysis into this issue, I think there some possible reasons for this issue. For example, perhaps the DLL has already been registered successfully, maybe you have not got enough power to register it, and there may be some issues with the codes, etc. At present I am not able to decide which one is the root cause unfortunately.

I suggest you try registering the DLL in command line. Please pay attention that you should run CMD as administrator. If this doesn’t work, please post the error messages here and feel free to let us know. We’ll continue working with you on this issue.

Best regards,
Helen
Helen Zhao [MSFT]
MSDN Community Support | Feedback to us

Thanks for the suggestion. My apologies I should have stated that I have admin rights on my workstation and I have been able to register various DLL’s before. I even took the extra step to pin my CMD to the task bar with “Run As Administrator” set under Shortcut > Advanced. With my Visual Studio 2010 I have done the same thing but I’ve also set “Run this program as an administrator” under the Compatibility tab as well.

Just to recap my steps I did the following:

  • Clean Solution
  • Build Solution (The 1st time)

I still get error MSB3073, but before I do just a Build ONLY I checked MyProject\Debug folder and it produced the following files:

  • MyProject.dll.intermediate.manifest
  • MyProject.dll.embed.manifest.res
  • MyProject.dll.embed.manifest
  • MyProject_manifest.rc

NOTE: Under Project > Properties > Configuration Properties > Linker > General I have “ Output File ” putting MyProject.DLL in a different location (i.e. C:\Share\MyProject\Bin). So, MyProject.DLL is also created. All 5 files have the same Datetime stamp.

When I do a Build ONLY the second time (NO Clean Solution or Rebuild Solution) it says Build succeeded. So, I do not know what Build does differently the second time that it didn’t do the first time when it fails.

NOTE: Rebuild ONLY produces error MSB3073 every time.

Does having the Output file pointing to a different location make any difference? I assume not since it compiled both times.

Keep in mind that this was upgraded from VC++ 6.0 to 2010 so this was part of the original settings:

regsvr32 /s /c «$(TargetPath)»
echo regsvr32 exec. time > «$(OutDir)regsvr32.trg»
echo Execute mtxrereg.exe before using MTS components in MTS

Читайте также:  Что это за ошибка exception access violation

VC++ 6 have it under Project > Settings… > Custom Build tab, and VC++ 2010 puts it under Project > Properties > Configuration Properties > Custom Build Step

Источник

Visual studio error msb3073 the command

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I’m compiling a C++ MFC solution in Visual Studio 2015 in Debug configuration mode and it compiles and runs without error. I can run it using Start Debugging or Start Without Debugging and it runs OK.

If I attempt to run it in Release configuration mode, it gives the following error three times:

I originally got these errors when I first started working with this solution and I made changes to fix it. However, I was working in Debug mode and never attempted to compile it in Release mode until now and I am getting the errors.

I tried opening Visual Studio as Administrator and that did not help.

Any help anyone can provide would be gratefully appreciated.

Stop The World, I want To Get Off! . Life Isn’t About Waiting For The Storm To Pass . It’s About Learning To Dance In The Rain.

Источник

Visual studio error msb3073 the command

Answered by:

Question

I am trying to run a build using TFS and I geting an error.

It looks like it fail on some post events (md directory + copy) of a VS project.

Is it a known bug in TFS build ?

If I build the solution without using TFS build it works !

Solution: MasterSolution.sln, Project: Destinator.PC.Services.Local.csproj, Compilation errors and warnings

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(3089,13): error MSB3073: The command «md C:\console_build\Destinator_IL\PCPortal Master\Sources\PCPortal\DestinatorPC\\Destinator.PC.App\C:\console_build\Destinator_IL\PCPortal Master\Binaries\Release\

copy *.* C:\console_build\Destinator_IL\PCPortal Master\Sources\PCPortal\DestinatorPC\\Destinator.PC.App\C:\console_build\Destinator_IL\PCPortal Master\Binaries\Release\» exited with code 1.

Solution: MasterSolution.sln, Project: Destinator.PC.MapsInitoXmlConverter.csproj, Compilation errors and warnings

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(3089,13): error MSB3073: The command «md C:\console_build\Destinator_IL\PCPortal Master\Sources\PCPortal\DestinatorPC\\bin

copy Destinator.PC.MapsIniToXmlConverter.dll C:\console_build\Destinator_IL\PCPortal Master\Sources\PCPortal\DestinatorPC\\bin» exited with code 1.

Answers

Sorry — didn’t notice the command in the first post. Here’s your issue: when you are building in visual studio, $(OutDir) is a relative path — typically something like «bin\Debug». In a Team Build, $(OutDir) is an absolute path — in your case it is «C:\console_build\Destinator_IL\PCPortal Master\Binaries\Release\». Try the following:

md $(SolutionDir)\Destinator.PC.App\bin\$(Configuration)
copy *.* $(SolutionDir)\Destinator.PC.App\bin\$(Configuration)

This should work for your case, since it looks like your Platform is «Any CPU». Typically for other Platforms (e.g. x86) you would want to do something like:

md $(SolutionDir)\Destinator.PC.App\bin\$(Platform)\$(Configuration)
copy *.* $(SolutionDir)\Destinator.PC.App\bin\$(Platform)\$(Configuration)

Let me know if this doesn’t do the trick for you.

All replies

The problem is in the post build event of the project:

Источник

Visual studio error msb3073 the command

OK Loser Dd, You asked for it.

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command «echo Build

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: if «%VS71COMNTOOLS%»==»» goto NotInstalled

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: echo VCINSTALLDIR=%VCINSTALLDIR%

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: if «%VCINSTALLDIR%»==»» call «%VS71COMNTOOLS%\vsvars32.bat»

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073:

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: call .\make.bat «DEBUG_OPTS=/Zi /Od»

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: if errorlevel 1 goto Simt4Failed

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073:

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: echo Copy to TCF agent

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: set AgentSimt4ApiDir=C:\Projects\tools\synaptics-tool-chain\Source\org.eclipse.tcf.agent\Simt4Api

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: set AgentToolbox=C:\Projects\tools\synaptics-tool-chain\Toolbox

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: if exist %AgentSimt4ApiDir% (

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: copy build\windows\simt4.dll %AgentSimt4ApiDir%

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: copy build\windows\simt4.lib %AgentSimt4ApiDir%

Читайте также:  If this is the first time you have seen this stop error screen

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: copy build\windows\simt4.dll %AgentToolbox%\windows\lib

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: copy build\windows\simt4.lib %AgentToolbox%\windows\lib

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: copy ISimt4Api.h %AgentSimt4ApiDir%

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: copy Simt4ApiLoader.h %AgentSimt4ApiDir%

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: copy Simt4ApiLoader.cpp %AgentSimt4ApiDir%

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: rem want to fully linked version

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: copy full-simt4.pl %AgentSimt4ApiDir%\simt4.pl

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: copy full-simt4.pl %AgentToolbox%\windows\bin\simt4.pl

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: )

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073:

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: goto end

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073:

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: :Simt4Failed

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: echo Simt4 Build Failed

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: goto end

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073:

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: :NotInstalled

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: echo Visual Studio .NET 2003 not installed

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: goto end

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073:

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: :end

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073:

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: exit 0″ exited with code -1.

1>Time Elapsed 00:00:10.00

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I bet that was not helpful.

Hmm . you may have something there on the Toolset version.

You may have noticed that the Build Command script specifically references the VS .NET 2003 version of vcvars32.bat. Perhaps that old choice of compiler is not playing nice with the version of MSBuild in VS 2010. I’ll read up on the article you cited Barry.

I tried manually editing the project files from

Unfortunately that resulted in a completely different error which I could not resolve despite trying solutions I found in other threads.

Specifically the error

1>C:\Projects\tools\simt4\simt4\simt4.2010.vcxproj(31,3): error MSB4019: The imported project «c:\Microsoft.Cpp.Default.props» was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

I am stuck again.

You might note that I have an explicit

at the end of my command script and MSBuild still reports return code -1.

How is this even possible?

Based on the error message the problem is the whole command exit with error code -1. And that exit 0 seem located in your file, please check whether the whole command is like the following

I’ve grouped your error message together:

So I think the problem is more related to how you run this batch in msbuild. The common step to work on this is like:

What about let’s check the following:

1. What if you manually run your batch file within cmd?(Here I’m not so sure, I still haven’t build a concept about your steps. I think msbuild is different from makefile project,see here http://blogs.msdn.com/b/vcblog/archive/2006/12/07/converting-to-msbuild.aspx and also here http://programmers.stackexchange.com/questions/216175/why-should-i-use-msbuild-instead-of-visual-studio-solution-files They seems to be different tool with different process.)

2. What about check whether msbuild has executed your batch file in the right way? We need to make sure msbuild recognize this file.

Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.

1) You can see in what I have already provide I use the call command to run my make.bat file.

2) Let me clarify the situation and my intent.

2a) the make.bat is years old and was originally created to run using cmd.exe by someone else.

Читайте также:  Ssl certificate error on android

2b) I use Visual Studio as my editor and debugger. Due to some legacy dependencies I cannot (yet) use a native .vcxproj to build this project. I am stuck with using my make.bat for now.

2c) For convenience I have been using a ‘Make file’ project type to launch the make.bat. This has the advantage of parsing the errors messages from cl and being able to start the debugger after the build succeeds. This has been successful with Visual Studio 2008.

I have a related project which I am building with Visual Studio 2010. I thought it would be more convenient to use Visual Studio 2010 for both. So it is Visual Studio 2010 specifically which outputs the MSB3073 error message. The error repeats many lines which results in the output from my make.bat inconveniently scrolling out of view.

So it seems that MSBuild is processing the .vcproj file in Visual Studio 2010.

2d) Why I posted this message is due to Visual Studio 2010 reporting the MSB3073 error when my make.bat is successful.

3) As the first article that you referenced suggests, I tried the /B switch of the exit command. It made NO difference in the resulting output.

4) My make.bat file via Visual Studio 2010 is properly being executed because I can see the successful results of the compiles and link.

@J.R,
Thanks for your detailed description and I want to share something in my mind:
First, all the things we have:
Now I can unstand that you want to use MSBuild to build your project which is written as make.bat file. And as we can see from your previous message that the whole bat file is translated to MSBuild command. But the result is that MSBuild does not know that complex command and at last it reports -1 to you.
VS2008:
You mentioned «This has been successful with Visual Studio 2008.» and I agree it will work because make can recognize many «built-in» DOS commands, it can also use bat file in it.
VS2010:
VS2010 is different, it switch to use MSBuild instead of previous things.
As a result, when we use MSBuild it is already a different experience:
Here we start https://msdn.microsoft.com/en-us/library/dd393574.aspx
And here is the common command:
MSBuild.exe MyProj.proj /property:Configuration=Debug
The problem is how MSBuild can run a bat file? I know you have called «make.bat» in your batch. However it is not MSBuild way. MSBuild need at least a project file, like the way mentioned here:
https://msdn.microsoft.com/en-us/library/dd576348.aspx

When I asked you to use «call» before, actually I mean I want you to add your bat file in your project file, I don’t know you do not have any vcxproj file.

I hope I’ve already clarified our case without error, please correct me if I’m wrong any where.

Furthermore, I think it is better for you to consider use MSBuild to create a new MSBuild script. They are different ways when building the application in my mind.

Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.

Источник

Оцените статью
toolgir.ru
Adblock
detector