多年来,我一直在 Visual Studio 中使用鼠标右键单击发布网站,除了手动工作过多之外,一切都运行良好。最近我改用构建脚本调用aspnet_compiler来发布ASP.NET Web应用程序。在我的构建脚本中,我会执行以下操作:
sh "#{aspnet_compiler} -p ../src/webapp -v targetDir ./publish –u"
我的项目目录结构如下所示:
/build/rakefile.rb
/build/publish/ --published site goes here
/src/website/bll/ --business logic goes here
/src/website/ --aspx pages
/src/website/code/ --some c# code
当调用 aspnet-compiler 时,一切正常,除了/src/website/code/ 下的 c# 代码不会被编译。在我看来,aspnet-compiler在 bll 目录下编译了 c# 代码,然后将 /src/website/ 下的所有内容复制到了发布目录(包括 /src/website/code/)。我不知道我是否没有使用正确的开关调用 aspnet-compiler 或者这是所需的行为?
请帮忙谢谢!