Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Missing dll's after NuGet install

Missing dll's after NuGet install

Lars Larsen
Lars Larsen
Reply

Hi

I have just installed v9.3.1 from NuGet. After that I builded the solution. But the site wouldn't run because the Owin.dll and the ABCpdf9-64.dll were missing in the bin folder. After manually dropping the two dll's into the bin folder and building the solution was up running. Are there something wrong in the v9.3.1 NuGet package? Or what can have gone wrong?


Replies

 
Martin Vang
Martin Vang
Reply

Hi Lars,

Good question. Can I ask you how you installed v9.3.1 from NuGet? Step by step is fairly important to understand what your problem is. 

Also, have you looked at the logs?

BR

Martin

 
Lars Larsen
Lars Larsen
Reply

Hi Martin

In VS I went into Tools - NuGet Package Manager. From there (The Browse tab) I choose "Dynamicweb.Admin", selected my project to the right, selected Version "Latest stable 9.3.1", Dependency behavior=Lowest, File conflict action=Overwrite all. Then clicked "Install".

 

 
Martin Vang
Martin Vang
Reply

I wanted to understand if you where using the backend package manager.

Can you attatch your packages.config file to let me have a look?

 
Martin Vang
Martin Vang
Reply

Also, does your console tell you about any exceptions during install?

 
Lars Larsen
Lars Larsen
Reply

Hi Martin

In order to try a completly clean installation I have now followed the instructions on the doc website for installing a solution locally. But I don't see the logic in first creating a VS solution and installing the application using NuGet. And after that setting up an IIS website where the root of this website is an Application(9.3.1) folder that I have to download manually. In that way this website does not run on the code that I would make in my Visual Studio solution created previously (unless I publish to the IIS website of course). I would like my Visual Studio solution to be the root of my website. But if I set that up in the IIS then I get the error in first screenshot. After moving the configSections right beneath the configuration root element in web.config I get the error in screenshot number two (Owin.dll is missing). So now I end up with the same problem I had initially. How can I set up my Visual Studio solution so that it will work with the Dynamicweb application?

Problem number two: when the root of my Visual Studio solution is the root folder for my IIS website then I have to manually copy the Admin folder from the Application(9.3.1) folder because the Admin folder is not part of any NuGet packages. Why isn't it?

Capture.PNG Capture1.PNG
 
Martin Vang
Martin Vang
Reply

Hi Lars,

I don't know what goes wrong when you try to add our package to your VS-project. That is why I asked you to upload the packages.config file from your solution.

Downloading the zip-file is not part of the steps you linked to - the example simply had a visual studio project called "Application(9.3.1)". If you point your IIS towards root of your project, things should work - provided that the project builds correctly and that the package installed in the first place.

I have just tried to install the package on my machine, and after some testing/different setups, I was able to get an exception during installation of the admin package (3rd party dependency conflicted resulting in the install rolling back, leaving an unmodified solution). Are you sure you didn't get any exceptions when you did your NuGet install for Dynamicweb.Admin? (you can see them in the Output console)

 

BR

Martin

 
Lars Larsen
Lars Larsen
Reply

Hi Martin

I missed that the Visual Studio project on this page was called "Application(9.1.1)" and therefore not the Dynamicweb solution in it self, sorry. Now I have tried again with a brand new VS solution and installing Dynamicweb from NuGet within VS. The installation gets this exception (is it the same as you get?):

System.Runtime.InteropServices.COMException (0x80004005): Cannot add the file 'PrintHook64.dll'. There is already a linked file in this folder with the same name.
   at EnvDTE.ProjectItems.AddFromFileCopy(String FilePath)
   at NuGet.PackageManagement.VisualStudio.VSMSBuildNuGetProjectSystem.AddFileToContainer(String fullPath, String folderPath, ProjectItems container)
   at NuGet.PackageManagement.VisualStudio.VSMSBuildNuGetProjectSystem.<AddFileToProjectAsync>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.VisualStudio.VSMSBuildNuGetProjectSystem.<>c__DisplayClass30_0.<<AddFile>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
   at NuGet.PackageManagement.VisualStudio.VSMSBuildNuGetProjectSystem.AddFile(String path, Stream stream)
   at NuGet.ProjectManagement.MSBuildNuGetProjectSystemUtility.TryAddFile(IMSBuildNuGetProjectSystem msBuildNuGetProjectSystem, String path, Func`1 content)
   at NuGet.ProjectManagement.MSBuildNuGetProjectSystemUtility.AddFiles(IMSBuildNuGetProjectSystem msBuildNuGetProjectSystem, IPackageCoreReader packageReader, FrameworkSpecificGroup frameworkSpecificGroup, IDictionary`2 fileTransformers)
   at NuGet.ProjectManagement.MSBuildNuGetProject.<InstallPackageAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.UI.UIActionEngine.<ExecuteActionsAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.UI.UIActionEngine.<PerformActionImplAsync>d__6.MoveNext()
