ASP.NET Web Tools Preview 2 for DotNetCore on VS2015 ERRORs

When I was trying to install ASP.NET Web Tools Preview 2 for DotNetCore on Visual Studio 2015, I got this error message. I have installed VS2015 Update 3 as required.


Then I followed the instruction to repair VS2015 Update 3. Still had the same error. I even uninstalled VS2015 completely. Then installed VS2015 again. But it was still the same. After searching online a little bit, looks like this is not a rare issue. And found out there are actually some options you can pass to the installation program. And solved this error.

The installation file is: DotNetCore.1.0.0-VS2015Tools.Preview2.exe. If you run:

DotNetCore.1.0.0-VS2015Tools.Preview2.exe /?

You can see some options like this:



It still doesn’t seems to have an option for solving this error.  But you can run this also with parameter SKIP_VSU_CHECK=1:

DotNetCore.1.0.0-VS2015Tools.Preview2.exe SKIP_VSU_CHECK=1

Now the magic just happened. No more errors. Smile

SQL Server 2014 Service pack 2 is released

SQL Server 2014 SP2 is just released recently. You can download it from here. It includes all the fixes from CU1 to CU7. There are a couple interesting things added in SP2:

SQL Server updates and beyond

Microsoft has changed the way how service packs and (CU) cumulative updates for SQL Server are released. Now installing CU is recommended as important as service packs. And service packs won’t be released regularly as before.

  • Each new cumulative update (CU) contains all the fixes that were included with the previous CU for the installed version/Service Pack of SQL Server.
  • Microsoft recommends ongoing, proactive installation of CUs as they become available:
    • SQL Server CUs are certified to the same levels as Service Packs, and should be installed at the same level of confidence.
    • Historical data shows that a significant number of support cases involve an issue that has already been addressed in a released CU.
    • CUs may contain added value over and above hotfixes. This includes supportability, manageability, and reliability updates.
  • Just as for SQL Server service packs, we recommend that you test CUs before you deploy them to production environments.

BTW, I found another SQL Server Updates information site which is maintained by Brent Ozar Unlimited.

SQL Server 2016 is coming

Microsoft just announced SQL Server 2016 public preview coming this summer. A couple long waiting features will be really interesting:

  • Always Encrypted: Banks, Health Care and insurance companies will be happy.
  • Stretch Database: DBA will be happy.
  • Real-time Operational Analytics & In-Memory OLTP
  • Built-in Advanced Analytics, PolyBase and Mobile BI
  • Additional security enhancements for Row-level Security and Dynamic Data Masking to round out our security investments with Always Encrypted.
  • Improvements to AlwaysOn for more robust availability and disaster recovery with multiple synchronous replicas and secondary load balancing.
  • Native JSON support to offer better performance and support for your many types of your data.
  • SQL Server Enterprise Information Management (EIM) tools and Analysis Services get an upgrade in performance, usability and scalability.
  • Faster hybrid backups, high availability and disaster recovery scenarios to backup and restore your on-premises databases to Azure and place your SQL Server AlwaysOn secondaries in Azure.

Hooray! Can’t wait to download it.

Generate SQL Script to Restore all Transaction Logs After Last Database Backup

If you have to reinitialize the log shipping for a database which is doing log backup every 5 minutes, there are probably piles of log backup files need to be restored after restoring database backup nightly. A little bit crazy if you have to manually go through all files. This is a helpful script to generate the SQL script for you to do all the log restoral.

