Category: Visual Studio
.NET Framework vs .NET Core vs .NET Standard ?!?
I think get a grip on the latest trends only to learn that I’m still steps behind. Thanks to Immo Landwerth for this clear article and cool tricks. It’s ten months old but new to me. 😑
.NET Standard – Demystifying .NET Core and .NET Standard
“NET Standard is a specification. Each .NET Standard version defines the set of APIs that all .NET implementations must provide to conform to that version. You can think of it as yet-another .NET stack, except that you can’t build apps for it, only libraries. It’s the .NET implementation you should use for libraries that you want to reference from everywhere.”
Implementations
|
OS
|
Open Source
|
Purpose
|
.NET Framework
|
Windows
|
No
|
Used for building Windows desktop
applications
and ASP.NET Web apps running on IIS.
|
.NET Core
|
Windows, Linux, macOS
|
Yes
|
Used for building cross-platform console
apps
and ASP.NET Core Web apps and cloud
services. |
Xamarin
|
iOS, Android, macOS
|
Yes
|
Used for building mobile applications for
iOS
and Android, as well as desktop apps for
macOS. |
.NET Standard
|
N/A
|
Yes
|
Used for building libraries that can be
referenced
from all .NET implementations, such as
.NET Framework, .NET Core and Xamarin.
|
Visual Studio Version History With Toolset Paths
Product name | Codename | Version Number | Supported .NET Frameworks | Supported .NET / CORE Versions | Release date |
Visual Studio 97 | Boston | 5 | N/A | N/A | Feb-97 |
Visual Studio 6.0 | Aspen | 6 | N/A | N/A | Jun-98 |
Visual Studio 2002 | Rainier | 7 | 1 | N/A | 13-Feb-02 |
Visual Studio 2003 | Everett | 7.1 | 1.1 | N/A | 24-Apr-03 |
Visual Studio 2005 | Whidbey | 8 | 2.0, 3.0 | N/A | 7-Nov-05 |
Visual Studio 2008 | Orcas | 9 | 2.0, 3.0, 3.5 | N/A | 19-Nov-07 |
Visual Studio 2010 | Dev10, Rosario | 10 | 2.0 – 4.0 | N/A | 12-Apr-10 |
Visual Studio 2012 | Dev11 | 11 | 2.0 – 4.5.2 | N/A | 12-Sep-12 |
Visual Studio 2013 | Dev12 | 12 | 2.0 – 4.5.2 | N/A | 17-Oct-13 |
Visual Studio 2015 | Dev14 | 14 | 2.0 – 4.6 | 1 | 20-Jul-15 |
Visual Studio 2017 | Dev15 | 15 | 3.5 – 4.7 | 1.0-1.1, 2.0 | 7-Mar-17 |
Visual Studio 2019 | Unknown | 16 | TBA | TBA | TBA |
Product name | .NET | Toolset Path |
Visual Studio 2005 | Windows installation pathMicrosoft.NetFrameworkv2.0.50727 | |
Visual Studio 2008 | .NET 3.5 | Windows installation pathMicrosoft.NETFrameworkv3.5 |
Visual Studio 2010 | .NET 4.0 | Windows installation pathMicrosoft.NETFrameworkv4.0.30319 |
Visual Studio 2012 | .NET 4.5 | Windows installation pathMicrosoft.NETFrameworkv4.0.30319 |
Visual Studio 2013 | .NET 4.5.1 | %ProgramFiles%MSBuild12.0bin |
Visual Studio 2015 | 14 | %ProgramFiles%MSBuild14.0bin |
Visual Studio 2017 | 15 | %ProgramFiles%MSBuild15.0bin |
Visual Studio 2019 | TBA | TBA |
Run Visual Studio Command Tools Within Powershell
Visual Studio command tools (ie, msbuild, mstest, dotnet) can be directly executed from Powershell and open in a new window.
- Depending on your version of Visual Studio, locate the path to the common tools. For example, if you decided to set an environment variable for this path, it could be something like:
- VS150COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7Tools
- VS140COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 14.0Common7Tools
- VS120COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 12.0Common7Tools
- VS110COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 11.0Common7Tools
- At this point, you can open the tool by opening Run –> cmd.exe /k “”%VS150COMNTOOLS%VsDevCmd.bat” & powershell”
- At this point, a Powershell prompt will open so that you can directly run msbuild, mstest, etc.
.NET: Customize Builds Per Environment
Two Options:
1. Web.Config Transformations
https://msdn.microsoft.com/en-us/library/dd465326.aspx
2. Deployment Parameters: Useful when you have to create a package without knowing some of the values that will be needed when the package is installed.
https://msdn.microsoft.com/en-us/library/ff398068.aspx
Web.Config Transform:
1. Open Build –> Configuration Manager
2. Create new “Active solution configuration” for each version you need and then close.
3. Navigate to Solution Explorer and right-click on your web.config and select “Add Config Transform.” This should generate the new config files you created in Configuration Manager.
4. Open the transform file for the build configuration that you want to work with.
Further Reference:
https://code.msdn.microsoft.com/ASPNET-Web-Deployment-c2d409f9