msbuild conversion tool to VS2010 - visual-studio

I got vcproj file from QMake (qmake -tp vc win32.pro), and when I run it with msbuild (msbuild for VS 2010), I get the following error.
MSBUILD : error MSB4192: The project file ".\win32.vcproj" is in the ".vcproj" or ".dsp" file format
, which MSBuild cannot build directly. Please convert the project by opening it in the Visual Studio
IDE or running the conversion tool, or, for ".vcproj", use MSBuild to build the solution file conta
ining the project instead.
I'd like to run the conversion tool for getting VS2010 project file. What's the tool for it?
ADDED
Based on heavyd's answer, I got it work.
qmake -project
qmake -tp vc win32.pro
devenv /Upgrade win32.vcproj
msbuild win32.vcxproj
One can use nmake, which is simpler.
qmake -spec win32-msvc2008
nmake

The conversion tools is built into the Visual Studio IDE. You can run it by opening a Visual Studio 2010 Command Prompt (Start->Microsoft Visual Studio 2010->Visual Studio Tools) and typing:
devenv /Upgrade example.vcproj
Where example.vcproj is your VS 2005/2008 Visual C++ project file. This should upgrade you project to VS 2010 so it can be built directly with MSBuild.

Related

Creating MSI from command using devenv without installing Visual Studio

I am creating an MSI file by building using devenv command. I don't want to install visual studio. Is there an alternative to it?
Visual Studio is paid and I don't want to buy it.
EDIT :
I can't use MSBuild because I have .vdproj file which can't be build using MSBuild. So I use devenv.

VS 2017 .NET Standard Class Library build error when trigger from TFS (VSTS)

My sln is built in VS2017 and contains several .Net Standard class library dll. Build always works successfully in my local machine/virtual machine, with VS UI or just use devenv.com via command-line.
But, when I use TFS to create build task, error about InternalVisibleTo shows.
When I use MSBuild,
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe" "C:\WorkArea\xxxxx\_work\1\s\xxxxx\Main\Source\xxxx.sln" /nologo /nr:false /t:"Clean" /dl:CentralLogger,"C:\WorkArea\xxxxx\tasks\MSBuild\1.0.55\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=30268741-631d-4ac8-b4d2-d5b2774b61e7|SolutionDir=C:\WorkArea\xxxxx\_work\1\s\xxxx\Main\Source"*ForwardingLogger,"C:\WorkArea\xxxxx\tasks\MSBuild\1.0.55\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:platform="Any CPU" /p:configuration="Debug" /p:_MSDeployUserAgent="TFS_6e1df8d0-1a29-425d-803c-d70779d0c76a_build_3175_345868"
it has the error:
When I use devenv.com,
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com" "C:\WorkArea\xxxxxx\_work\1\s\xxxxx\Main\Source\xxxxxx.sln" /build "debug"
it has the error:
Is it a known issue or bug of Current Visual Studio 2017 (version 15.2 - 26430.6)? What's wrong with the AssemlyInfo? What's wrong with the TFS build?
You need to restore NuGet packages before attempting the build to resolve references to the reference assemblies that provide you the core types.
You can do this using msbuild /t:Restore (TFS/VSTS: use msbuild task) or nuget.exe restore (use a nuget.exe >= 4.0.0).
There must be some issue within the latest Visual Studio 2017. They, the Microsoft, change the project file structure of .Net Core / standard a lot from 2017 RC to current one.

Visual Studio 2015 - Clang version not found when building from command line

I have a Xamarin-based solution in Visual Studio 2015. One of the projects is an Android native shared library containing C++ code.
When I build the solution from within VS 2015 IDE, everything works as expected. However, when I try to build the solution from the command line I get an error.
The build command is:
msbuild mytest.sln /p:Configuration=Release /p:Platform=ARM /t:Rebuild
The error I get is:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Clang_3_8 (Platform Toolset = 'Clang_3_8') cannot be found. To build using the Clang_3_8 build tools, please install Clang_3_8 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...".
My Visual Studio 2015 has all the updates applied. Wondering if anyone knows what the problem could be. Is it a path problem? Regards.
Turned out it is a path problem. Make sure to use the developer command prompt link under Program Files-->Visual Studio 2015->Visual Studio Tools. This batch file sets up proper paths, including the one for clang.

PowerShell Script To build Visual Studio Project

Is there any powershell script exist to build visual studio project without open visual studio?
You don't even need power shell or visual studio. Just use the msbuild program installed with .Net. Usage example is like this:
msbuild DBMigration.csproj /p:Configuration=Debug
msbuild is located at C:\Windows\Microsoft.NET\Framework\v3.5 (or select your version)
There is also a powershell build system, https://github.com/JamesKovacs/psake

Using CMake with Windows 7, Visual Studio 2010, and the command line

How do I use CMake with Visual Studio 2010 on the command line?
With Visual C++ Express Edition (2010) I would type:
cmake .
nmake
nmake install
simple.
I noticed with Visual Studio 2010, CMake generates a solution file instead of a Makefile. So I type:
cmake .
msbuild mysolutionfile.sln
But then what? I used to be able to type "nmake install" and it would install the project. What do I type now to install the project?
Two points:
1- CMake: You can choose your generator. Visual Studio happens to be the default in your case. If you want to use nmake, you can add the following to your cmake command: -G "NMake Makefiles". Alternatively, you can use cmake-gui.exe and the first option will be to choose your generator in a drop-down list. Make sure to remove your previously generated build dir and cmakecache.
2- Visual Studio: you can specify the target to msbuild with /target:INSTALL. Typically cmake creates an INSTALL project: building this project mimicks running make install.
Cheers.
devenv mysolutionfile.sln /build Debug /project INSTALL
This is preferable to using msbuild or vcbuild because certain versions of Visual Studio seem to have trouble with the inter-project dependencies that cmake likes to generate.
And devenv is preferable to nmake because it gives you more control over debug configurations, etc.

Resources