Blog

 

In 2015 we will have new releases of .NET Framework, ASP.NET versions, Web Forms, MVC versions.  That is quite a bit to keep track of.  This should make it a little easier.  I am surprised that Microsoft has not made it more clear as to what is included in which version.  They recently starting calling this bundle .NET 2015 and as a bundle includes a number of sub-products.

So starting with the .NET 2015 Bundle….it includes .NET 4.6 AND .NET Core

.NET 4.6 and .NET Core includes..(.NET 4.6 is included with Visual Studio 2015)

  • ASP.NET 4.6  is an umbrella term used to describe updates to existing frameworks such as ASP.NET Web Forms/MVC 5/Web Api 2.
    • ASP.NET Web Forms 46
    • ASP.NET MVC 5.2.3 – updates to MVC 5 found here
    • ASP.NET Web Pages 3.2.3
    • ASP.NET Web API 5.2.3
    • ASP.NET SignalR 2.1.2

 

  • ASP.NET 5.0 Beta 5 (vNext)  – a .NET platform for build cloud-based apps and can be hosted on IIS or self-hosted in a custom process.  It supports running on both the .NET Framework and .NET Core so by extension supports running on Windows, Linux, OS X etc.
    • MVC 6.0 - MVC, Web API, and Web Pages are unified into a single framework – this is a complete rewrite of MVC engine we use today, while we still have controllers, views and models under the hood MVC 6 is an improved and rewritten engine.  Web API is now fully integrated with MVC 6
    • C# 6, F# 4, VB 14

Note: .NET 4.6 is an in-place update to versions .NET 4, 4.5, 4.5.1, 4.5.2 > this means that after installation c:\windows\Microsoft.NET\Framework(bitness)\v4.0.30319 will be updated with the latest dlls, this is similar to how .NET 3.5 was an in-place update to .NET 2.0.  See also .NET Framework Versions and Dependencies


Today (August 2015)

SO if you are building an application today you can open Visual Studio 2015 and create new project(s) – web project – selecting .NET 4.6 and ASP.NET 4.6 templates (empty, web forms, mvc, etc.).  However, if you wanting to try out new ASP.NET 5 preview templates those are available too (i.e. choose .NET 4.6 and ASP.NET 5 (Preview) templates such as empty, web api and web application)


Also if you have not installed .NET 4.6 on the server you would choose to create a new project you could select .NET 4.5.2 and respective ASP.NET 4.5.2 web templates (empty, web forms, mvc, etc.)

Note here that Microsoft released Visual Studio 2015 with updates to existing frameworks as well as preview releases of ASP.NET and Entity Framework 7.  So confusing.


Visual Studio 2015 – Updates

  • JSON Editor
  • HTML Editor Updates
  • JavaScript Editor Improvements

Resources

 

 

version

grunt

Ok, so how did css become so complex and what the heck is Grunt? Grunt is a task runner.  There are a number of open source task runners.  Grunt is just one of the more popular ones.  In our scenario we will be using Grunt (a task runner) to convert less into css as well as to uglify and minify and copy files to different directories.

The following are steps that I recently used to setup our environment to edit the most recent release of Bootstrap (3.x) while taking advantage of all the existing Less files.  Grunt will automate a number of tasks for us.  In addition the details below will setup a Visual Studio 2013 environment to use Grunt to build and deploy our Bootstrap files.

1.) Create Empty MVC project

2.) Include bootstrap files into project (all folders and files when unzipping bootstrap source) i.e. dist, docs, fonts, grunt, js, less etc. Note: do not include node_modules  I had issues with long path with one of the node modules (besides these will be downloaded automatically after install)
solutionexplorer

3.) Ensure you have node.js installed on your workstation.   Node what is node…is a open source cross-platform environment for easily building fast, scalable network applications.  Node.js applications are written in JavaScript and can be run within the runtime on OS X, Windows, Linux etc.  However in our usage we will be using this platform to download install other JavaScript applications.

4.) Open a command prompt to your project location and run > npm install (this will read the grunt packages json file and download necessary modules).  As information, npm is short for Node Package Manager.  NPM is to Node as Nuget is to Visual Studio.  That is a good way of thinking about it.

5.) At the command prompt > grunt (this will execute all tasks and run the tests)

6.) Now the task is to get grunt to run upon project building (yes we are wanting to automatically run grunt after we build the empty mvc project within vs.net).  Download and install the Web Essentials extension from the gallery.

7.) Download install the Task Runner Explorer extension as well.

8.) Open the MVC project and right click on Gruntfile.js  You will see a new option.
taskrunner

9.) Add dist to the after build task (you can do this by dragging to the after build folder).  This will connect grunt to run dist task after vs.net builds.
taskrunner_2

10.) Now after I build my project, what I want is for grunt to build the css based on the less, the copy the output to a particular directory on my pc.

At this point, I opened gruntfile.js.  I am going to extend the current copy task to include a copyToServer option.

copy: {
  fonts: {
    expand: true,
    src: 'fonts/*',
    dest: 'dist/'
  },
  docs: {
    expand: true,
    cwd: 'dist/',
    src: [
      '**/*'
    ],
    dest: 'docs/dist/'
  },
  copyToServer: {
      expand: true,
      cwd: 'dist/',
      src: ['**/*'],
      dest: 'c:/inetpub/wwwroot/server/stylesheets/bootstrap/'
  }
},

I also added a new task so that I could execute this after a build with

// new copy to server or local vdir
  grunt.registerTask('copyToServer', ['copy:copyToServer']);

Finally, I am going to add this task to the after build step, so every time Visual Studio builds, it will execute Grunt to build the css via Less then it will copy the files to a particular directory after I build my Visual Studio project.  You can do this by right clicking on the copyToServer task and select After Build binding.

taskrunner_3

About Us

Web/Mobile Solutions

Useful Links

Our Contacts

Cincinnati, OH 45069