<?
xml
version
=
"1.0"
encoding
=
"windows-1252"
?>
<
Import
Project
=
"MSBuild.Community.Tasks.Targets"
/>
<
Target
Name
=
"PackageModule"
Condition
=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<
XmlRead
Prefix
=
"n"
XPath
=
"dotnetnuke/packages/package/@version"
XmlFileName
=
"$(DNNFileName).dnn"
>
<
Output
TaskParameter
=
"Value"
PropertyName
=
"Version"
/>
</
XmlRead
>
<
ItemGroup
>
<
DefaultExclude
Include
=
"**\.svn\**"
/>
<
DefaultExclude
Include
=
"**\bin\**"
/>
<
DefaultExclude
Include
=
"**\obj\**"
/>
<
DefaultExclude
Include
=
"**\Release\**"
/>
<
DefaultExclude
Include
=
"**\Debug\**"
/>
<
DefaultExclude
Include
=
"**\Test\**"
/>
<
DefaultExclude
Include
=
"**\TestResults\**"
/>
<
DefaultExclude
Include
=
"**\doc\**"
/>
<
DefaultExclude
Include
=
"**\www\**"
/>
<
DefaultExclude
Include
=
"**\*.user"
/>
<
DefaultExclude
Include
=
"**\*.suo"
/>
<
DefaultExclude
Include
=
"**\*.zip"
/>
<
DefaultExclude
Include
=
"**\*.txt"
/>
<
DefaultExclude
Include
=
"**\*ReSharper.*\**"
/>
</
ItemGroup
>
<
ItemGroup
>
<
InstallInclude
Include
=
"**\*.ascx"
/>
<
InstallInclude
Include
=
"**\*.asmx"
/>
<
InstallInclude
Include
=
"**\*.css"
/>
<
InstallInclude
Include
=
"**\*.html"
/>
<
InstallInclude
Include
=
"**\*.htm"
/>
<
InstallInclude
Include
=
"**\*.resx"
/>
<
InstallInclude
Include
=
"**\*.aspx"
/>
<
InstallInclude
Include
=
"**\*.js"
/>
<
InstallInclude
Include
=
"**\*.txt"
Exclude
=
"**\obj\**;**\_ReSharper*\**;"
/>
<
InstallInclude
Include
=
"images\*.*"
/>
</
ItemGroup
>
<
ItemGroup
>
<
SourceInclude
Include
=
"**\*.ascx"
/>
<
SourceInclude
Include
=
"**\*.asmx"
/>
<
SourceInclude
Include
=
"**\*.css"
/>
<
SourceInclude
Include
=
"**\*.xsl"
/>
<
SourceInclude
Include
=
"**\*.html"
/>
<
SourceInclude
Include
=
"**\*.htm"
/>
<
SourceInclude
Include
=
"**\*.resx"
/>
<
SourceInclude
Include
=
"**\*.xml"
Exclude
=
"**\obj\**;**\_ReSharper*\**;"
/>
<
SourceInclude
Include
=
"**\*.aspx"
/>
<
SourceInclude
Include
=
"**\*.js"
/>
<
SourceInclude
Include
=
"**\*.txt"
Exclude
=
"**\obj\**;**\_ReSharper*\**;"
/>
<
SourceInclude
Include
=
"images\*.*"
/>
<
SourceInclude
Include
=
"**\*.cs"
/>
<
SourceInclude
Include
=
"**\*.cs.designer"
/>
<
SourceInclude
Include
=
"**\*.csproj"
/>
<
SourceInclude
Include
=
"**\*.targets"
/>
<
SourceInclude
Include
=
"**\*.sln"
/>
<
SourceInclude
Include
=
"web.config"
/>
</
ItemGroup
>
<
CreateItem
Include
=
"$(DNNFileName).dnn"
>
<
Output
TaskParameter
=
"Include"
ItemName
=
"PackageManifestFiles"
/>
</
CreateItem
>
<
CreateItem
Include
=
"**\*.sqldataprovider"
>
<
Output
TaskParameter
=
"Include"
ItemName
=
"SqlDataProviderFiles"
/>
</
CreateItem
>
<
Copy
SourceFiles
=
"$(MSBuildDnnBinPath)\$(AssemblyName).dll"
DestinationFolder
=
"$(MSBuildProjectDirectory)\Package\bin"
/>
<
Copy
SourceFiles
=
"@(SqlDataProviderFiles)"
DestinationFolder
=
"$(MSBuildProjectDirectory)\Package\%(RecursiveDir)"
/>
<
Copy
SourceFiles
=
"@(PackageManifestFiles)"
DestinationFolder
=
"$(MSBuildProjectDirectory)\Package"
/>
<!-- create the INSTALL RESOURCES.ZIP file -->
<
Copy
SourceFiles
=
"@(InstallInclude)"
DestinationFolder
=
"$(MSBuildProjectDirectory)\ResourcesZip\%(RecursiveDir)"
/>
<
CreateItem
Include
=
"$(MSBuildProjectDirectory)\ResourcesZip\**\*.*"
>
<
Output
TaskParameter
=
"Include"
ItemName
=
"ResourcesContent"
/>
</
CreateItem
>
<
Zip
Files
=
"@(ResourcesContent)"
WorkingDirectory
=
"$(MSBuildProjectDirectory)\ResourcesZip"
ZipFileName
=
"Resources.$(Extension)"
/>
<
Copy
SourceFiles
=
"$(MSBuildProjectDirectory)\Resources.$(Extension)"
DestinationFolder
=
"package/"
/>
<
CreateItem
Include
=
"$(MSBuildProjectDirectory)\Package\**\*.*"
>
<
Output
TaskParameter
=
"Include"
ItemName
=
"OutputContent"
/>
</
CreateItem
>
<!-- Create the Install package -->
<
Zip
Files
=
"@(OutputContent)"
WorkingDirectory
=
"$(MSBuildProjectDirectory)\Package"
ZipFileName
=
"$(PackageName)_$(Version)_Install.$(Extension)"
/>
<!-- Copy the Install package to the Packages folder -->
<
Copy
SourceFiles
=
"$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)"
DestinationFolder
=
"packages/"
/>
<
RemoveDir
Directories
=
"$(MSBuildProjectDirectory)\Package"
/>
<
RemoveDir
Directories
=
"$(MSBuildProjectDirectory)\ResourcesZip"
/>
<
Copy
SourceFiles
=
"$(MSBuildDnnBinPath)\$(AssemblyName).dll"
DestinationFolder
=
"$(MSBuildProjectDirectory)\Package\bin"
/>
<
Copy
SourceFiles
=
"@(SqlDataProviderFiles)"
DestinationFolder
=
"$(MSBuildProjectDirectory)\Package\%(RecursiveDir)"
/>
<
Copy
SourceFiles
=
"@(PackageManifestFiles)"
DestinationFolder
=
"$(MSBuildProjectDirectory)\Package"
/>
<!-- create the SOURCE RESOURCES.ZIP file -->
<
Copy
SourceFiles
=
"@(SourceInclude)"
DestinationFolder
=
"$(MSBuildProjectDirectory)\ResourcesZip\%(RecursiveDir)"
/>
<
CreateItem
Include
=
"$(MSBuildProjectDirectory)\ResourcesZip\**\*.*"
>
<
Output
TaskParameter
=
"Include"
ItemName
=
"SourceContent"
/>
</
CreateItem
>
<
Zip
Files
=
"@(SourceContent)"
WorkingDirectory
=
"$(MSBuildProjectDirectory)\ResourcesZip"
ZipFileName
=
"Resources.$(Extension)"
/>
<
Copy
SourceFiles
=
"$(MSBuildProjectDirectory)\Resources.$(Extension)"
DestinationFolder
=
"package/"
/>
<
CreateItem
Include
=
"$(MSBuildProjectDirectory)\Package\**\*.*"
>
<
Output
TaskParameter
=
"Include"
ItemName
=
"OutputSource"
/>
</
CreateItem
>
<
Zip
Files
=
"@(OutputSource)"
WorkingDirectory
=
"$(MSBuildProjectDirectory)\Package"
ZipFileName
=
"$(PackageName)_$(Version)_Source.$(Extension)"
/>
<
Copy
SourceFiles
=
"$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Source.$(Extension)"
DestinationFolder
=
"packages/"
/>
<
Delete
Files
=
"$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)"
/>
<
Delete
Files
=
"$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Source.$(Extension)"
/>
<
RemoveDir
Directories
=
"$(MSBuildProjectDirectory)\Package"
/>
<
RemoveDir
Directories
=
"$(MSBuildProjectDirectory)\ResourcesZip"
/>
</
Target
>
</
Project
>