Source code file corrupt


After building a project based on your template, the source code ZIP file is created but when I try to extract the contents, I get the message "The Compressed Folder 'C:\Path\To\Archive.zip' is invalid." The file has the expected size, so the msbuild task is trying to put something in there, but it is corrupt.
The CreateItem element that gets the source files looks like this:
<CreateItem Include="$(RootDir)\$(ModuleName)***.*;
                $(RootDir)\$(ModuleName).sln" Exclude="@(DefaultExclude)">
<Output TaskParameter="Include" ItemName="SourceZipFiles"/>
If I change it to a hard-coded reference to a file, it works as expected (that is, I get the .sln file in the ZIP archive). For example:
<CreateItem Include="D:\development\GalleryServerPro\TIS.GSP.DNN.sln;">
<Output TaskParameter="Include" ItemName="SourceZipFiles"/>
As best I can tell, your original configuration using RootDir and ModuleName is correct, so I am not sure what the issue is. I can repro the problem using an unmodified project from your template.
I am using VS 2008 Pro on Win Server 2008 x64 against DNN 5.0.1.


aarsys wrote May 16, 2010 at 9:47 AM

I have also reproduced this issue. Couldn't find out whats happend with it.

aarsys wrote May 18, 2010 at 2:19 PM

The manuel soultion is to change the line:
<Zip Files="@(SourceZipFiles)" WorkingDirectory="$(MSBuildProjectDirectory)" ZipFileName="$(DeployDir)\$(CompanyName).$(ModuleName).source.v$(Major).$(Minor).$(Build).$(Revision).zip" />


<Zip Files="@(SourceZipFiles)" WorkingDirectory="$(MSBuildProjectDirectory).." ZipFileName="$(DeployDir)\$(CompanyName).$(ModuleName).source.v$(Major).$(Minor).$(Build).$(Revision).zip" />

(The change is in the WorkingDirectory there have to add .. )

wrote Feb 13, 2013 at 9:53 PM