May11

Including a file in a Web Deployment Project  

Categories: Visual Studio

Argh Argh.  I’m precompiling a website (msbuild) and then building an installer for deploying it.  For the build, I’m use WDP.  However; for whatever silly reason Visual Studio ignores file types of .lic   So I have a license file that won’t get built, and to be honest I don’t want to manually add it to my installer.  It’s a part of my project, so it should automatically be included in my build.

It was sooo much easier in 1.1, when you could directly edit the build type of a file… I wish this feature was in 2.0 as well.

Anyways, you can edit your web.config’s compilation settings to include your license files, and it will always copy them when publishing or precompiling your site.

<system.web>

  <buildProviders>

    <remove extension=".lic"/>

    <add extension=".lic" type="System.Web.Compilation.ForceCopyBuildProvider"/>

  </buildProviders>

</system.web>

 
Share It:          
 
 

Links to this post

Comments

Leave a comment





CAPTCHA Image Validation