So are you using the VSeWSS 1.3 CTP when you say Visual Studio projects?

I'm assuming you must be using a WSP if its automatically adding the 
SafeControl entry.

The reason you're probably getting this error is because you need to ensure you 
deploy the external library with the package. To do this, ensure you have Copy 
Local set to true in the properties. If it's VSeWSS you're using, you can check 
the manifest.xml file and see whether an Assembly element has been added for 
it. Also you can check it's deployed by going to c:\windows\assembly and 
ensuring the dll is in there ;-)

Jeremy Thake
Readify | Senior Consultant
M: +61 400 767 022 | E: 
[email protected]<mailto:[email protected]> | W: 
www.readify.net<http://www.readify.net/>

From: [email protected] [mailto:[email protected]] On Behalf Of Chris Milne
Sent: Tuesday, 28 July 2009 12:41 PM
To: [email protected]
Subject: Web part with dll reference

Afternoon all,

I'm developing a web part in which I would like to reference functionality that 
exists in one of our other company Visual Studio projects (.net assembly/dll).  
I'm having trouble doing this and hoping someone can point me in the right 
direction :)  I've created a simple VS web part project which works if I deploy 
it just by itself (not using the library functionality).  I then added a 
reference to my dll, added a 'using' to import the namespace into my code (if I 
deploy again at this point it still works), but if I add one line of code that 
uses the external library into CreateChildControls() and deploy, I get a 
generic 'Error An Unexpected error has occurred' message on a page the webpart 
exists on.

Visual Studio is automatically adding a <SafeControl Assembly=..> to my 
web.config for my web part assembly but not the external library assembly, do I 
need to add that?  Both assemblies are automatically being added to the GAC.  
Any help is appreciated!


Kind regards,

Chris
________________________________
Support procedure: https://www.codify.com/lists/support
List address: [email protected]<mailto:[email protected]>
Subscribe: [email protected]<mailto:[email protected]>
Unsubscribe: [email protected]<mailto:[email protected]>
List FAQ: http://www.codify.com/lists/ozmoss
Other lists you might want to join: http://www.codify.com/lists
--------------------------------------------------------------------------------
Support procedure: http://www.codify.com/lists/support
List address: [email protected]
Subscribe: [email protected]
Unsubscribe: [email protected]
List FAQ: http://www.codify.com/lists/ozmoss
Other lists you might want to join: http://www.codify.com/lists

Reply via email to