【VS2005】+【WebDeployment】自动编译与发布网站的问题

Joop_Song 2011-07-25 03:44:19
1、怎么实现邮件的自动发送?

2、压缩后的zip文件夹是空的,请帮忙看看怎么回事儿?



<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.60403</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{575C9DE5-1C73-4C57-92E1-90B867EE607A}</ProjectGuid>
<SourceWebPhysicalPath>..\Web</SourceWebPhysicalPath>
<SourceWebProject>{00775177-90F2-4D8D-AA87-D264516327A5}

|D:\WorkSpace\XXXX\Web</SourceWebProject>
<SourceWebVirtualPath>/Web</SourceWebVirtualPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<OutputPath>.\Debug</OutputPath>
<EnableUpdateable>true</EnableUpdateable>
<UseMerge>true</UseMerge>
<SingleAssemblyName>Web_deploy</SingleAssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<OutputPath>.\Release</OutputPath>
<EnableUpdateable>true</EnableUpdateable>
<UseMerge>true</UseMerge>
<SingleAssemblyName>Web_deploy</SingleAssemblyName>
</PropertyGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)

\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<Target Name="BuildProjectReferences">
<MSBuild Projects="@(ProjectReference)" Targets="Build" />
</Target>
<Target Name="Email" >
<Message Text = " Mail sending"></Message>
<Mail SmtpServer="$(XXX.com.cn)"
Subject="Test"
Password="$(******)"
From ="$(XXXX@XXX.com.cn)"
To ="$(XXXX@XXX.com.cn)"
Body="This is a test of the mail task." />
</Target>
<Target Name="Zip">
<Time Format="yyyyMMddHHmmss">
<Output TaskParameter="FormattedTime" PropertyName="buildDate"/>
</Time>
<Zip Files="@(ZipFiles)" ZipFileName="aspx V$(Major)-$(Minor)-$(Revision)-

$(buildDate).zip"/>
</Target>
<Target Name="Copy">
<ServiceController ServiceName="w3svc" Action="Stop" />
<Exec Command="Robocopy Debug D:\aspx /MIR /XD Fckeditor attachments .svn obj

doc Test /XF *.zip *.wdproj *.user *.cs *.csproj" IgnoreExitCode="true" />
<ServiceController ServiceName="w3svc" Action="Start" />
</Target>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v8.0

\Microsoft.WebDeployment.targets" />
<!-- To modify your build process, add your task inside one of the targets below and

uncomment it.
Other similar extension points exist, see Microsoft.WebDeployment.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="BeforeMerge">
</Target>
<Target Name="AfterMerge">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Target Name="BeforeBuild">
</Target>
<Target Name="BeforeMerge">
</Target>
<Target Name="AfterMerge">
</Target>
<Target Name="AfterBuild">
<CallTarget Targets="Zip"/>
<CallTarget Targets="Copy"/>
<CallTarget Targets="Email"/>
</Target>
</Project>


...全文
102 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Joop_Song 2011-07-26
  • 打赏
  • 举报
回复
可获得10分
小童 2011-07-25
  • 打赏
  • 举报
回复
Joop_Song 2011-07-25
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 fengyarongaa 的回复:]
这都是配置文件?
[/Quote]

WebDeployment的配置文件。。

但是有问题,不知道怎么改。。。

关于zip和email的问题。。。。。
ycproc 2011-07-25
  • 打赏
  • 举报
回复
这都是配置文件?
Joop_Song 2011-07-25
  • 打赏
  • 举报
回复
。。。
Louis-Lv 2011-07-25
  • 打赏
  • 举报
回复
帮你顶一下!!!

13,190

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 分析与设计
社区管理员
  • 分析与设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