SELECT  'RESTORE LOG [' + database_name + '] FROM DISK='''
        + physical_device_name + ''' WITH NORECOVERY'
FROM    msdb.dbo.backupset a
        INNER JOIN msdb.dbo.backupmediafamily b ON a.media_set_id = b.media_set_id
WHERE   database_name = 'laFileStore'
        AND type = 'L'
        AND backup_start_date >= ( SELECT TOP 1
                                   FROM     msdb.dbo.backupset
                                   WHERE    database_name = 'laFileStore'
                                            AND type = 'D'
                                   ORDER BY backup_start_date DESC
ORDER BY a.backup_start_date 

useLegacyV2RuntimeActivationPolicy fix for Crystal Report on .Net Framework 4

We just upgraded some apps from .Net Framework 3.5 sp1 to .Net Framework 4. Some Crystal reports got this error.


After Bingo a little bit, found this note on SAP site. It is because of the mixed mode dll issue. Have to put this configuration in the config file:

<startup useLegacyV2RuntimeActivationPolicy=”true”>
  <supportedRuntime version=”v4.0″/>

And this basically is for compatibility of mixed mode dlls. This blog post has very detail info about this flag.

Upgrade Windows Server 2008 R2 Standard to Enterprise without Media

We have a VM which is running Windows Server 2008 R2 Standard with 32GB RAM. Recently we have to add more RAM to it to improve SQL Server performance. Another 32GB RAM is added through VM configuration. But since it is a Windows Server 2008 R2 standard edition which has a limitation of only being able to use 32GB RAM MAX, it still can’t see the full 64GB. Found out we have to upgrade the edition to Enterprise in order to fully utilize 64GB RAM. By following this blog post for upgrading Windows Server 2008 R2 without media, I ran the script to initiate the upgrade:

DISM /online /Set-Edition:ServerEnterprise /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

I used the right MAK license key for Windows Server 2008 R2 Enterprise. But the upgrade was failed. The error message is something like this:

Error: 1605

The specified product key is not valid for the target edition.
Run this command again with a product key specific to the target edition.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

For example if upgrading to Enterprise and using a MAK key, the DISM log would contain the following entry.

dism /online /Set-Edition:ServerEnterprise /ProductKey:[abcde-abcde-abcde-abcde-abcde]

Error DISM DISM Transmog Provider: PID=5728 Product key is keyed to [], but user requested transmog to [ServerEnterprise] – CTransmogManager::ValidateTransmogrify


Error DISM DISM Transmog Provider: PID=3880 [Upgrading system]: The specified product key is not valid for the target edition.

Run this command again with a product key specific to the target edition.

[hrError=0x80070645] – CTransmogManager::EventError

Warning DISM DISM Transmog Provider: PID=3880 The selected OS *cannot* upgrade to [ServerEnterprise] – CTransmogManager::TransmogrifyWorker

Error DISM DISM Transmog Provider: PID=3880 Failed to Upgrade! – CTransmogManager::TransmogrifyWorker(hr:0x80070645)

Error DISM DISM Transmog Provider: PID=3880 Failed to upgrade! – CTransmogManager::ExecuteCmdLine(hr:0x80070645)

I Bingo a little bit about this error message. Found a KB which is exactly for it. Looks like I can’t use our MAK key to do it since the key works for multiple editions. DISM doesn’t know what to do with it. I have to get a KMS Client Setup Key for Windows Server 2008 R2 Enterprise to do the upgrade first. So I get the KMS key from here which is 489J6-VHDMP-X63PK-3K798-CPX3Y.

Then I ran the upgrade script again. It worked this time. After the upgrade and reboot, I have to use these two script to change the product key to my correct MAK key, and activate windows. Otherwise, windows will show it is not a genuine windows installation.

cscript.exe %windir%\system32\slmgr.vbs /IPK XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

cscript.exe %windir%\system32\slmgr.vbs /ato

After all these were done, my VM is able to see and use full 64GB RAM right now. Cheers!

The older version of Skype cannot be removed…

I got a notification for upgrading to newer version when opening Skype on my Windows 8.1. But when I chose to upgrade, it stopped at this error complaining “The older version of Skype cannot be removed. Contact your technical support group.” Ok, well. What if I manually remove the old version from Windows Programs and Features? Boom, another stop error “Can’t find Skype.msi in folder C:\ProgramData\Skype\{4E76FF7E-AEBA-4C87-B788-CD47E5425B9D} for the corresponding version”. Can’t continue the upgrade process.

After some Bingle, looks like this is a common issue after installing certain previous version of Skype. According to this article, I have to update Skype without using any Skype installer. But when I downloaded the Skype full installation file directly from, it is a Skype installer exe. I was not able to find the msi file as the solution mentioned. Then I just thought how about going to the folder windows installer was complaining about. Bingo, found another folder in C:\ProgramData\Skype\{7A3C7E05-EE37-47D6-99E1-2EB05A3DA3F7}. And the new version of Skype.msi is right there. Then I just used 7-zip to open this msi as an archive. And copied Skype.exe to overwrite the old version of exe in the program files folder. And the upgrade is just done! Started the Skype, checked the version. And it shows the new version number.

Enterprise Library 5.0 Visual Studio configuration editor conflicts with SQL Server Management Studio 2012 and up

I used Microsoft Enterprise Library 5.0 in a lot of project. After I upgraded SQL Server installation on my workstation to SQL Server 2012, I got this error every time trying to open a new query window in SSMS 2012.

“The ‘Microsoft.Practices.EnterpriseLibrary.Configuration.Design.VisualStudioIntegration2010Package, Microsoft.Practices.EnterpriseLibrary.Configuration.Design.VisualStudioIntegration2010, Version=, Culture=netutral, PublicKeyToken=null’ package did not load correctly.    The problem mayhave been cuased by a configuration change or by the installation of another extension.  You can get more information by running the application together with the /log parameter on the command line, and then examining the file …\AppDate\Roaming\Microsoft\AppEnv\10.0\ActivityLog.xml’.  Continue to show this error message?”

Even I can disabled and hide it for next time after it shows up at the first time, it is still very annoying. I Bingle a little bit. Looks like there was a Microsoft Connect item on SQL Server already. But the item is closed and no fix available. The only workaround is:

Remove the VisualStudio 2010 integration from Microsoft Enterprise Library 5.0 Optional Update 1 installation. Then if you need the Visual Studio 2010 integration, install the EnterpriseLibrary Configuration extension from Microsoft via the Extension Manager in VS2010.

{Coding, DBA}