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?
[787 byte] By [
Beral] at [2008-2-20]
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.
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.
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
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.