从当前 DotNetNuke 模块项目重命名 DotNetNuke 模块

Rename of DotNetNuke Modules from current DotNetNuke Modules projects

首先,我有一个带有 FormAndList 的 DotNetNuke 模块项目,我将扩展包上传到我的 DotNetNuke 门户。接下来,我需要自定义 FormAndList 的功能,我复制整个项目并将其重命名为 FormAndList_Cust,我重建它并将扩展包上传到我的 DotNetNuke 门户。由于包重复,它向我显示了以下警告,即使我将自定义项目重命名为 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.

接下来,我意识到我的 .dnn 文件仍然是 FormAndList.dnn,我将其重命名为 FormAndList_Cust.dnn。我在 Visual Studio 中重建了我的项目,它向我显示了以下错误。

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

如何使用当前 FormAndList 项目中的 FormAndList_Cust 重命名我的自定义模块?

  1. 在解决方案资源管理器中右键单击项目。
  2. 选择编辑项目(这将卸载项目)
  3. 在CSPROJ文件中找到formandlist.dnn,重命名(看看是不是多处)
  4. 保存您的 CSProj 文件。
  5. 在解决方案资源管理器中右键单击 CSProj 文件并选择加载它。

我在Module.Package.targets文件中找到了解决这个问题的方法,更改

以下是我的示例代码。

<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" />