Developer forum

Forum » Development » Upload dll files to DW 10 can not install it

Upload dll files to DW 10 can not install it

Andreas Rundgren
Reply

Hi,

Im trying to upload Select.HtmlToPdf.dll file using the dw install command. 

In the "Addins/Local" folder i have the file "Select.HtmlToPdf.dll".

 

But in the "Addins/Installed" folder it has a folder called like this.



And when i check under "Developer/Addins/Local" it is called like this and is not "installed" with the green little check that the other of my dll's have

 

When i check the properties for the dll i can see at the bottom the "original filename" is as the folder in "installed". 

 

So now when i try to install it, it dont want to be installed because it is different names.  
How can i solve this? and why does the Developer/addins/local take the originalfilename and not the name which are in assets/local?

And when i try my function that uses it it says: Could not load file or assembly 'Select.HtmlToPdf, Version=25.2.0.0

Regards
Andreas


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Andreas,

The "AddIns/Installed" folder requires a specific structure. If you install a dll called "MyLogic.Providers.dll" that has version 1.2.3, it will be installed into a folder called "MyLogic.Providers.1.2.3". The format is "[NameOfAssembly].[Version]". That's the way DynamicWeb handles addins. This happens automatically when installing assemblies using the cli, which is why you see that folder. It's expected and correct. Assemblies not in a matching folder will not be loaded.

I'm not sure what you're referring to when you mention "Developer/AddIns/Local", can you elaborate?

- Jeppe

 
Andreas Rundgren
Reply

Hi,

I now createad a nuget package instead and run dw install on that file
With depedencies like this:


The select.htmltopdf.dll file seems to work now but this package needs a .dep file to work. 
Could not find 'Select.Html.dep' (trying to load C:\Program Files\dotnet\shared\Microsoft.NETCore.App\Select.Html.dep).

But i dont understand how to install the dep file? I thought that when do like this using a nupkg file it should be installed using nuget from DW, which then should add also the .dep file which is required for this package.
Any ideas how to get the dep file in?

Regards
Andreas

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Have you checked whether the ".dep" file is copied into the installtion folder after install? If it's not there, try to copy it manually. According to the documentation for Select.HtmlToPdf, you may need to specify the location of the .dep file manually. Technically, that means that you can place it anywhere you like, you just need to specify the path to it.

https://selectpdf.com/pdf-library/html/Installation.htm
See the section called Project Setup.

- Jeppe

 
Andreas Rundgren
Reply

How can i see the installation folder becuase it is in DW cloud?

i tried to add it like this in my nuspec file after some chat with DW gpt but still not working. Same error as before could not find.

<file src="bin\Release\net8.0\Select.Html.dep" target="lib\net8.0" />

The file get uploaded here when i have the dependecies like above image and this: <file src="bin\Release\net8.0\Select.Html.dep" target="lib\net8.0" />: 



Regards
Andreas

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

You don't have to keep it alongside your assemblies. You could upload the .dep file separately to a fixed location, for example /Files/System/AddIns/Extras/Select.Html.dep, and set

GlobalProperties.HtmlEngineFullPath = Dynamicweb.Core.SystemInformation.MapPath("/Files/System/AddIns/Extras/Select.Html.dep");

as mentioned in their documentation. I'm not familiar with their API, so you probably have to work that bit out on your own.

- Jeppe

 
Andreas Rundgren
Reply

I now solved the little .dep file by add it inside my nuspec file. 
When added this row  <file src="bin\Debug\net8.0\Select.Html.dep" target="content\Files\Select.Html.dep" /> it not complaining about that file anymore.

Regards
Andreas

 

You must be logged in to post in the forum