Can we build *.vcxproj(c++ project) using MSBuild 4.0 without installing the Visual Studio...

  • Thread starter Thread starter isericxustubborn
  • Start date Start date
I

isericxustubborn

Guest
Hi All.

Can somebody tell me that can we build *.vcxproj (vc++ 2010 project as you know) using MSBuild 4.0 and without installing the VS2010 product?

What I have tried were like as follows:

1. The build server runs on Windows Server 2003 x64 platform and with dotNetFx40_Full_x86_x64.exe installed on it.

2. Install the Windows SDK v7.1 which is named as "Microsoft Windows SDK for Windows 7 and .NET Framework 4".

For the name, Im really rather confused about it. Its really not a good name for Microsoft Windows SDK v7.1 even if it supports other OS like Windows Server 2003 etc, I think.

As the installed SDK version is v7.0a which is shipped with VS2010 together on the development machine. So I install the v7.1 for supporting .net framework 4.0 in order to use msbuild 4.0.

3. If I run cmd.exe directly, then it got errors as a popup message (window/dialog) which says as follows:

(which it means that I didnt use the windows sdk v7.1 command line tool)

---------------------------
CL.exe - Unable To Locate Component
---------------------------
This application has failed to start because mspdb100.dll was not found. Re-installing the application may fix this problem.
---------------------------
OK
---------------------------

4. So I changed to run windows sdk v7.1 command line tool, then it got errors as follows:
"E:\myproj\TestCppProj.vcxproj" (Build target) (1) ->(ClCompile target) -> e:\myproj\stdafx.h(12):
fatal error C1083: Cannot open include file: windows.h: No such file or directory [E:\myproj\TestCppProj.vcxproj]
But the file windows.h does exist in the following folders:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Include
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\Include

It seems that the file name in stdafx.h should be Windows.h.
But it still got error like the above after change windows.h to Windows.h in file stdafx.h.

Is there any other things to be installed or need other configurations?

5. From its ReleaseNotes_Win7RTMSDK.htm, I didnt find any known issues about it.

6. From MSDN online, I searched out some stuff like as follows:
URL: http://msdn.microsoft.com/en-us/library/dd393574.aspx
[
The Microsoft Build Engine (MSBuild) is a platform for building applications.
MSBuild provides an XML schema for a project file that controls how the build platform processes and builds software.
Although MSBuild is integrated into Visual Studio, it is not dependent on it.
Developers can orchestrate and build products in environments where Visual Studio is not installed.
]
Im confused that What related components do I need to install for using MSBuild 4.0 without Visual Studio installed.
just isntall .net framework 4.0?
And for c++ project, what should be installed if using MSBuild4.0 instead of vcbuild?

7. "Visual C++ projects can now use MSBuild scripts, with support for native builds."
This is from URL: http://msdn.microsoft.com/en-us/library/ee240939.aspx.
Fortunately, We can use MSBuild to build vc++ project directly. So, does it need to install VS2010?
Unfortunately, I havent found out what related components or files should be installed for this feature.
Maybe one version of the Windows SDK? Or vc++ redistributable packages or vc++ runtime libs?

8. So, on the development machine, there are serveral redistributable packages isntalled:
Microsoft Visual C++ 2005 Redistributable
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4148
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4974
Microsoft Visual C++ 2010 x64 Designtime - 10.0.30319
Microsoft Visual C++ 2010 x64 Runtime - 10.0.30319
Microsoft Visual C++ 2010 x86 Runtime - 10.0.30319

And, the Windows SDK version is v7.0a after vs2010 is installed.
As there is a folder like this:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A
So, does this mean the current windows sdk version is v7.0A?

9. From MSDN online I also searched out the "MSBuild (Visual C++) Overview"
URL: http://msdn.microsoft.com/en-us/library/ee662426.aspx
Where there is a paragrah from the top section:
[
MSBuild is the standard build system for Visual C++ projects.
When you build a project in the Visual Studio integrated development environment (IDE),
it uses the msbuild.exe tool, an XML-based project file, and optional settings files.
Although you can use msbuild.exe and a project file on the command line,
the IDE provides a user interface so that you can more easily configure settings and build a project.
This overview describes how Visual C++ uses the MSBuild system.
]

So, does it mean that if we wonder to use msbuild to build vc project from comand line, then it also need to install VS2010?


For summary about my questions:
Can somebody tell me that if I want to build vc++ project(*.vcxproj) using MSBuild 4.0 on command line, what components or packages or sdks should be installed instead of installing the VS2010?
Or, maybe it is impossible to do it without installing VS2010?

Thanks

Continue reading...
 
Back
Top