Partager via


HomeSite

I have a long list of Blog ideas but unfortunately I haven’t had the time to write any of them. Why?  Because we were putting the final touches on Whidbey Beta2!  But alas, it is now out the door.  Get it now at: https://lab.msdn.microsoft.com/vs2005/get/

Perhaps the most exciting new feature in Beta2 is known as HomeSite.  (This topic will assume a great deal of Bootstrapper knowledge.  I’ll write some more basic introductory posts on the Bootstrapper in the nearfuture.)

The Problem
So you caught .NET fever and wrote the world’s greatest and best WinForms app.  You’ve tested, debugged, and are ready for deployment.  All you need to do is XCopy the files, right?

Unfortunately no.  In order to run your app, your clients need the .NET Frameworks runtime installed on their system.  The Bootstrapper will take care of checking for and installing if necessary, but you’re the one who has to host and redistribute the 23MB .NET Frameworks. 

Put simply, that sucks.

What do you do if you don’t have enough web space to hose that 23MB file?  What if you have to pay for the bandwidth your website uses?  Well, for Beta1 you were hosed.

The Solution
The Bootstrapper is designed to download and install any program prerequisites. In Beta1 we only offered two choices of where to download those prerequisites: SameSite and ComponentsURL.  But for Beta2 we added a third choice: HomeSite.
 
Let me briefly explain how each option works.

SameSite
Choosing SameSite means that you have to host whatever package files, such as the .NET Frameworks, along with your application.  That is on the same website, same UNC share, same CD-Rom, etc. 

ComponentsURL
The “Download prerequisites from the following location” option means that the Bootstrapper would download prerequisites which reside on a remote server.  The ideal scenario would be a file server or UNC share for your local network.  This might free you from the burden of hosting the redistribute files yourself, but you would run into problems when bootstrapping more than one prerequisite.

HomeSite
HomeSite is the new, exciting, and fresh package download option. This option allows packages to downloaded from their own home location, whichever exit it may be on the information super-highway.

So if you choose HomeSite and are your application has a dependency on the .NET FX, then the Bootstrapper will download the FX redist from Microsoft.com.  This way the only files you need to host on your website are your own!

The Details
Great.  So how use this?  Just add a HomeSite attribute to the package file element in your package manifest.  This is where the Bootstrapper will download the file if HomeSite is selected as the package download method.  (If SameSite or ComponentsURL is chosen then the value will be ignored.)

     <PackageFiles>
           <PackageFile Name="redist.exe" 
            HomeSite=”https://yoursite/yourapp/redist.exe"/>
    </PackageFiles>

If a HomeSite attribute is not specified but the package download method is HomeSite, then the Bootstrapper will default to using SameSite for that specific package.  (That is all packages that have a HomeSite will be downloaded from their specific servers, the rest must be hosted along with your application.)

There you have it!  With Whidbey Beta2 you can now ClickOnce deploy your apps without having to redist the .NET Frameworks.

Until next time, deploy-on!

Comments

  • Anonymous
    July 19, 2005
    The comment has been removed
  • Anonymous
    August 15, 2005
    Please refer to the Bootstrapper FAQ section for an answer.