When releasing a Core Module we need to submit a package that contains the installable zip, a source zip, the release notes and the test cases. Making this package can get tedious so I have created a MSBuild mod for my proj file. This is an update on my earlier post.
In the last section of the proj file add this.
<TargetName="AfterBuild"DependsOnTargets="DeployModule">
</Target>
<PropertyGroup>
<ModuleFolder>TestDrivenDNNModule</ModuleFolder>
<DNNDirectory>C:\DotNetNuke\Vault\Website</DNNDirectory>
<PackageDirectory>C:\DotNetNuke\TestDrivenDNNModule\Packages</PackageDirectory>
</PropertyGroup>
<PropertyGroup>
<Major>01</Major>
<Minor>00</Minor>
<Build>00</Build>
</PropertyGroup>
<TargetName="DeployModule">
<CreateItemInclude="$(MSBuildProjectDirectory)\$(OutputPath)\*.dll">
<OutputTaskParameter="Include"ItemName="ModuleAssemblies" />
</CreateItem>
<CreateItemInclude="$(MSBuildProjectDirectory)\$(OutputPath)\*.pdb">
<OutputTaskParameter="Include"ItemName="ModuleDebug" />
</CreateItem>
<CopySourceFiles="@(Content)"DestinationFiles="@(Content -> '$(DNNDirectory)\DesktopModules\$(ModuleFolder)\%(Identity)')"SkipUnchangedFiles="true" />
<CopySourceFiles="@(ModuleAssemblies);@(ModuleDebug)"DestinationFolder="$(DNNDirectory)\bin" />
<ZipFiles="@(Content);@(ModuleAssemblies)"Flatten="True"ZipFileName="$(ProjectName)_$(Major).$(Minor).$(Build)_Install.zip" />
<ZipFiles="@(ZipSourceFiles)"Flatten="True"ZipFileName="resources.zip" />
<ZipFiles="@(Content);@(ModuleAssemblies);resources.zip"Flatten="True"ZipFileName="$(ProjectName)_$(Major).$(Minor).$(Build)_Source.zip" />
<ZipFiles="@(PackageFiles);$(ProjectName)_$(Major).$(Minor).$(Build)_Install.zip;$(ProjectName)_$(Major).$(Minor).$(Build)_Source.zip"Flatten="True"ZipFileName="$(ProjectName)_$(Major).$(Minor).$(Build)_package.zip" />
<CopySourceFiles="$(ProjectName)_$(Major).$(Minor).$(Build)_package.zip"DestinationFolder="$(PackageDirectory)" />
</Target>
You will also need to add this to your proj file so the script can find the right files.
<ItemGroup>
<PackageFilesInclude="Documentation\TestDrivenDNNModule_01.00.00_ReleaseNotes.txt" />
<PackageFilesInclude="Documentation\TestDrivenDNNModule_01.00.00_TestCases.txt" />
<ZipSourceFilesInclude="01.00.00.SqlDataProvider" />
<ZipSourceFilesInclude="App_LocalResources\EditTestDrivenDNNModule.ascx.resx" />
<ZipSourceFilesInclude="App_LocalResources\Settings.ascx.resx" />
<ZipSourceFilesInclude="App_LocalResources\ViewTestDrivenDNNModule.ascx.resx" />
<ZipSourceFilesInclude="Components\Controller\ITestDrivenDNNModuleController.vb" />
<ZipSourceFilesInclude="Components\Controller\TestDrivenDNNModuleController.vb" />
<ZipSourceFilesInclude="Components\DataProvider\DataProvider.vb" />
<ZipSourceFilesInclude="Components\DataProvider\IDataProvider.vb" />
<ZipSourceFilesInclude="Components\DataProvider\SqlDataProvider.vb" />
<ZipSourceFilesInclude="Components\Presenters\EditTestDrivenDNNModulePresenter.vb" />
<ZipSourceFilesInclude="Components\Presenters\ViewTestDrivenDNNModulePresenter.vb" />
<ZipSourceFilesInclude="Components\TestDrivenDNNModuleInfo.vb" />
<ZipSourceFilesInclude="Components\Views\IEditTestDrivenDNNModule.vb" />
<ZipSourceFilesInclude="Components\Views\IModuleSettingsBaseView.vb" />
<ZipSourceFilesInclude="Components\Views\IViewTestDrivenDNNModule.vb" />
<ZipSourceFilesInclude="EditTestDrivenDNNModule.ascx" />
<ZipSourceFilesInclude="EditTestDrivenDNNModule.ascx.designer.vb" />
<ZipSourceFilesInclude="EditTestDrivenDNNModule.ascx.vb" />
<ZipSourceFilesInclude="Settings.ascx" />
<ZipSourceFilesInclude="Settings.ascx.designer.vb" />
<ZipSourceFilesInclude="Settings.ascx.vb" />
<ZipSourceFilesInclude="TestDrivenDNNModule.dnn" />
<ZipSourceFilesInclude="TestDrivenDNNModule.sln" />
<ZipSourceFilesInclude="TestDrivenDNNModule.vbproj" />
<ZipSourceFilesInclude="Uninstall.SqlDataProvider" />
<ZipSourceFilesInclude="ViewTestDrivenDNNModule.ascx" />
<ZipSourceFilesInclude="ViewTestDrivenDNNModule.ascx.designer.vb" />
<ZipSourceFilesInclude="ViewTestDrivenDNNModule.ascx.vb" />
</ItemGroup>
You will also need to mark any files you want in the Install zip as Content, which you can do in the VS IDE. This script now allows you to develop your module outside the DesktopModules folder and debug it nicely plus it will package up the module exactly as required for submission to the DNN Core Module release tracking.
Enjoy.