Unable to build for Debug|x64 using MSBuild and VC++ Express edition - visual-c++

I have machine with VC++ Express Edition installed. And also .Net frameworks 2-4. I want to use msbuild through command line to build a VC++ project.
Issue is the build runs fine for Configuration=Debug;Platform=Win32 but for Configuration=Debug;Platform=x64 it gives an error that:
"….vcproj" (Clean;Build target) (1) ->
(Clean target) ->
vcbuild.exe : error VCBLD0004: Project ….vcproj' does not contain a configuration called 'Debug|x64'.
However if I view .csproj file directly it does have that configuration. I feel the issue is the missing x64 build tools. But while installing VC++ Express Edition it doesn't give an option to include x64 build tools like you get during complete Visual Studio 2008 installation.
So how can I get around that given that, I can't install a complete VS like there is on development environment because of several restriction.

Related

MSBuild using the wrong cl.exe when building with the 2015 C++ v140 Platform Toolkit

We're currently making a build environment for some of our projects.
In particular we're using VC++ 6.0 and VS2019 to build some of these projects.
When building our C++ project in VS2019 with the Platform Toolkit set to C++ 2015 v140, MSBuild attempts to use the VC++ 6.0 compiler to build the project. If I switch the Toolkit to any other version it builds with the correct cl.exe.
If I remove the VC98 folder that contains cl.exe from the path environment variable I get a cl.exe can't be found error in VS2019.
So I think there's something hardcoding the 2015 toolkit against the VC6.0 cl.exe.
I've tried installing and reinstalling the additional components in the VS Installer but no luck.
Repair of VS2019 didn't fix it either.
I've tried all versions of Visual Studio back to 2013 same issue.
This looks like an MSBuild issue, it's in the wrong location.
Is there any place where I can view the mapping for the toolkits in MSBuild? I couldn't see much in the registry.
The output when I build shows the following, the version is clearly a very old compiler (the VC6.0 one):
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86

MSBuild on Centos returns "The imported project "/Microsoft.Cpp.Default.props" was not found"

I'm trying to build a VS project in CentOS. I installed dotnet-sdk-2.2 via yum install dotnet-sdk-2.2.
When executing dotnet msbuild myproj.vcxproj I get:
Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
mtproj.vcxproj(19,3): error MSB4019: The imported project "/Microsoft.Cpp.Default.props"
was not found. Confirm that the path in the <Import> declaration is correct, and that the
file exists on disk.
Googling results with many solutions but for Windows. what can I do to resolve this over Linux/CentOS?
According to your error message it's a C++ project.
Please check this document,the dotnet CLI only supports .NET / .NET Core / .NET Standard projects.
C++ projects are part of the visual studio tooling (c++ workload). The dotnet CLI doesn't contain the visual c++ compiler or the necessary windows SDKs. So it's not supported to build C++ projects directly using dotnet msbuild in Windows, not to speak of CentOS.
To build C++ projects in linux, you can try g++ compiler, you can find many related info about how to use it online.
Also, maybe you can try using GCCBuild to build vcxproj files in Linux. It simple uses same structure of vcxproj but uses GCC to compile and build. Thanks to Roozbeh.

PhoneGap add wp8 platform requires MSBuild x86

When trying to add the wp8 platform to a project, using:
phonegap local build wp8
It fails. Requiring msbuild x86.
C:\Program Files (x86)\MSBuild\Microsoft\WindowsPhone\v8.0\Microsoft.WindowsPhon
e.v8.0.Overrides.targets(15,9): error : Building Windows Phone application using
MSBuild 64 bit is not supported. If you are using TFS build definitions, change
the MSBuild platform to x86. [C:\funiz\platforms\wp8\Funiz.csproj]
ERROR: MSBuild failed to create .xap when building cordova-wp8 for debugging.
This is a Windows 8.1 machine, with Visual Studio Ultimate 2013, Update 2 RC.
The PATH environment variable is set to:
C:\Users\Yoram Kornatzky\AppData\Roaming\npm;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Windows\Microsoft.NET\Framework\v4.0.30319
I tried removing the Frame64 element from the PATH. But it still fails.
Any insight would be appreciated.
You haven't specified the build template you are using. But if you are using DefaultTemplate in your team build definition, change value of parameter "MSBuild Platform" from Auto to X86

fatal error LNK1112 while upgrading from VS 2005 (v80) to VS 2012

I have a VS Win32 based project in VS 2005 and it was used to build correctly in v80. Now I have upgraded it to VS 2012 with some C# projects that build correctly in v110. I have installed Daffodil tool chain to build the old C++ projects in v80 configuration. Now when I build it with v80 (with win32) all goes well. But when I build it with v80 (configuration x64) there occurs a link error "LNK 1112" and when build with v100 i get TRACKER : error TRK0002.
I have "Target Machine" set to x64 in linker->advanced settings. I have chosen x64 as Active solution plateform. Cant figure out why this error occurs?
I want my project to be built on x64.
Also there are no target machine set in Linker->Command line properties
Any help in this regard will be appreciated.

VS2012 Install Shield project building using TFS build definition

I have a VS2012 sln which includes an install shield installer project.
If I build the solution/projects manually via solution explorer everything builds fine.
However when using the TFS build definitions i get the following error:
C:\Builds\1\<NAME>\<Build_Definition_Name>\Sources\InstallSetup\InstallSetup.isproj (29): The imported project
"C:\Program Files (x86)\MSBuild\InstallShield\2012SpringLimited\InstallShield.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Can someone please help with this?
Info:
Using VS 2012
OS - Win 7 x64 Pro
You need to install InstallShield on the machine on which you are running the build.
In-case someone is facing the same issue, I was able to solve it by reading what Flexera mentioned on their website: Link
Brief description: in build definition, process tab, make sure the MSBuild Platform is targeting x86.
I too had 64bit Windows (8.1) running and Team Foundation Server 2013 Express.

Resources