简体   繁体   中英

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. The .lic file set as "Content"

Context

I have a component in my ASP.NET MVC which requires its .lic file in the web application root. I am using VS 2015 Built in Publish to deploy my web app to Azure as an Azure Web App Service. The .lic file is added to the ASP.NET MVC Web project as a "Content". However the .lic file is not published. (checked via FTP)

Question

How can I publish this .lic file to the Web App Service root? (of course I can manually copy it via ftp, but that's not a solution in long term)

More Diagnostics

I've created a Hello.txt file in my project in the root. All settings the same, the Hello.txt is published. It seems that the VS 2015 Publish ignores .lic files... Is it possible? How to overcome?

Add to web.config:

<system.web>
  <compilation>
    <buildProviders>
      <remove extension=".lic"/>
      <add extension=".lic" type="System.Web.Compilation.ForceCopyBuildProvider"/>
    </buildProviders>
  </compilation>
</system.web>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM