Main menu

Visual Studio 2010 RTM & .Net framework 4.0 Final version released

Its been a long time i wrote something on my blog, thanks to my busy work schedule i have a large number of drafts saved lolz. this is just a quick post

Anyway today is another big day for .Net developers around the world, yeah the final version of visual studio 2010 is released.  visual studio 2010 is the next major  version of its predecessor with loads of new features.

if you want to see the launch event of visual studio you can see it here.

Scott Guthrie, and other geeks from microsoft tweeted that visual studio will be available for download around 10 am (PST).  and the good news is its available for the websitespark subscribers too 🙂

here are some of those tweets for you :

@shanselman: Developers: MSDN will be updated with #vs2010 downloads and details at 10am PST *today*! Pls RT! 

@scottgu:MSDN Subscribers & WebsiteSpark/BizSpark members can download VS 2010 Monday morning.

happy developing guys 🙂

Visual Studio 2010 RC Now Available for Download

Microsoft has just released the Release Candidate version of Visual Studio 2010 for public download. You can now download and try out Visual Studio 2010 RC and .NET Framework 4 RC before the final version which is due to hit retail in this first quarter of 2010. It was released for MSDN Subscribers on 8th February and released for the public just few minutes ago (11th February 2010).

Visual studio 2010 RC

It is a much  awaited version of visual studio and it is available in following SKU’s:

  • Visual Studio 2010 Ultimate
  • Visual Studio 2010 Premium
  • Visual Studio 2010 Professional

Those who wish to try it, go get your copy here.

According to the reviews so far VS 2010 RC seems to be much faster in  Compiling, Building  and Intellisense. Read Scott Guthrie’s announcement on this release here.

SCRUM- Quick Guide

I just thought to share this two videos i found in youtube, which is very useful for those who want to learn about SCRUM methodology, wikipedia: Scrum is an iterative incremental framework for managing complex work (such as new product development) commonly used with agile software development. for more info read here.

SCRUM Basics by Orjan Hillbom

SCRUM in Under 10 Minutes (HD) by @hamids

hope it helps.

FCKEDitor – FIXED Image Upload dialog hang for .net

Well This issue has been bugging alot of people around the net it seems. I’m one of the victim too *sigh*.. anways bianchi007, a member in the CKSource Site forums had posted a solution. thought it would be worth to share.

Here is the solution which was posted in this thread.

This is for the .net assembly 2_6_3. I based it on the help file … 2115.patch


Open the FredCK.FCKeditorV2.vs2005.csproj in Visual Studio 2005

Open the file FileBrowser > FileWorkerBase.cs

Go to line 119

[sourcecode language=”csharp”]
Response.Write( @"(function(){var d=document.domain;while (true){try{var;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,”);if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();" );

Replace with:
[sourcecode language=”csharp”]
Response.Write(@"(function(){var d=document.domain;while (true){try{var A=window.parent.OnUploadCompleted;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,”);if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();");
Compile the project and then reference the new dll file in your project.

I hope it helps :).

Scott Guthrie Announces the WebsiteSpark Program

Scott guthrie just did a great announcement about the WebsiteSpark Program.

what is WebsiteSpark?

WebsiteSpark is designed for independent web developers and web development companies that build web applications and web sites on behalf of others.  It enables you to get software, support and business resources from Microsoft at no cost for three years, and enables you to expand your business and build great web solutions using ASP.NET, Silverlight, SharePoint and PHP, and the open source applications built on top of them.

What does the program provide?

WebSiteSpark provides software licenses that you can use for three years at no cost.  Once enrolled, you can download and immediately use the following software from Microsoft:

  • 3 licenses of Visual Studio 2008 Professional Edition
  • 1 license of Expression Studio 3 (which includes Expression Blend, Sketchflow, and Web)
  • 2 licenses of Expression Web 3
  • 4 processor licenses of Windows Web Server 2008 R2
  • 4 processor licenses of SQL Server 2008 Web Edition
  • DotNetPanel control panel (enabling easy remote/hosted management of your servers)

The Windows Server and SQL Server licenses can be used for both development and production deployment.  You can either self-host the servers on your own, or use the licenses with a hoster.  WebsiteSpark makes it easy to find hosters who are also enrolled in the program, and who can use your licenses to provide you with either dedicated or virtual dedicated servers to host your sites on.

In addition to software, WebsiteSpark provides partner opportunities to grow and build your business (including customer referrals through our partner programs).  It also includes product support (including 2 professional support incidents) and free online training for the products.

for further information on this visit Scotts blog here.

Thanks Scott for the great information :).

ClickOnce Application,Expired Certificates & Public Key Token PART III – Pushing .net Framework 3.5

In the last few weeks I wrote 2 articles on how to resolve ClickOnce certificate expiration issues. you can find those articles here :

  1. ClickOnce Application,Expired Certificates & Public Key Token PART I
  2. ClickOnce Application,Expired Certificates & Public Key Token PART II
    During my work on this ClickOnce update, we decided to upgrade the application to target .net framework 3.5 sp1.
    so I just set the target framework to 3.5 and set the required prerequisites (.net 3.5 SP1, and Windows Installer 3.1). and built the project and published it. and when I tried on a client machine which had .net framework 2.0, application got updated, prompted the uninstall message, and tried to launch the new ClickOnce application from the new URL, and BANG!. we get an error :
    The Error Message Says :

