I receive an error when I attempt to execute MSBuild on the commandline:
error MSB3073: The command "call "Undefined....\vc\vcvarsall.bat" x86\r
error MSB3073: "Undefined....\vc\bin\EditBin.exe"
I am executing the following command:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "C:\Users\myuserName\Documents\Visual Studio 2012\Projects\MySolution\MySolution.sln" /p:Configuration=Debug /p:Platform="Mixed Platforms"
NOTE:
I am using VS 2012
Configuring system variables is disabled on my machine.
I am attempting to automate a build process. As a result, this is why I am choosing the command prompt versus VS Command Prompt tools.
Related
I am getting below error, while building C++ solution on VS2019 via command prompt.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.ToolsetLocation.props(50,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160Platforms\Win32\Platform.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160Platforms\Win32\Platform.props" is correct, and that the file exists on disk.
After observing it is very clear that there is an issue with the path created internally at some props file. It is not very clear why and from where this is coming up.
Any pointers would be of great help.
Thanks in advance.
MSBuild - MSB4019 Due to invalid path (Visual Studio 2019)
There is some errors when you install VS2019.
To fix it, please try this:
1) Open VS Installer, and make sure that you have installed v142 Build Tool.
Or run this on an elevated command prompt (admin): npm install --global --production windows-build-tools. If you don't have npm, I recommend installing it, otherwise this won't work.
2) I found that v160Platforms does not have \, is that the same as you description?
Please create a new environment variables called VCTargetsPath and put its value to this:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\
3) do a fix in vs installer or just update your VS if it is not thee latest version.
Then use developer command prompt for VS2019 as administrator to run your command.
In addition, you can use -verbosity:detailed in command line to see the detailed build log to check whether there is a obvious error. More info you can check this similar issue.
This was not due to the installation issues. This was caused due to VCTargetsPath passed to the MSBuild.exe. In VS2017, it was expecting the VCTargetsPath to be passed in the build command whereas it failed with construction of invalid path if we pass the value in VS2019. Hence after removing the VCTargetsPath from the command all worked well for me.
I ran into the exactly same problem today. The system env path of VCTargetsPath misses a slash at the end.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\ **<--- end slash**
I recently installed VS tools for Cordova on VS2013 with a successful install of all default settings. Upon trying to build and run the default "BlankCordovaApp" template, I get a node error.
1>MDAVSCLI : error : EPERM, operation not permitted
'C:\Windows\CSC\v2.0.6'
According to other SO posts, the directory it references is tied to offline sync, of which I have since turned off and restarted the machine with no success.
I've searched and found similar issues, but none that deal with this directory and none that have resolved the issue.
The full build output is below:
1>------ Build started: Project: BlankCordovaApp1, Configuration: Debug Windows Phone 8 ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> GeneratedJavascript=
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : '\\vmware-host\Shared Folders\Documents\Visual Studio 2013\Projects\BlankCordovaApp1\BlankCordovaApp1'
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : CMD.EXE was started with the above path as the current directory.
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : UNC paths are not supported. Defaulting to Windows directory.
1> C:\Windows>call "C:\Program Files (x86)\nodejs\"\nodevars.bat
1> Your environment has been set up for using Node.js 0.10.33 (ia32) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\QUH3Q3IS.ARB\packages\vs-mda
1>MDAVSCLI : error : EPERM, operation not permitted 'C:\Windows\CSC\v2.0.6'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
I'm running Windows 8.1 Pro in a VM (VMWare Fusion 7) with all the latest updates from VS and Windows Update, etc. and kept everything as vanilla as possible to get started.
Any ideas what is going on?
I dug a little deeper and ran the diagnostic build from Visual Studio (Tools>Options>Projects and Solutions>Build and Run>Set MSBuild project build output verbosity= Diagnostic), and saw more details about a UNC path error that was thrown, which was also shown in my original output. Turns out you can't build with a UNC path.
I moved my project to a local folder (C:\Projects...) and that allowed it to build just fine.
The solution that I found was moving the project to C:\MyProject and then start Visual Studio as administrator and it works properly
In build.gradle, I have commandLine 'jni/ndk-build.cmd' inside one of my tasks.
The contents of ndk-build.cmd is very simple:
[path containing ndk]\android-ndk-r8e\ndk-build.cmd APP_ABI="all" NDK_DEBUG=0
This works fine if I run "gradle assemble" in the command prompt. Android Studio however fails in the build process:
Information: 1 error
Information: 0 warnings
Error: Gradle: Execution failed for task ':mytask'
> A problem occurred starting process 'command 'jni/ndk-build.cmd''
Is commandLine not supported in Android Studio? If it matters, I've also tried running Android Studio as administrator (Windows).
I found the solution.
If Making in Android Studio on Windows, the command in build.gradle must be commandLine 'cmd', '/c', 'jni\\be-arm7.cmd'
The 'cmd' argument isn't necessary if the script is being run from the command prompt, which is why I saw no error doing so.
I have an MFC application in VS2010. It also contains few project in C#.
during SVN build we get this error:
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(43,5):
error MSB3073: The command "iscmdbld -p ..\..\..\testinstall.ism -r setup -o
..\..\thirdparty\installshield\mergemodules" exited with code 1.
We are using installshield 2010 for creating setup. We have same application in VS2005 also but there we don't get above mentioned error.
Please advise.
Can anybody tell me how to use partcover in Cruise control .net along with mstest,
I have done that but i am getting an error
errorMSB3073: The command "C:\Program Files\PartCover\PartCover .NET 4.0\PartCover.exe --target=${nunitExePath} --target-work-dir=D:\Demo_Project\ --target-args=D:\DEMO\TestProject\bin\Debug\TestProject.dll --include=[LaTrompa]* --output=${partCoverReportPath}\${projectTests}-Results.xml" exited with code 9009.
I have used following command in msbuild
<PropertyGroup>
<partCoverReportPath>D:\BuildReports\PartCover\</partCoverReportPath>
<nunitExePath>C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe</nunitExePath>
-->
Use Following command
C:\Program Files\PartCover\PartCover .NET 4.0\PartCover.exe" --target "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe" --include [TestProjectName]* --include [More if u have]* --target-args "/noisolation /testcontainer:path\TestProjectName.dll" --target-work-dir "Working dir of project" --output "output pathr\partcover.xml