Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

I added a couple of new dll references(that resides on my pc), Publish to web server now the app doesn't work

Hi, I'm using vs2012.
I added a couple of dll to my project and these 2 dlls resides on my local PC's C drive.  It runs fine from my local VS however, after publishing to server it doesn't work when it reaches code area where these 2 dlls are needed.  How do I configure the Publish or build manager to make sure these 2 dlls are included when published using Web Deply?

Also, one of the dll requires the 2nd dll to even run on my pc that's why I added reference to the 2nd dll.  In general, if you create a class library, shouldn't you include all the dependency dll that you need so user like me wouldn't have to download and include those dependent dll?  The error message I got is the application cannot find and load the 2nd dll(MS Sharepoint.client dll) that is needed by the 1st dll(this is a class library built by co-worker).

Thank you.
Avatar of lapucca
lapucca

ASKER

Attached is the error message when the application crashed.  This dll was added to reference in my project.  The dll resides on my local PC.  So when I build in Release mode, and publish, shouldn't these dll automatically be included in the publish deployment to the web server?  I even tried copy the file, using the same path, on the web server and it still can't load the dll.
dll-error.txt
Avatar of Miguel Oz
You need a local copy of both DLLs, thus please set both DLLs local copy property in your web project as shown here
After done that, publish your site again and make sure your DLLs are copied to your bin folder in your server.
Avatar of lapucca

ASKER

Hi,
I read the link you provided, not understanding it completely but I did set the 2 dll propety's Copy Local to True.  Attached is one of the dll, the one in the error message, property screen shot.  I publish using Web deploy again and still getting the same error.  Thank you.
dll-error2.txt.png
ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapucca

ASKER

Hi,
This is what I installed on my local PC.  I will install that on the web server.sharepointclientcomponents_x64
Awesome!  That is it!!  Previously I copied the dlls and folders to the web server, that didn't do the trick. It's odd that My project reference to these 2 dlls but the publish web deploy doesn't include this.  Or is it the problem that the SP Dll just need to be install with the web server?
Thank you for the big help.
You are welcome. You can see this step as installing SP as prerequisite of your web site.