Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build .NET 4.6 Framework app without Visual Studio installed?

Until now, I could build .NET 4.5.2 using command line

c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild MySolution.sln 

The only what I need to install on a computer was .NET Framework and Visual Studio 2010 shell.

Now I consider upgrading to .NET 4.6., but I cannot find a way how to build a solution without Visual Studio.

I don't want to install Visual Studio 2015, because it is too big for this hosted virtual machine. I hope some MSBuild or Microsoft package installation could be sufficient.

like image 630
Tomas Kubes Avatar asked Aug 18 '15 10:08

Tomas Kubes


People also ask

Is .NET 4.6 still supported?

NET Framework 4.6, which shipped in Windows 10 Enterprise LTSC 2015. We will continue to support . NET Framework 4.6 on Windows 10 Enterprise LTSC 2015 through end of support of the OS version (October 2025).


Video Answer


1 Answers

Install:

  • The .NET 4.6 Framework
  • The Microsoft Build Tools 2015
  • The .NET Framework 4.6 targeting Pack

Then call a different version of MsBuild to build your solution:

 C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe MySolution.sln 

Note, this may not contain all bits pieces and sdk's that ship with Visual Studio, so you may encounter "missing .targets files" or other problems building your application. Other SDKs may alleviate that problem:

  • The Windows 10 Platform SDK
  • The Azure SDK
like image 58
jessehouwing Avatar answered Oct 09 '22 22:10

jessehouwing