Unable to install or run the application. The application

requires that assembly WindowsBase Version be

installed in the Global Assembly Cache (GAC) first.

Why is this ?, its because when we try to launch the new application URL we do this :

DeploymentUtils.AutoInstall("<Path toNewApplication.application>");

we request for the application manifest. and it fails to launch the application because it doesn’t have the prerequisites. and now to force the new prerequisites the application should call the setup.exe in the Web Server instead of the manifest. now the question is, what if the user already have  the .net Framework 3.5 SP1?, we don’t have to prompt the client to install them again by launching setup.exe, we just have to launch the manifest. To Serve both the above scenario we need to check if the client machine has .net framework 3.5 SP1, and depending on its availability we need to launch the manifest or the setup.exe. The existence of .net Framework can be obtained from the following registry location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP image you can find out all the .net Frameworks installed and their service pack versions in this registry entry. Following are the locations of the main Net Frameworks:

Framework 1.1 Software\\Microsoft\\NET Framework Setup\\NDP\\v1.1.4322
Framework 2.0 Software\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727
Framework 3.0 Software\\Microsoft\\NET Framework Setup\\NDP\\v3.0\\Setup
Framework 3.5 Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5


Now we can check if the required .net Framework is available in the client machine, and launch the application setup.exe or the manifest. to do this we need to programmatically check these registries. for this I used the attached code ( I Couldn’t find the original author, Credits goes to him/her) which I found from web and modified to avoid few bugs. you can add this code to your project and do the below check in your application to decide which file to be launched :

string FileToLaunch=@"/setup.exe";
if (FrameworkUtils.IsInstalled(FrameworkVersion.Fx35)

 && FrameworkUtils.GetServicePackLevel(FrameworkVersion.Fx35) == 1)
            FileToLaunch = @"/<application manifest.application>";
            MessageBox.Show("Your message here");
            string updateURL = DeploymentUtils.getUpdateURL();
            DeploymentUtils.AutoInstall("https://" + updateURL + FileToLaunch);

And that’s all, now the application will launch the setup.exe if the client doesn’t have the .net Framework 3.5 and prompt for its installation, or launch the application manifest if client has the framework installed.

Now you can solve your ClickOnce issue as well as upgrade .net Framework in client machine at the same time without problem.

Download FrameworkUtils.cs

ClickOnce Application,Expired Certificates & Public Key Token PART II

In the first part of this series I wrote the possible solutions available for the ClicOnce certificate issue. if you have missed it please read it before continuing.

        This post is not going to be a long one, I  just want to point out a very important issue, when updating the ClickOnce using the method specified in PART I .
        When using Jim Harte’s Method to update a ClickOnce with a new certificate, it checks for the public token key of the current application to find its uninstall string, and then execute runDLL32 to trigger the uninstall. below is the code which gets the uninstall string:
          /// <summary>
          /// Gets the uninstall string for the current ClickOnce app from the Windows 
          /// Registry.
          /// </summary>
          /// <param name="PublicKeyToken">The public key token of the app.</param>
          /// <returns>The command line to execute that will uninstall the app.</returns>
           private static string GetUninstallString(string PublicKeyToken,
                                    out string DisplayName)
           string uninstallString = null;
           string searchString = "PublicKeyToken=" + PublicKeyToken;
           RegistryKey uninstallKey = _
           string[] appKeyNames = uninstallKey.GetSubKeyNames();
           DisplayName = null;
           foreach(string appKeyName in appKeyNames)
            RegistryKey appKey = uninstallKey.OpenSubKey(appKeyName);
            uninstallString = (string)appKey.GetValue("UninstallString");
            DisplayName = (string)appKey.GetValue("DisplayName");
                      return uninstallString;


          In the above code it goes through registry keys of all ClickOnce application to get the uninstall string. and if that uninstall string contains the Public Token key of the current application, it will uninstall the application with that particular uninstall string. this is completely ok if there is only one application with that public token key. the public key of an assembly name identifies the developer (or the organization). Most organizations use only one public key to sign their assemblies with. so what if there is more than 1 application which has the same public token key?

      • The code will uninstall the very first match in the above code and it might uninstall some other application, instead of uninstalling the one we need to uninstall.
      • and it will  also install the new application from new URL, but with a different name sometimes (Eg: application name -1).
      • And if it had uninstalled another application, whenever user launches this application it will prompt the uninstall screen, each time when there are more than 1 application with the same public token key.

    The Image below shows an uninstall string, which contains the application name, and public token key:


    To avoid this problem of wrong application getting uninstalled, I changed this part of the code from above code to :

    if(uninstallString.Contains(searchString)) break; 


                   && uninstallString.Contains("yourApp.application"))


          In the code above, I’m Checking the ClickOnce application name with extension, along with the public token key to find out the correct uninstall string. that’s it!.

          Hope this solves your time in someway.