Cake.ProjEmbedResources

Deprecated!! In favour of Cake.ProjHelpers


Keywords
License
MIT
Install
Install-Package Cake.ProjEmbedResources -Version 0.0.1-pre-10

Documentation

Embeds files into a .vbproj or .csproj file as embedded resource.

Default options In this example, the default options are used to add all files using Directory.GetFiles as embedded resource. The directory structure used is described below.

    +-- MyProject.csproj
    +-- to_embed
        ¦   +-- rootpage.html
        +-- resources
        ¦   +-- page1.html

AddFilesToProject(Directory.GetFiles(@"./to_embed/",".", SearchOption.AllDirectories), @"./MyProject.csproj");

Resulting items

  <ItemGroup>
    <EmbeddedResource Include="to_embed\rootpage.html"/>
    <EmbeddedResource Include="to_embed\resources\page1.html"/>
  </ItemGroup>

NOTE When the files are already found in the project as EmbeddedResources a new entry wont be added.