Apparently, DNN installations do not like to be precompiled (they won't be able to find any localized strings then). Our installation is safely put in SVN, which means I cannot just copy the开发者_如何学运维 whole directory. To publish everything, I need to copy the whole website directory without the SVN files and directories. So far, I've been messing with good old DOS commands, which is time consuming and error prone.
Can someone help me to an MS-Built script or step to do just this? Or can I do this using default Visual Studio 2010 commands?
Note: this is a website, not a web application.
Just svn export
the directory from source control, which will give you a clean copy without the .svn
stuff in it.
Visual Studio
-> Solution Explorer
-> <web site>
-> <right click>
-> Publish Web Site
or Copy Web Site
If you are ever interested in automating this with MSBuild then you can do that with something like the following.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<FilesToCopy Include="**\*"
Exclude="**\.svn\**"/>
</ItemGroup>
<PropertyGroup>
<Dest>C:\temp\dest\</Dest>
</PropertyGroup>
<Target Name="CopyFiles">
<Message Text="FilesToCopy: @(FilesToCopy)"/>
<MakeDir Directories="$(Dest)"/>
<Copy SourceFiles="@(FilesToCopy)"
DestinationFiles="@(FilesToCopy->'$(Dest)%(RecursiveDir)%(Filename)%(Extension)')"/>
</Target>
</Project>
So when I create the FilesToCopy
item I exclude all the files under any .svn folder. Then I just perform the copy inside the CopyFiles target.
精彩评论