========== Finished ==========

 

 
Martin Vang
Martin Vang
Reply

Yes. That is the exception I get aswell :)

This problem/bug has been fixed for the upcomming release. Workaround for now:

1. Install "ABCPdf 9.1.1.5" from nuget package manager. 

2. Delete all the dlls added to your solution (abcpdf-32.dll, abcpdf-64.dll, PrintHook32.dll and PrintHook64.dll)

3. Install Dynamicweb.Ecommerce

4. Delete the added dlls... again. (abcpdf-32.dll, abcpdf-64.dll and PrintHook32.dll )

5. Install Dynamicweb.Admin

Also, if you want your own project to be packed as a nuget package, you should mark all the dlls as "Content:None" under their properties.

 

Hope this helps you get it up and running.

BR

Martin

 
Lars Larsen
Lars Larsen
Reply

Hi Martin

Followed your instructions. But now I have an invalid web.config again (same problem as earlier, see attached screenshot)

Capture.PNG
 
Martin Vang
Martin Vang
Reply

Hi Lars,

Can I see the web.config file, then?

BR

Martin

 
Lars Larsen
Lars Larsen
Reply

Hi Martin

Sure, here it is:

 
Martin Vang
Martin Vang
Reply

Can you please upload it as a zip?

 
Lars Larsen
Lars Larsen
Reply

And now as zip ;-)

 
Martin Vang
Martin Vang
Reply

Can I have your packages.config aswell? :)

You do have the correct redirect in your webconfig for owin, so my best guess is, that you dont have it in your bin folder? (which I can most likely see if you show me your packages.config)

 
Lars Larsen
Lars Larsen
Reply

And now my packages.config file

 
Martin Vang
Martin Vang
Reply

Have you built the solution after you've installed the package? :)

 
Lars Larsen
Lars Larsen
Reply

Yes I build the solution after I installed Dynamicweb.Admin 

 
Ben Doorn
Reply

Hi Lars,

When having issues with missing files from the Dynamicweb NuGet packages, the Nuget command "Update-Package -Reinstall" saved me a lot of time. (this is different than the restore packages from the GUI)

This wil just reinstall all existing packages, without updating see this url for more information.

https://docs.microsoft.com/en-us/nuget/tools/ps-ref-update-package

Just run it in the NuGet Package manager console in VS.

The error with the web.config looks familiar we got this sometime because some component updates the web.config with invalid entries. I did not yet found what component is causing this. 

Brdgs,

Ben

 
Lars Larsen
Lars Larsen
Reply

Hi Ben

Thank for your input. I will remember your suggestion regarding "Update-Package -Reinstall" the next time a have a missing dll problem smiley

 
Martin Vang
Martin Vang
Reply

Does that mean, that Ben's suggestion solved your problem?

 
Lars Larsen
Lars Larsen
Reply

Hi Martin

Unfortunately not. I did a "Update-Package -Reinstall" and after that builded the solution. But still my web.config is invalid.

 
Martin Vang
Martin Vang
Reply

Hi Lars,

You had some malformed information in your web.config:

DotNetCompilerPlatform should have been using version 1.0.5.0, but it was using 1.0.0.0 (no idea how that happened -> Cannot replicate in any way)

and

<configSections>

was not placed under <configuration>, but instead under <system.web> (not valid).

I fixed both and the webconfig now works on my fresh install of admin 9.3.1.

Fixed web.config attached.

BR

Martin

 
Lars Larsen
Lars Larsen
Reply

Hi Martin

Have you fixed anything in the NuGet packages? I mean are those two errors you mention history if I do a fresh NuGet install?

 
Martin Vang
Martin Vang
Reply

