当我从Visual Studio 2010发布时,它会根据Web.Debug.config
或Web.Release.config
转换web.config
。有没有办法用长鳍金枪鱼的aspnet_compiler
或其他东西来做到这一点?
最近在
邮件列表中提出了类似的问题。我不知道这是否与您面临的情况相同,但希望它对您有所帮助。根据该人员的需求,我建议对 msbuild 任务执行以下操作。
CLIENT_SOURCE_DIR = 'C:/Builds/MySolution/Source/Client/'
PUBLISH_CLIENT_DIR = 'C:/Builds/MySolution/Publish/Client/'
desc 'Publish the web site'
msbuild :publish do |msb|
msb.solution = "#{CLIENT_SOURCE_DIR}/Client.csproj"
msb.targets [:Clean, :Rebuild]
msb.properties = {
:configuration => :Release,
:UseWPP_CopyWebApplication => true,
:PipelineDependsOnBuild => false,
:webprojectoutputdir => "#{PUBLISH_CLIENT_DIR}/",
:outdir => "#{PUBLISH_CLIENT_DIR}/bin/"
}
end