本文介绍了如何在BuildServer建立VS2010 C ++项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个托管C ++ .NET解决方案assemlby瞄准.NET 3.5与VS2010创建的。命令:

 %WINDIR%\\ Microsoft.NET \\框架\\ v4.0.30319 \\ MSBuild.exe MyProject.sln

编译我的开发机器上的解决方案。

在我BuildServer我得到这个错误:

On my dev machine the claimed file

exists. On my build server not.

When I try to copy this files (and all others in the same directory) other errors occurred. So this is the wrong way.

EDIT: other errors means: When I copy the file "Microsoft.Cpp.Default.props" on the build server, MSBuild is claiming other files. That shows me, that just doing a copy of missing files is not what the build environment is expecting. I am looking for an MSI/whatever package that I could install on my build server and any C++ Project will build. Installing the SDK did not the trick. Or I did something wrong during SDK installation. Or it is not possible to compile Managed C++ VS2010 Solutions just with the SDK.

I believe that "other errors" has nothing to do with my problem. My Problem is: "How do I setup my build environment correctly". /EDIT

What I've done till now:

  • I have installed the latest Win7 SDK (http://blogs.msdn.com/b/windowssdk/archive/2010/05/25/released-windows-sdk-for-windows-7-and-net-framework-4.aspx)
  • I am targeting .net 3.5
  • I've tried playing with the Platform Toolset Property - but it was just playing
  • In my solution there is a managed C++ Assembly (my Problem)
  • I am using MSBuild 4.0 because the new VS2010 project files cannot be compiled with MSBuild 3.5
  • I am using CC.NET. compilation fails in CC.NET and on the command line. So it should not be a CC.NET issue.

Are there any tips and tricks how to configure my project properly to compile on my dev machine with VS2010 and on my build server? Is there anything more to install (except VS2010)?

Thanks, Arthur

解决方案

For now, installing VS 2010 is your only safe option. The Windows SDK will be updated to enable your scenario, but I don't have a specific release date. Until then, you'll need to install VS 2010 with the C++ tools in order to build your 2010 solution with C++ projects. Make sure you let the C++ team know about how dissatisfaction with this situation via their team blog and/or MSDN Forum.

Even after installing VS 2010, you may need to invoke the appropriate vcvars*.bat file to setup your environment variables correctly.

这篇关于如何在BuildServer建立VS2010 C ++项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 14:37