Can I compile visual studio solutions (.sln) without installing visual studio. Can I install something like a VS SDK to do this?
The solution is a VC++ one.
I think the SDK still comes with MSBuild and a barebones compiler. You might also want to look at "VS Express", depending on your reasons not to install Visual Studio.
You can try call the MSBuild.exe which become wiht the .NET Framework 3.5 and probability with old versions too.
I actually use this for my NAnt builds.
use something like:
"dotnet.dir" /msbuild.exe ./solutionX.sln" /v:q /nologo /p:Configuration=Release
You should be able to use vcbuild.exe to do it. I believe it is included with the Windows SDK.
Certain C++ libraries such as MFC and ATL only ship as part of visual studio so you will need visual studio on the machine to build if you make use of any of these.
Luís Custódio is right.
Visual Studio is launching msbuild under the hoods...
Tip
Change the setting for the verbosity of the build output to see some details in
Tools | Options | Projects and Solutions | Build and Run
You can separately install the MsBuild tools
Related
How to integrate Visual Studio Code with the Visual C++ compiler to build and debug C++ MFC solutions?
You would need to try and use on e of the msbuild VSCode extensions: they can help mainly for Visual Studio setting files completion.
The official Microsoft vscode cpp extension does allow to call Visual Studio msbuild, but only through a Build task, as mentioned in issue 984.
An answer such as "VS is much better than VSCode, so don't bother" would be a (possibly) good answer.
I doubt indeed you will find all the Visual Studio features directly in VSCode.
I'm new to .net and want to use a build tool for my project. I'm reading about MSBUILD and other options but recently came to know that Visual studio projects are MS Build scripts.
So, that makes me think, should I really use MSBUILD for Visual studio projects ?
Visual Studio uses MSBuild under the hood and the project system is based on it.
There are a few other tools that help with .NET builds, like Cake, but for the most important part, they also call MSBuild (but help you to script it for complex scenarios).
There really isn't an alternative to MSBuild since all tools (VS, JetBrains Rider, OmniSharp (/VSCode)) require it to understand C#/VB.NET projects.
should I really use MSBUILD for Visual studio projects ?
Obviously, we can also use devenv.exe, csc.exe or other compilers for Visual Studio projects except MSBuild. But just as Martin`s answer, all tools (VS, JetBrains Rider, OmniSharp (/VSCode)) require it to understand C#/VB.NET projects. And Visual Studio hosts MSBuild to load and build managed projects. Because MSBuild is responsible for the project, almost any project in the MSBuild format can be successfully used in Visual Studio.
With MSBuild, you could build projects on a build server for .NET apps without Visual Studio.
Besides, MSBuild will give you significant flexibility in choosing what technologies you use to implement continuous integration. And custom MSBuild tasks will give you even more flexibility in implementing custom builds.
What more, If Visual Studio Team System is in your future, applications built using MSBuild will be much easier to move into that environment than those built via alternative means.
Though, we can build Visual Studio project by using other ways, it is absolutely a good idea to use MSBuild for Visual Studio projects.
Hope this can help you.
Is it possible to compile a Windows Service developed in Visual Studio without use the IDE? I need to compile it externally. Could I use MSBuild or other similar tool?
The Microsoft Build Tools 2015 are available as a separate download. They comprise a set of build tools without an IDE.
I'm setting up a build server and I'm trying to install the minimum I can. I don't want to install all the visual studio 2013 express, How I can do that? also I'm assuming I need the vs2013 command line to support msbuild correct?
Thanks
Jp
If you don't have Visual Studio installed on your computer, you can
use Build Tools 2013 to build managed applications. The Visual Basic
and C# compilers are also included in this download. (In earlier
versions, these tools were included in the stand-alone .NET
Framework.)
Similarly, Microsoft Build Tools 2015 and 2015 Visual C++ Build Tools.
We're running TeamCity 9.0.3 and have had Visual Studio 2010, 2012 & 2013 full install on our build server for years now.
I know for a fact that we need certain Visual Studio targets in order to deploy our applications but I'm convinced we don't need to have a full Visual Studio installation in order to use the Visual Studio (sln) build runner but can't find any documentation to say whether or not we do need it.
Can anyone show me documentation or verify from their own experience whether or not a full Visual Studio install is needed for this build runner to work?
Edit: I have seen this question:
Does MSbuild require Visual Studio to be installed on the build server?
And mine is not the same question, it's a different topic. That question is asking whether or not Visual Studio is needed to as a prerequisite for the MSBuild build runner. My question pertains to the Visual Studio build runner
Roughly speaking, by installing Windows SDKs you get what's required to build applications.
Windows 7 SDK
Windows 8.1 SDK
Windows 10 SDK
Multi targeting packs are also required if you use that.
Starting from Visual Studio 2013, you also need to install the separate MSBuild 2013. And MSBuild 2015.
C++ might require you to install other bits.
So you will have to go through lots of trials. Most people simply give up and install full VS.
You don't need full Visual Studio Installed for running the build, all you need are the build tools.
In the "Step" you create to build your solution, the dropdown allows you to select which version of Microsoft builds you want to use where you can specify whether you use MSBuild12 or the latest MSBuild14 for VS2015 projects.
All you have to do is make sure that you install the required Microsoft Build tools in this instance:
Build tools for 2010, 2012 and 2013. The TC build step should then try detecting this install by default in C:/Program Files (x86)/MS Build/Build Tool Number/MSBuild.exe
Note: You will have to restart your agent after you install these tools on the Agent Machine for TeamCity to detect the tools.
The Visual Studio (sln) build runner requires the proper version of Microsoft Visual Studio installed on the build agent.
Reference: https://confluence.jetbrains.com/pages/viewpage.action?pageId=74847254