Category Archives: ASP.NET

Adding Support of .NET Framework 4.6.1 Prerequisite into InstallShield 2015 in VS2015

For most of .NET developers, you might need to create a installer package for your developed application and you might be using InstallShield. One of the configuration that you would do is setting up the .NET Framework requirement for your project.

In VS2015 with InstallShield 2015, you will found the pre-defined package for the requirement of .NET framework is only up to “Microsoft .NET Framework 4.5 Full package”. I am going to show you how to add the package into InstallShield 2015 for the “Microsoft .NET Framework 4.6.1 Full Package”.

Below is the text that can be used to create your own .prq file for the Microsoft .NET Framework 4.6.1 Full Prerequisite.
+++++++++
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
< SetupPrereq>
<conditions>
<condition Type=”2″ Comparison=”2″ Path=”HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” FileName=”Release” ReturnValue=”394254″/>
</conditions>
<operatingsystemconditions>
<operatingsystemcondition MajorVersion=”6″ MinorVersion=”1″ PlatformId=”2″ CSDVersion=”” Bits=”4″ ServicePackMajorMin=”1″/>
<operatingsystemcondition MajorVersion=”6″ MinorVersion=”2″ PlatformId=”2″ CSDVersion=”” Bits=”4″/>
<operatingsystemcondition MajorVersion=”10″ MinorVersion=”0″ PlatformId=”2″ CSDVersion=”” Bits=”4″/>
</operatingsystemconditions>
<files>
<file LocalFile=”.\Microsoft.net\4.6\Full\NDP461-KB3102436-x86-x64-AllOS-ENU.exe” URL=”https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe” CheckSum=”864056903748706E251FEC9F5D887EF9″ FileSize=”0,67681000″/>
</files>
<execute file=”NDP461-KB3102436-x86-x64-AllOS-ENU.exe” cmdline=”/q /norestart” cmdlinesilent=”/q /norestart” returncodetoreboot=”1641,3010″/>
<properties Id=”{B1C982A7-100D-4691-9DCF-F5986F404DD8}” Description=”This prerequisite installs the .NET Framework 4.6.1 full standalone package.”/>
<behavior Reboot=”32″/>
< /SetupPrereq>
+++++++++

Notes:

  • The Conditions are set for 64bit only, Windows 7, Windows 8, Windows 10.
  • The download location is good as of 10th March 2017. No telling how long it will last. If the download does not work any more, you would download the offline installer from https://www.microsoft.com/en-us/download/details.aspx?id=49982 and then copy it into “C:\Program Files (x86)\InstallShield\2015\SetupPrerequisites\Microsoft .net\4.6\Full” folder
  • If you received similar error as below
    “An error occurred streaming ‘Microsoft.net\4.6\Full\NDP461-KB3102436-x86-x64-AllOS-ENU.exe’ into setup.exe”
    You could try to run the InstallShield or VS in Admin mode.

Help:
For those new to making a Prerequisite .prq file:

  •  On your desktop create a new text file.
  • Rename this file “Microsoft .NET Framework 4.6.1 Full.prq”
  • Copy the above text to this new file. (Between the +++++)
  • Move this new file to folder C:\Program Files (x86)\InstallShield\2015\SetupPrerequisites
  • Open any InstallShield project
  • Go to the Installation Designer tab > Application Data > Redistributables
  • The list should now contain the new entry “Microsoft .NET Framework 4.6.1 Full”
  • To the right of the list it will say “Needs to be downloaded”
  • Right-click on the item Microsoft .NET Framework 4.6.1 Full.prq and select Download Selected Item…
  • This downloads the 66 MB file to C:\Program Files (x86)\InstallShield\2015\SetupPrerequisites\Microsoft.net\4.6\Full\

You should be good.

To edit any of the Conditions:
Right-click on the item Microsoft .NET Framework 4.6.1 Full.prq and select Edit Prerequisite

To Support 32bit and 64bit:
You could remove the “Bits” or leave the value of it to be blank in the above sample, and that will work for both x32 and x64

To find out more on OS version number
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832%28v=vs.85%29.aspx

To find out more on Value of Release for the .NET Framework
https://msdn.microsoft.com/en-us/library/hh925568%28v=vs.110%29.aspx

Bootstrap 3 Datepicker (eonasdan) does not work with jQuery 3.0 or above

if you are developing MVC, and you might have chance to look for a DateTimePicker for your MVC project. One of the favorites DateTimePicker is “Bootstrap 3 DatePicker” developed by Eonasdan (http://eonasdan.github.io/bootstrap-datetimepicker/ ). You may download and get it from Nuget. You may also install by using Bower, Rails, Angular, Meteor or manually. The latest version in Nuget is v4.15.35.1.

nuget_bootstrapdatepicker

One of the dependency is the jQuery. I have installed the latest one jQuery v3.1.1 at the moment I am writing to this blog.

I have followed the sample code Eonasdan has provided but I could not make it working. After some searching, I found out that Eonasdan has developed it when jQuery was still in v2. And jQuery has some changes from v2 to v3. One of the changes is jQuery does not provide the object.count() for jQuery object. It is changed into object.length

So, now you could make some code changes to the bootstrap-datetimepicker.js and the DatePicker will be working again. There are 2 locations of code that you have to change. Just simply search for “count()” and replace it as “length”.

Hope that my blog will help you to fix it. And as I know, someone has also point this out to the GitHub and commit into a new branch. But Eonasdan has not yet merge it into the release branch. Let’s do this fix in our way before he release the fixed code so that we could get a corrected js from Nuget.

bootstrapdatepicker_js_before
bootstrapdatepicker_js_after

Useful links to learn Windows 10 and VS2015

images images
I am sure that you all are new to Win10 and VS2015. You may be looking for learning resource. Here I listed some of the sample site for you and so you could get some learning on these 2 new products.

Opportunity URLs Remarks
Developer Tools Download https://www.visualstudio.com/ Download any Visual Studio skus, including VS 2015
Developer for Windows 10  -What’s New
Get Started
Design
Develop
Publish
https://dev.windows.com/en-us/getstarted/whats-new-windows-10/
https://dev.windows.com/en-us/getstarted/
https://dev.windows.com/en-us/design/
https://dev.windows.com/en-us/develop/
https://dev.windows.com/en-us/publish/
All the info developers may need to write apps
Windows 10 courses in MVA https://www.microsoftvirtualacademy.com/en-US/training-courses/getting-started-with-windows-10-for-it-professionals-10629/ Great site to get online courses on Windows 10
Channel https://channel9.msdn.com/windows/ Another great online resource for Windows 10 related videos
Windows 10 Jumpstart http://www.microsoftvirtualacademy.com/liveevents/preparing-your-enterprise-for-windows-10-as-a-service/ A live event on August 14th