在dnn的论坛看到一篇帖子,比较实用,留在这里。

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=671187

DNN 3.x.x Deploy.bat:

XCOPY "[dnn source root]" [destination path] /D /E /R /K /H /I /Y /W /EXCLUDE:Exclude.txt

Example:

XCOPY "E:\DNN\DotNetNuke" E:\DNN\Deploy /D /E /R /K /H /I /Y /W /EXCLUDE:Exclude.txt

This copies from my DotNetNuke source root folder to a deploy folder, excluding folders and files defined in the Exclude.txt file below.

I have a folder, "E:\DNN\Build" that has only the Deply.bat file and the Exclude.txt file in it. I go there, click on Deploy.bat, click any key to continue, and viola, I have a folder containing all my files I need to deploy to my host for any site.

All I have to do is add the appropriate web.config file in the root and I am all set.

DNN 3.x.x Exclude.txt:

\Documentation\
\BuildSupport\
\Components\
\HttpModules\

\controls\CountryListBox\
\controls\DataAccessBlock\
\controls\DotNetNuke.WebControls\
\controls\DotNetNuke.WebUtility\
\controls\MemberRole\
\controls\SharpZipLib\
\controls\SolpartMenu\bin\

\Portals\0\portal.css

.sln
.suo
.webinfo
.vb
.build
.bat
.pdb
.doc
web.config


There is a start for the bat file's exclude.txt file for DNN 3.x.x.

There is much, much more that can be added, this is a start for 3.x.x

The \Portals\0\portal.css file is excluded because if it exists already, DNN throws an error (unhandled) that it already exists when you run the newly deployed portal.

Deployment size from the above excludes = 22.8mb, size on disk = 25.7mb.

I am sure if I had a little more time this morning, I could easily figure out all of the required excludes, a Core Team member is not required (although it would speed things up).