index > Visual Studio Tools for Office > Assembly could not be found or loaded using the 2.0 Framework

Assembly could not be found or loaded using the 2.0 Framework

Hello,
I have created a Excel application using VSTO on my computer and am using the Framework 1.1.
The link between te Assembly and the Excel document work fine on my computer even though the assembly is located on a share folder.
Locally everything work fine.
But when am trying to deploy it to some other computer specially those using the Framework 2.0 i have an error when openning the Excel file telling me that the Assembly could not be found or loaded at path \<serverName>\<folderName>\
The _AssemblyLocation0 variable is set to \\<serverName>\<folderName> in the Excel file.
Does anybody have any idea of what's going on?
is there a pb related to the version of the Framework?
Beral
Have you trusted the assembly in the framework 2.0 policy file on the deployed machine?  Running the VSTO app on a machine with Fx 2.0 will run the latest CLR (in this case Fx 2.0) and will require the assembly to be trusted in the Fx 2.0 policy file.  So if you've trusted the assembly only in your Fx 1.1 policy file things won't run.


Reza Chitsaz (MSFT)
Reza
Yes the policies have also been trusted for the 2.0 Framework
Beral
I want to make sure I fully understand the scenario.  You've used VSTO 2003 to create a VSTO application targetting FX1.1.  You now move your VSTO 2003 customization to another machine running FX2.0 and get the error you call out above. Is this correct so far?

My questions:
- is both FX1.1 and FX2.0 on the second machine you've deployed to?
- you've used caspol in both FX1.1 and FX2.0 and updated policy in both FX's to give FullTrust to the assembly in question?
- what is the path you're using to the customization?  For testing purposes can you try using a relative path to the customization?

Thanks.


Reza Chitsaz (MSFT)
Reza
Hello.

Hav you found a solution to this problem? I've run into it as well, and can't find a solution.

Frode
Frode Sorhoy
Hi Frode, can you please answer the questions I've asked above and add detailed repro steps?  It'll help me get a better understanding on the state of your machine.  Can you also let me know what build of VS 2005 you're on?

This is one area we're working on improving the experience on for VS 2005/CLR2.0 RTM.  But there are a few workaround you'll need to do in pre VS 2005 RTM builds to get things to work.

Thanks.


Reza Chitsaz (MSFT)
Reza
Hi.

1) Both FX 1,1 og FX 2.0
2) Given full trust to the assembly in both 1.1 og 2.0
3) file://C:/Documents and Settings/Administrator/My Documents/Visual Studio 2005/Projects/FrodesOutlookAddin/FrodesOutlookAddin/bin/Debug/*

Using a relative path - from where ?

Sinderly, Frode
Frode Sorhoy

Hi Frode, I was suggesting using a relative path to the assembly. Relative from where the document is located i.e. putting .\myassembly\myassembly.dll.

So the fact that you've given trust to the assembly in CLR 2.0 policy makes me wonder why this isn't working for you.  To make sure I understand the complete scenario:

1. build a VSTO 2003 solution
2. deploy your VSTO 2003 solution on a machine running FX1.1 (set code access security to give FullTrust to the VSTO 2003 assembly using caspol under v1.1.4322 of the framework)
3. solution runs fine
4. install FX2.0 (v2.0.12345)
5. VSTO 2003 solution stops running
6. set code access security to give FullTrust to the VSTO 2003 assembly under the FX2.0 (v2.0.12345) using caspol - the key here is that you're setting security under the latest FX2.0 version that's installed on your machine

If there are any differences between your scenario and the one I call out above please let me know. It'll help pinpoint the issue and hopefully get you up and running again.

Thanks.




Reza Chitsaz (MSFT)
Reza
reply 8

You can use google to search for other answers

 

More Articles

• Add menu button in multi-lingual environment
• XP Style of WinForms using VSTO
• outlook plug-in help
• Export Data to Excel
• VSTO - Word Protection & Change table cell background color
• PivotTable Total From Database
• VSTO 2005 Won't Install on Vista build 5308
• .Net setup failure in Win2k
• A very technical (I think) VSTO startup question
• Office 2003 XML versus Office 12 XML
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• COM addin for MS Word
• ExcelSheet deployment
• Deployment seems to be broken in VSTO...
• Re-opening message after MessageClass ch
• Infopath 2007 Default Values
• DocumentChange event is fired when dialo
• How to make certain menu invalid or disa
• How to end an excel page
• Problem with VSTO installation
• Toolbox weird behavior!!!
• Sheet level protection
• Need Help Urgently Please
• VB.NET: Problem with Page header in Word
• Update the thread "Now Available: V
• Can I clear the undo list w/o saving Pre

Hot Articles

• How to empty "From" field usin
• Query on VS2005
• Excel Capacities
• Refedit Control for VSTO
• WordML and tags order (updated)
• Shared Add-In
• VSTO Install
• picture in vdx file (xml visio)
• 4 Lines C++ Code, How it is working?
• Office Document Customization is not ava
• Reopening bug for AllUsers?
• Writing Complex Macro or VBA Code?
• CommandBarButton Selected?
• Publishing Custom Forms in Outlook
• Any option to find Track Revisions - Rej

Recommend Articles

• Getting Up and Running with Excel Servic
• VSTO2005- cannot save xls
• Custom Menu
• How to get char(13)&char(10) in Exce
• C# with Excel - are ranges with letters
• Excel COM Add-in vs. Managed Automation
• Auto signature insertion in Outlook
• Excel IF Function
• Reopening bug for AllUsers?
• Recommendation for Office 2007 developme
• Disable/Enable menu items based on the p
• Outlook: Make mail properties readonly
• How to use vb to add exite effects in po
• No 'Click' for CommandBarPopups, so what
• Access Developer Extensions