views:

24

answers:

2

Is it possible to configure the ClickOnce installation so that it requires .Net Framework and VSTO but includes only the VSTO binaries and downloads .Net Framework if necessary?

Including the VSTO in the package isn't too much of a problem but the 350MB .Net Framework is something I'd do away with if possible. (Dynamics CRM SDK depends on some non-client profile features so I need the full one.)

In most cases the users have the .Net Framework installed so in these cases it's okay to leave the .Net Framework away. Is it still possible to make the published setup download the framework if it's missing on the user computer.

"Download prerequisites from the component vendor's web site" seems to forgo the local VSTO package while the "Download prerequisites from the same location as my application" would require the .Net Framework in the deployment bundle.

A: 

Perhaps not exactly what you want but if you use .NET 4.0, then you can use NoPIA feature and eliminate need for office binaries.

VinayC
Don't I still need VSTO though? Actually I need to admit that I'm not completely sure on what VSTO adds on top of the Office COM layer.
Mikko Rantanen
I also don't have clue - I always thought VSTO contains all PIAs packaged together. But you can validate that by checking assembly references in your application.
VinayC
It appears that VSTO does have different assemblies - see http://blogs.msdn.com/b/andreww/archive/2008/04/02/vsto-loader-and-runtime-components.aspx
VinayC
But there is talk of easier add-in development using NoPIA feature. For exampele - see http://www.add-in-express.com/creating-addins-blog/2010/05/28/net-framework4-nopia-addinexpress2010/I would suggest to give it a try and check it on clean client machine.
VinayC
A: 

You need the VSTO Runtime, there's no way around that, it can not be deployed locally. As for the PIAs, you need those as well, unless you are targeting .NET 4. If you use .NET 4, it will embed the bits of hte PIAs that you need, automatically.

As for .NET, it doesn't download the 350MB package, if you choose 'install from vendor's website', it does an incremental install of just the bits it needs.

By the way, we track this in our customers, and after Microsoft started pushing .NET 3.5 as a critical Windows Update, the % of our customers who have it installed went up to 90%. So in most cases, people will already have it installed.

RobinDotNet
I know this and the statistics on .Net 3.5 make it even more important to differentiate these two. We wish to have a stand alone installer that wouldn't download anything in majority of cases (ie, have the VSTO runtime as "Download prerequisite from the same location as my application") but this also ends up including the full .Net installer and as you said there's no sense in shipping this for 90% of our customers just because 10% might lack it. Removing the .Net prerequisite results in a very ugly error if trying to install VSTO without .Net installed.
Mikko Rantanen
Well, you're right about the ugly error. I wish they let you set that flag about where to get the prereqs differently for each prereq, but they don't. If you provided the deployment on a CD, it wouldn't matter that you include the whole .NET Framework (just an idea). There's probably a way to detect the version of .NET installed from the browser, but I'm not sure what that buys you.
RobinDotNet
You could write a stub (console or winform that does or doesn't show the win form) and deploy it with .NET 3.5 as the prereq from vendor. The stub could install the other prereqs and THEN fire off the VSTO installation. That way if they have 3.5, it would skip that step. If they don't, it would install it from MSFT and then move on. Frankly, it seems like a lot of trouble to simplify the install that the users are only ever going to see once, but that's your choice.
RobinDotNet