Is it possible to use the latest MSBuild (.NET4/VS2010) with the VS2005 toolchain?
I have a C++ project which compiles against VS2005. I'm not ready to upgrade to VS2010 while the compiler is still in beta. But I'd like to use the new version of MSBuild because it builds C++ natively and provides extension points and flexibility which the old VCBuild tool doesn't.
Does anyone know if you can use MSBuild this way? Or is MSBuild in .NET 4 coupled to the VS2010 toolchain?
Thanks in advance,
Ben
If you are not ready to upgrade to VS2010 because it is in Beta, are you not concerned that .NET 4.0 is beta? You can use MSBuild 4.0 to target other version of the .NET runtime (2.0 and above), but those tools are in beta as well.
You would have to convert your projects files to MSBuild 4.0 project files and then use those. The easiest way to do this is to open the solution file in Visual Studio 2010.
Sayed Ibrahim Hashimi
My Book: Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build
This answer is probably no longer interesting to you but in case anyone hits this on a search:
MSBuild as available with .net 4.0 can be used to build native c++ projects that target VS2010, VS2008 or (with a bit of customisation) VS2005
This is done by setting the Platform Toolset.
See the following blog post for a detailed description:
http://blogs.msdn.com/b/vcblog/archive/2009/12/08/c-native-multi-targeting.aspx
Related
My project is .Net Framework 2.0 and I am use Visual Studio 2012. My project build success at my local but project is build error at bamboo server
Solution file error MSB5014: File format version is not recognized.
MSBuild can only read solution files between versions 7.0 and 9.0,
inclusive.
You need to use version 4 of MSBuild in the "Executable" option as this determines the version of MSBuild tools used to compile the application. Do not confuse this with the version of the .NET framework you are targetting, which is controlled by your project files.
I have a lot of projects done with VS2010 in C++. Now we have switched to VS2012 but we want to continue building the projects with the VS2010 runtime (we need to support Windows XP).
To our understanding this could be possible using Windows SDK 7.1 as the VC compiler is there so we installed it. VS2012 recognized the SDK and now we have a Platform Toolset named Windows7.1SDK.
The problem comes when building the projects as some projects are returning a:
error MSB6006: "CL.exe" exited with code -1073741515.
Also, projects depending on the MFCs are failing too. MFCs aren't available with Windows SDK? Does this mean that we need to buy VS2010 licenses to install them on machines with VS2012 just to build using the VS2010 compiler?
Thanks in advance.
Looks like it's not possible at all, mainly because nothing but VS2010 is deploying the MFC libraries and we have a lot of projects using them.
We'll have to buy licenses for VS2010 and VS2012 :S
I would try raise the msbuild verbosity level (it is in Tools->Options->Project and Solution-> MSBuild) and check out the command of CL.exe with full parameters. Then check if it is different from what you saw on VS2010.
In fall Microsoft will release an update to support windows xp in visual studio 2012, you can read more in this MSDN blog:
http://blogs.msdn.com/b/vcblog/archive/2012/06/15/10320645.aspx
I'm interested in compiling Thrift-generated code and linking to the thrift C++ library in a windows environment. Doing some research, I found a few recent links:
1) Thrift Win32 Installation Using Cygwin/MinGW
2) THRIFT-1031 and THRIFT-1123 patches to compile in MS Visual C++
Using #1, I was able to compile a linux library using MinGW, named libthrift.a. But what I would REALLY like to do is be able to generate Thrift code, and compile it IN WINDOWS using a Thrift dll or lib.
In other words, I see how I can use MinGW to compile Thrift code that EXECUTES in Windows. But I want to be able to DEVELOP AND COMPILE code that uses Thrift, in Windows. Is this possible?
If not, I suppose #2 is my only option, but it seems to be still highly in development phase.
Any ideas?
Thrift 0.8 has Visual Studio 2010 projects for the Thrift compilier and library. A number of contributors have put in alot of hard work to support Windows VS development. The 0.8 dev release may be downloaded as a snapshot or via SVN http://thrift.apache.org/download/
I've created projects using Thrift in VS and it works great.
ThereĀ“s a patch available to copile the thrift runtime with visual studio c++. It would be great if the thift developers put this patch in the main code.
https://issues.apache.org/jira/browse/THRIFT-591
Thrift 0.10.0 has much better support for building on Windows.
Visual Studio projects in the source which is the recommended approach on the official site.
CMake generated Visual Studio C++ projects which is not documented on the official site but turns out to be more convenient.
See Apache Thrift on Windows for detailed steps.
I downloaded open-source version of Qt from the site and have compiled it with nmake, but I'm having trouble using it in my projects. It seems that Visual Studio can't find the Qt headers, even though I added the paths to my PATH, INCLUDE, and LIB variables. I tried installing the Qt Visual Studio add-in but it only supports Visual Studio 2008.
Has anyone gotten Qt to work with Visual Studio 2010? Or do I have to wait until Qt 4.7 is officially released for Visual Studio 2010 support?
Either download the pre-built vs2008 package or build it using cmake's vs2008 profile and then open the resulting .sln file in vs2010 and let it do the conversion.
edit - annoying feature so far is that the vs plugin doesn't support vs2010 which makes it essentially impossible to use for desktop app development.
Traditionally VS support was part of the paid licences, with the OS package you only get mingw support. Things are changing, but might have some rough edges for a while.
OTOH, mingw has a HUGE advantage: deployment. You don't have to chase around the vcredist_x86 files and all the associated voodoo. Just be sure to include all the .DLLs you use and that's it.
Also, there's QtCreator. It's not as featureful or omniscient as VS; but it does feel a lot nicer and easier to use. It takes off all the tedious work of nmake, and embeds the UI editors. And it's cross platform!
honestly, for me VS can drop dead this minute and i won't miss it.
Qt V4.8.0 contains prebuilt binaries for Visual Studio 2010 so you don't need to build manually anymore:
http://qt.nokia.com/downloads/windows-cpp-vs2010
We have a build box that uses CruiseControl.Net and has been building VB.Net and C# projects using msbuild. All I have installed on the box as far as .Net is concerned is .Net 2.0 SDK (I'm trying to keep the box as clean as possible). We are now trying to get a C++ app building on this box. The problem we are running into is that the header files (e.g. windows.h) are not installed with the SDK.
Do I have to install VS 2005 to get this to work?
Edit:
As a couple people have answered, I had actually downloaded the 3.5 Platform SDK, but the applications built on this box MUST run on boxes that do not have 3.5 installed. By installing the 3.5 SDK on my 2.0 build box, am I compromising my build box?
Edit:
I'm going to leave this as unanswered, but thought I would add that I went ahead and installed Visual Studio on the box and all is well. I hate having to do that, but didn't want to run the risk of having a 3.5 SDK on my 2.0 build box. I would still love to hear a better solution.
Visual Studio is not needed, but for C++ you need the Platform SDK as well:
http://www.microsoft.com/downloads/details.aspx?familyid=484269E2-3B89-47E3-8EB7-1F2BE6D7123A&displaylang=en
Edit: There is also one for Windows 2008/Vista, not sure which is the correct one:
http://www.microsoft.com/downloads/details.aspx?familyid=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en
No, you have to install the windows platform SDK.
You'll need to download this:
http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en
Edit: #Michael Stum
You need the Server 2008 / Vista / .NET 3.5 SDK version.
Depending on what you are using in C++ (MFC, ATL, etc) you are probably going to have to install Visual Studio Professional (not express) as a lot of the libraries and headers are part of Visual Studio and not included in the SDK or Visual Studio Express (if you are doing managed C++ using .Net as the main framework then installing the SDK will be enough). We run our build boxes on VM's and so like to have as little installed as possible, so I spent a fair bit of time trying to get things working by installing as little as possible and for our C++ I ended up having to install Visual Studio.
I don't see why having .NET 3.5 would comprimise the build box - 2.0 and 3.5 co-exist without a problem. The only concern I could see would be a developer upgrading a solution to VS2008 without your "permission" and the build not failing...
In general, you need some set of SDKs (Software Development Kits) to be able to build, and some set of redistributable packages to run.
In case it's not obvious, you should be testing your product on an otherwise clean machine before you ship, so you know you got the dependencies right.