Search code examples
asp.netdotnetnukedotnetnuke-9

Rename of DotNetNuke Modules from current DotNetNuke Modules projects


First, I am having a DotNetNuke module project with FormAndList and I upload extension package into my DotNetNuke portal. Next, I need to customize the features for FormAndList, I copy the whole project and rename it into FormAndList_Cust, I rebuild it and upload extension package into my DotNetNuke portal. It shown me the following warning due to duplicate of package even I rename of my customize project into FormAndList_Cust.

Warning: You have selected to repair the installation of this package. This will cause the files in the package to overwrite all files that were previously installed.

Next, I realize that my .dnn file still FormAndList.dnn and I rename it into FormAndList_Cust.dnn. I rebuild my project in Visual Studio, it shown me the following error.

Severity Code Description Project File Line Suppression State Error Could not find file 'C:\Users\yoong.hon.chan\Desktop\NET_DNN\DNN.FormAndList_Tab\FormAndList.dnn'. FormAndList_Tab

How I can rename of my customize modules with FormAndList_Cust from current FormAndList project?


Solution

  • It have found my solution to solve this problem in Module.Package.targets file, change

    The following is my sample code.

    <Zip Files="@(OutputSource)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="FormAndList_Cust_00.00.01_Source.$(Extension)" />
    <Copy SourceFiles="$(MSBuildProjectDirectory)\FormAndList_Cust_00.00.01_Source.$(Extension)" DestinationFolder="packages/" />
    
    <Delete Files="$(MSBuildProjectDirectory)\FormAndList_Cust_00.00.01_Install.$(Extension)" />
    <Delete Files="$(MSBuildProjectDirectory)\FormAndList_Cust_00.00.01_Source.$(Extension)" />
    
    <Delete Files="$(MSBuildProjectDirectory)\Resources.Zip" />
    
    
    <RemoveDir Directories ="$(MSBuildProjectDirectory)\Package" />
    
    <RemoveDir Directories ="$(MSBuildProjectDirectory)\ResourcesZip" />