[英]How to publish (deploy) .lic file to the root of an Azure Web App Service?
Problem 问题
A .lic file which is in the root of the ASP.NET Web Application is not deployed to Azure Web App during VS 2015 Publish operation. 在VS 2015发布操作期间,ASP.NET Web应用程序的根目录中的.lic文件未部署到Azure Web App。 The .lic file set as "Content"
.lic文件设置为“内容”
Context 上下文
I have a component in my ASP.NET MVC which requires its .lic file in the web application root. 我的ASP.NET MVC中有一个组件,它需要Web应用程序根目录中的.lic文件。 I am using VS 2015 Built in Publish to deploy my web app to Azure as an Azure Web App Service.
我使用VS 2015 Built in Publish将我的Web应用程序部署为Azure作为Azure Web App服务。 The .lic file is added to the ASP.NET MVC Web project as a "Content".
.lic文件作为“内容”添加到ASP.NET MVC Web项目中。 However the .lic file is not published.
但是.lic文件未发布。 (checked via FTP)
(通过FTP检查)
Question 题
How can I publish this .lic file to the Web App Service root? 如何将此.lic文件发布到Web App Service根目录? (of course I can manually copy it via ftp, but that's not a solution in long term)
(当然我可以通过ftp手动复制它,但这不是长期的解决方案)
More Diagnostics 更多诊断
I've created a Hello.txt file in my project in the root. 我在根目录中的项目中创建了一个Hello.txt文件。 All settings the same, the Hello.txt is published.
所有设置相同,Hello.txt发布。 It seems that the VS 2015 Publish ignores .lic files... Is it possible?
似乎VS 2015 Publish忽略了.lic文件......有可能吗? How to overcome?
怎么克服?
Add to web.config: 添加到web.config:
<system.web>
<compilation>
<buildProviders>
<remove extension=".lic"/>
<add extension=".lic" type="System.Web.Compilation.ForceCopyBuildProvider"/>
</buildProviders>
</compilation>
</system.web>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.