Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAssemblies in Module installationAssemblies in Module installation
Previous
 
Next
New Post
4/9/2018 8:56 AM
 

I have built a module which works fine in my development environment.  I used Chris Hammond's templates and the latest DNN9 build. It isn't happy though when I take the generated install zip file and add it as an extension to another DNN instance.

Specifically it seems that my generated install file doesn't contain all the relevant assemblies that are needed.  Should they automatically be included or am I supposed to edit the manifest myself?

The particular problem is that I'm using the Newtonsoft JSON.  The version included in DNN9 is V7.0.1.  My module is built  using V11.0.2. My install zip only contains one dll; the module assembly , without any of its dependent assemblies (such as the Newtonsoft 11.0.2 dll).  So when it installs it then throws up errors when it can't find the relevant dll.

I had assumed the install build process would include all the relevant files in the install file and its manifest, am I wrong?

 
New Post
4/9/2018 1:24 PM
 

There are two places where you must manually add these dependencies yourself. 

The first is in the ModulePackage.targets file. In here add a line in two places:

    <Copy SourceFiles="$(MSBuildDnnBinPath)\$(AssemblyName).dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>

    <Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />

    <Copy SourceFiles="@(PackageManifestFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />

    <Copy SourceFiles="@(PackageTxtFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />

    <Copy SourceFiles="$(MSBuildDnnBinPath)\WebGrease.dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/> 

Edit the last name to reflect the name of the dependency your project needs.

Secondly, edit your .dnn file. Near the bottom of the file you need to list your assembly like so:

<component type="Assembly">

  <assemblies>

<assembly>

  <name>ContactUs.dll</name>

  <path>bin</path>

</assembly>

  </assemblies>

</component>

Without this DNN won't know to copy your assemblies to the bin folder.

As a note, I've had issues with using different versions of Newtonsoft. At least in DNN 8 and earlier the admin menu depends on a specific version and if you replace it you'll encounter a lot of issues.

 
New Post
4/9/2018 1:24 PM
 

Accidental duplicate.

 
New Post
4/9/2018 1:42 PM
 

Thanks.

atm I don't need to add in any additional assemblies, but it is useful to know. 

I've got things going by not adding the latest Newtonsoft version, but by adding a reference to the existing DNN version instead. I can believe that attempting to replace it will cause problems.

 

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAssemblies in Module installationAssemblies in Module installation


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out