Hi Lars,

I expect that you have an application that only needs a valid web.config? You still need to follow my other instructions from the thread.

 

BR

Martin

 
Lars Larsen
Lars Larsen
Reply

Hi Martin

I have just got it up running. But I had to this:

Install NuGet package Microsoft.CodeDom.Providers.DotNetCompilerPlatform v.1.0.5.0 (because v.1.0.0.0 was installed by default right after creating the web application project i VS)

Followed your instructions: 

1. Install "ABCPdf 9.1.1.5" from nuget package manager. 

2. Delete all the dlls added to your solution (abcpdf-32.dll, abcpdf-64.dll, PrintHook32.dll and PrintHook64.dll)

3. Install Dynamicweb.Ecommerce

4. Delete the added dlls... again. (abcpdf-32.dll, abcpdf-64.dll and PrintHook32.dll )

5. Install Dynamicweb.Admin

Builded the solution and tried to browse the site. But then I got this error:

Unable to load DLL 'ABCpdf9-64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Therefore I copied ABCpdf9-64.dll (which was laying in the root of the site after installing Dynamicweb.Admin) into the bin folder

Builded the site and then I could browse the backend

Oh, I thought NuGet would make installation of DW much easier wink

 
Martin Vang
Martin Vang
Reply

Hi Lars,

Good to hear that you get it up and running!

There is presently a bug in our latest release, which makes it difficult to do the install. Step 1-4 should not be done after this is fixed (next hotfix).

You also should not need to copy any files (abcpdf). It's all related to ABCPdf-nuget package, which is, quite simply put, difficult to work with in a setup where you have dependencies ("funny", considering that it's a nuget package...)

My best guess for why you need to install the dotnetcompilerplatform, is because you havn't updated Visual Studio?

I dont know who told you that it would be easier installing dynamicweb via. Visual Studio - could you elaborate? The way I see it, is to make it easier to build custom code that is dependent upon our api and then dump that into a bin-folder - without having to download/install admin. I really dont see how we can make it easier then using a zip-file, if you just want a solution up and running. :)

BR

Martin

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

>> I really dont see how we can make it easier then using a zip-file, if you just want a solution up and running. :)

It would be a little easier with the DW Installer tool: http://dwinstaller.codeplex.com/ ;-)

Imar

 
Lars Larsen
Lars Larsen
Reply

Hi Martin

I am using Visual Studio 2015 version 14.0.25431.01 Update 3. Shouldn't that be good enough?

What I meant about installing DW via VS was that it has been quite time consuming getting this website up running despite I followed the instructions on the page INSTALLING A DYNAMICWEB SOLUTION LOCALLY

But glad to hear that you have identified a bug in the latest release, as you wrote. When fixed I hope the NuGet install will work more seamless again smiley

 
Martin Vang
Martin Vang
Reply

Hi Imar,

Is it really easier to provide an unzipping tool that knows how to create iis websites? I mean, then you have to move it arround between the different servers. Personally I really have havint to install/download seperate programs to install another program.

Another solution would be to create a self-contained installer, that know how to download versions of dynamicweb, unpack them and setup the iis as part of the installation. That is possible, but requires alot of QA/test time.

Please create a feature request if you would like to see something like this in the future, or if you would like for us to make an install program like the one you linked to. :)

BR

Martin

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

>> Another solution would be to create a self-contained installer, that know how to download versions of dynamicweb, unpack them and setup the iis as part of the installation

Which is exactly what my DW Installer linked above does. Well, almsot, as it's not contained inside Dynamicweb but works as a single standalone ,.exe which you have to copy to the target machine (no installation though).

You then point it to a backup of a site (your own, wrap, Rapido, what have you), optionally configure some things and hit Go.Then the tool does everything; it unpacks the application's zip if needed, unpacks the site, sets up IIS, creates VDirs, sets permissions, restores the database and sets up permisions, merges the web.config, updates the Bin folder with the latest assemblies, does some cleanup and more.

No need for a feature request from me, as we already have it ;-) Happy to show it to you during the summit. It would be nice to hook it into NuGet or the doc portal someday so we can pull in the latest app versions. 

Imar

 
Martin Vang
Martin Vang
Reply

Sure. Sounds good. I'll look forward to talking with you on Summit. :)

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Likewise!

 

You must be logged in to post in the forum