2

There are some third party dlls in Bin folder. I would like to move them to root/lib path. I think, it is not enough move the files to lib folder. How can i do this, safely? These are dlls;

  • Microsoft.Web.Infrastructure.dll
  • Newtonsoft.Json.dll
  • NReco.PdfGenerator
  • System.Web.Optimization.dll
  • WebGrease.dll

Update: I followed these instructions and i got an error like; The type or namespace name 'Optimization' does not exist in the namespace 'System.Web'

The error occurred on this line: using System.Web.Optimization;

I created a new lib folder on root directory, moved System.Web.Optimization.dll file to lib. Then, i edited my web.config as below;

    <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
  </dependentAssembly>
  <probing privatePath="bin;lib"/>
</assemblyBinding>

Community
  • 1
  • 1
Ceylan B.
  • 564
  • 9
  • 23

2 Answers2

1

You can check with the link below.

How to move all referenced DLLs into seperate folder in c#?

Hope this helps!

Community
  • 1
  • 1
Anoop H.N
  • 1,244
  • 1
  • 15
  • 31
1

I found the answer on this question. So, if you want to move third party dlls to new folder, you can follow these steps;

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="Bin;folder_path"/>
    </assemblyBinding>
</runtime>
  1. Create a new folder to move dlls
  2. Update web.config like above
  3. Add moved assemblies between system.web tags

    <add assembly="System.Web.Optimization" />
    <add assembly="Telerik.Web.UI" />
    
Community
  • 1
  • 1
Ceylan B.
  • 564
  • 9
  • 23