Compile MVC and Pre-Compile Views And Deploy Into Azure WebRole

泄露秘密 提交于 2019-12-03 14:47:56

1)

/p:PrecompileBeforePublish=true

2 + 3)

You need to add the following MSBuild target in your .ccproj to copy in your transformed Web.config file (using Web.Release.config as your target for transforms):

<Target Name="CopySpecialFilesIntoPackage" AfterTargets="CopyWorkerRoleFiles">
  <ProjectName>WebProjectName</ProjectName>
  <TransformXml Source="$(ProjectDir)..\$(ProjectName)\Web.config" Transform="$(ProjectDir)..\$(ProjectName)\Web.Release.config" Destination="$(ProjectDir)obj\$(Configuration)\$(ProjectName)\$(ProjectOutput).config" />
</Target>

If you want to web deploy to multiple instances of a web role, you can use Azure Web Sites or the open source project Azure Web Farm for when you need a web role (eg SSL on custom domains).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!