Same -----Original Message----- From: ozmoss@ozmoss.com [mailto:ozm...@ozmoss.com] On Behalf Of Chris Milne Sent: Wednesday, 29 July 2009 2:00 PM To: ozmoss@ozmoss.com Subject: RE: Web part with dll reference
I don't mind RE my posts. Would love to have a look-see when you're done. Kind regards, Chris Milne -----Original Message----- From: ozmoss@ozmoss.com [mailto:ozm...@ozmoss.com] On Behalf Of Jeremy Thake Sent: Wednesday, 29 July 2009 1:57 PM To: ozmoss@ozmoss.com Subject: RE: Web part with dll reference Guys, do you mind if i grab this and structure it for a page on the SPDevWiki? Jeremy Thake Readify | Senior Consultant M: +61 400 767 022 | E: jeremy.th...@readify.net | W: www.readify.net -----Original Message----- From: ozmoss@ozmoss.com [mailto:ozm...@ozmoss.com] On Behalf Of Ishai Sagi Sent: Wednesday, 29 July 2009 9:08 AM To: ozmoss@ozmoss.com Subject: RE: Web part with dll reference I agree with Bill - had that happen to me just last week - it is all on the way you added the reference - if added wrong, it cant find the assembly (it is probably looking in the physical folder that your web part dll is deployed to). -----Original Message----- From: ozmoss@ozmoss.com [mailto:ozm...@ozmoss.com] On Behalf Of Bill Williamson Sent: Tuesday, 28 July 2009 7:49 PM To: ozmoss@ozmoss.com Subject: Re: Web part with dll reference Turn on the dotnet assembly resolution logging, it will likely tell you what's wrong. My guesses: -assembly referenced from your filesystem. that makes it a non-strong reference. When it's copied to the GAC you are no longer finding it. In visual studio, are you referencing it from your GAC or from your filesystem? -If the referenced DLLs have native components you are running into 32/64bit problems. We ran into this with K2 BlackPearl as their client dlls are written in C++ without the right flags set. -As per #2, you're using a component built in VC++.net and do not have the VC++ redistributable installed on your server. It seems liek a problem that should have gone away after VB6 but it still exists. All 3 of the problems above were run into while writing a custom component to talk to K2 BP. On Tue, Jul 28, 2009 at 2:40 PM, Chris Milne<chris.mi...@dataaspects.com.au> wrote: > 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 J 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: ozmoss@ozmoss.com > Subscribe: ozmoss-subscr...@ozmoss.com > Unsubscribe: ozmoss-unsubscr...@ozmoss.com 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: ozmoss@ozmoss.com Subscribe: ozmoss-subscr...@ozmoss.com Unsubscribe: ozmoss-unsubscr...@ozmoss.com 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: ozmoss@ozmoss.com Subscribe: ozmoss-subscr...@ozmoss.com Unsubscribe: ozmoss-unsubscr...@ozmoss.com 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: ozmoss@ozmoss.com Subscribe: ozmoss-subscr...@ozmoss.com Unsubscribe: ozmoss-unsubscr...@ozmoss.com 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: ozmoss@ozmoss.com Subscribe: ozmoss-subscr...@ozmoss.com Unsubscribe: ozmoss-unsubscr...@ozmoss.com 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: ozmoss@ozmoss.com Subscribe: ozmoss-subscr...@ozmoss.com Unsubscribe: ozmoss-unsubscr...@ozmoss.com List FAQ: http://www.codify.com/lists/ozmoss Other lists you might want to join: http://www.codify.com/lists