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.
ASP.NET.NET ProgrammingC#

Avatar of undefined
Last Comment
Miguel Oz

8/22/2022 - Mon
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
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.
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
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
Miguel Oz

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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.
Miguel Oz

You are welcome. You can see this step as installing SP as prerequisite of your web site.