sam
sam

Reputation: 11

VB.NET / VSTO2008 fails; can't find runtime

I'm trying to deploy a VB.NET app which is an extension to Excel using VSTO. It works fine in the development environment, but when someone else (without a dev environment installed, just the .NET framework) installs it, they get:

The common language runtime could not be loaded by <application>. Contact your administrator for further assistance.

Google pops up the microsoft help page for this:

http://msdn.microsoft.com/en-us/library/6s0wczt9.aspx

But I've verified that the .NET versions are the same on both machines. For VSTO apps in 2k5 there was a specific vsto runtime library users needed to install -- is there something similar for VS2008 that I haven't found yet? Any ideas besides that?

Thanks in advance!

Upvotes: 1

Views: 1799

Answers (4)

Anonymous Type
Anonymous Type

Reputation: 3061

Install VSTO runtime 3.0 Then update it to VSTO 3.0 SP1 also install VSTO_PTExtLibs.exe (PIA extension libs for runtime) if you are referencing these in your project.

Upvotes: 0

CoderDennis
CoderDennis

Reputation: 13837

For VSTO apps built with Visual Studio 2008, The VSTO version 3.0 Runtime is required.

Here is the download page: http://www.microsoft.com/downloads/details.aspx?FamilyID=54eb3a5a-0e52-40f9-a2d1-eecd7a092dcb&DisplayLang=en

Upvotes: 2

Matthew Rathbone
Matthew Rathbone

Reputation: 8269

We had the same problem. It's all to do with security policy.

There are issues with the security policy for your DLL's when running VSTO projects.

Namely you need to grant 'full trust' to your assemblies. What this means you have to A) sign your projects with a key, and B) register your assemblies as having full trust during deployment (which can be done easily with CASPOL.exe: http://msdn.microsoft.com/en-us/library/cb6t8dtz.aspx)

Its very easy to do. Alternatively you can roll your own security-setting assembly which you integrate into your msi (thats what we did)

Check out this MSDN Article for the full details: http://msdn.microsoft.com/en-us/library/zdc263t0.aspx

Upvotes: 0

Reed Copsey
Reed Copsey

Reputation: 564781

Make sure they have the correct version of the .NET framework. If they have .NET 1.1 (or even 2.0) installed, and you're targetting the 3.5 framework, you can get this error message.

Upvotes: 1

Related Questions