我可以使用 Albacore 任务转换 web.config 吗?

发布于 2024-11-05 17:20:04 字数 190 浏览 0 评论 0原文

当我从 Visual Studio 2010 发布时,它会根据 Web.Debug.configWeb.Release.config 转换 web.config。有没有办法用 aspnet_compiler 或 Albacore 中的其他东西来做到这一点?

When I publish from Visual Studio 2010, it transforms the web.config according to the Web.Debug.config or Web.Release.config. Is there a way to do that with aspnet_compiler or something else in Albacore?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幽梦紫曦~ 2024-11-12 17:20:04

最近,邮件列表中有人提出了类似问题。不知道您是否遇到同样的情况,但希望对您有所帮助。根据该人的需求,我为 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 

A similar question was asked recently on the mailing list. I don't know if this is the same situation that you are facing, but hopefully it will help you out. Based on the needs of that person, I recommended the following for the msbuild task.

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 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文