Bamboo MsBuild .Net Framework 2.0 - build

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.

Related

The module "%VSINSTALLDIR%\DIA SDK\bin\msdia140.dll" failed to load, while trying to install llvm on windows 10

I am trying to get started with compiler development using llvm, I follow official setup page on the 10th step and am getting the following error
The module "%VSINSTALLDIR%\DIA SDK\bin\msdia140.dll" failed to load make sure the binary is stored at specified path or debug it to check for problems with binary or dependent .DLL files. The specified module could not be found.
Visual Studio 2022 information :
Microsoft Visual Studio Community 2022
Version 17.1.6
VisualStudio.17.Release/17.1.6+32421.90
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Community
Visual C++ 2022 00482-90000-00000-AA606
Microsoft Visual C++ 2022
ASP.NET and Web Tools 2019 17.1.363.30963
ASP.NET and Web Tools 2019
Azure App Service Tools v3.0.0 17.1.363.30963
Azure App Service Tools v3.0.0
C# Tools 4.1.0-5.22165.10+e555772db77ca828b02b4bd547c318387f11d01f
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
NuGet Package Manager 6.1.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
TypeScript Tools 17.0.1229.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 4.1.0-5.22165.10+e555772db77ca828b02b4bd547c318387f11d01f
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.
Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake
I am trying to get llvm up and running, The .dll files are available at the given location, please help.
$ ls
amd64/ arm/ arm64/ msdia140.dll*
I had the same problem as you at first, please read my solution carefully:
You need to use the cd command to enter the folder where you want to install LLVM. Regarding the cd command, I suggest you search for usage methods on Google, I believe it will be easier to understand than what I described.
The documentation mentions that You may install the llvm sources in
other location than c:\llvm but do not install into a path containing
spaces (e.g. c:\Documents and Settings...) as it will fail.
Run the Developer Command Prompt for VS 2019 as an administrator.
Enter regsvr32 "%VSINSTALLDIR%\DIA SDK\bin\msdia140.dll" to get the following result.
Please look carefully at Figure 1.

How to build on TFS a c++ native project targeting Win10 platform

A migrated VS2013 c++ native project to vs2015 targeting Windows 10 (instead of Win 8.1) gives me some issues on the TFS Build Server. I use TFS2013 and the Release12 Build Process Template.
The TFS2013 is installed on a Win10 machine with VS2015 installed on it.
When I run the build the build throws an exception in one of the tasks from the target files saying that it can't compare the numeric number 10.0.4 ... something, because that is the Target Platform set in the native project file. Obviously this is not a number with it's two dots in the version number.
Am I doing something wrong? The TF Build uses MS Build v12 by the way and not the MS Build v14 that ships with VS2015. Do I need to change to MSBuild v14 to make this work? If yes, how can I actually change the used MSBuild version?
Can you provide more information about your exception and build file?
I'm not sure is it realed to MSBuild V14.
If You want to amend the build templates to point to MS Build version 14.0. You can folow below steps :
Use the Default Template (TfvcTemplate.12.xaml) in Visual Studio
Open the template and find the Run MSBuild for Project MSBuild activity.
Set ToolVersion to "14.0".
Set ToolPath to target to MSBuild14 (by default: "C:\Program Files (x86)\MSBuild\14.0\Bin").
Check in this build process template and re-queue the build.
If you still have the same problem after you use MSBuild V14.0.
There is a realted version with 10.0.4... in VS2015. MinimumVisualStudioVersion = 10.0.40219.1 .It means the minimum visual studio version supported in VS2015. Maybe you build a file that created by a visual studio which version is earlier than the version10.0.40219.

Does MSBuild need Visual Studio to be installed?

I'm setting up a build server using Atlassian Bamboo. MSBuild is included with the .NET framework, so I believe I can build .NET applications fine at least without VS2010.
We mostly develop in C++ - will I need to install Visual Studio on the build server to build .vcxproj C++ projects, or can this be done only with MSBuild?
No you just need the toolset (libraries) see: http://msdn.microsoft.com/en-us/library/dd293607%28v=vs.100%29.aspx

Visual Studio 2010 and TFS 2008: Building unit test projects

We are currently taking VS2010 for a testdrive and so far we are a little stumped with how it just won't cooperate with our existing Team Foundation Server 2008.
We still have all our projects on .NET 3.5 and whenever we are now building a solution that contains a unit test project (which automatically builds in .NET 4.0) the TFS won't build it.
The .NET 4.0 framework is installed on the TFS 2008.
The error we're receiving is:
[Any CPU/Release] c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(0,0): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
As a temporary workaround we are now forced to remove all our test projects in order for our solutions to build.
You need to install VS2010 on your build machine.
I'v just been trying to build V4.0 solutions on TFS2008, and altered the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\tfsbuildservice.exe.config file:
<add key="MSBuildPath" value="" />
to
<add key="MSBuildPath" value="c:\Windows\Microsoft.NET\Framework\v4.0.30319\" />
The build of v3.5 and v4.0 solutions did succeed. But the unittest of the v3.5 solutions did not work.
Read about installing VS2010 on the build server, but read somewhere else: ( http://www.richard-banks.org/2009/11/how-to-build-vs2010-solutions-using.html ) that it is possible without installing VS2010.
: Text from that website:
This worked for us allowing a TFS 2008 build agent compile VS 2010 solution/project files without installing VS 2010:
Install .NET Framework 4.0 and .NET Framework 3.51 SP1 (for some reason, SP1 wasn't included with 4.0?)
Install Windows SDK 7.0A. When I'm writing this the SDK is still not released so we had to:
From a computer with VS 2010 installed, copy the SDK folder from %programfiles%\Microsoft SDKs\Windows\v7.0A and registry settings from HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\7.0A to the build machine.
Copy %programfiles%\MSBuild\Microsoft\VisualStudio\v10.0 to the build machine
Change ToolsVersion from 3.5 to 4.0 in your TFSbuild.proj file.
I think that was all. There was no need to change the build agent's configuration file.
Hopefully this will work.
Install "Agents for Visual Studio 2012"
http://www.microsoft.com/en-us/download/details.aspx?id=38186

Using MSBuild for C++ with VS2005

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