Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Wednesday, July 11, 2018

.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."


Descriptions of .NET 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.


Thursday, July 5, 2018

Visual Studio Version History With Toolset Paths

Product nameCodenameVersion NumberSupported .NET FrameworksSupported .NET / CORE VersionsRelease date
Visual Studio 97Boston5N/AN/AFeb-97
Visual Studio 6.0Aspen6N/AN/AJun-98
Visual Studio 2002Rainier71N/A13-Feb-02
Visual Studio 2003Everett7.11.1N/A24-Apr-03
Visual Studio 2005Whidbey82.0, 3.0N/A7-Nov-05
Visual Studio 2008Orcas92.0, 3.0, 3.5N/A19-Nov-07
Visual Studio 2010Dev10, Rosario102.0 – 4.0N/A12-Apr-10
Visual Studio 2012Dev11112.0 – 4.5.2N/A12-Sep-12
Visual Studio 2013Dev12122.0 – 4.5.2N/A17-Oct-13
Visual Studio 2015Dev14142.0 – 4.6120-Jul-15
Visual Studio 2017Dev15153.5 – 4.71.0-1.1, 2.07-Mar-17
Visual Studio 2019Unknown16TBATBATBA

Product name.NETToolset Path
Visual Studio 2005 Windows installation path\Microsoft.Net\Framework\v2.0.50727\
Visual Studio 2008.NET 3.5Windows installation path\Microsoft.NET\Framework\v3.5\
Visual Studio 2010.NET 4.0Windows installation path\Microsoft.NET\Framework\v4.0.30319\
Visual Studio 2012.NET 4.5Windows installation path\Microsoft.NET\Framework\v4.0.30319\
Visual Studio 2013.NET 4.5.1%ProgramFiles%\MSBuild\12.0\bin
Visual Studio 201514%ProgramFiles%\MSBuild\14.0\bin
Visual Studio 201715%ProgramFiles%\MSBuild\15.0\bin
Visual Studio 2019TBATBA

Tuesday, July 3, 2018

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.

Likewise, the reverse can also occur.  You can run Powershell from within the Visual Studio tools.

  1. 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:
    1. VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\
    2. VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
    3. VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
    4. VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools
  2. At this point,  you can open the tool by opening Run --> cmd.exe /k ""%VS150COMNTOOLS%VsDevCmd.bat" & powershell"
  3. At this point, a Powershell prompt will open so that you can directly run msbuild, mstest, etc.

Sunday, March 5, 2017

.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


Tuesday, March 25, 2014

NET : Easily Get DLL Assembly Info Via Visual Studio

Unfortunately, I had to try and remember how to easily get DLL information without going into the GAC. However, fortunately, there is easy way to get DLL assembly information ( including token, culture, & version ) directly from Visual Studio :
  1. Open your Visual Studio Solution
  2. Set a breakpoint and run in debug mode
  3. Open the Immediate Window
  4. Enter the path to your DLL using System.Reflection:
    ?System.Reflection.Assembly.LoadFile (@"C:\VSS\WebSoluable\bin\AjaxControlToolkit.dll").FullName

    And you should receive something similar to the following:
      "AjaxControlToolkit, Version=3.5.11119.20050, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"