specify build action of content - Nuget

后端 未结 1 446
长发绾君心
长发绾君心 2021-02-07 07:05

What is the simplest way to tell Nuget package to add all css files as an embedded resource (ie build action is embedded resource).

I am trying to do it through install.

1条回答
  •  梦毁少年i
    2021-02-07 07:38

    You can use DTE instead of messing with xml to change the BuildAction. From http://nuget.codeplex.com/discussions/227696:

    $item = $project.ProjectItems | where-object {$_.Name -eq "ReleaseNotes.txt"} 
    $item.Properties.Item("BuildAction").Value = [int]3
    

    This link shows the enumeration values: http://msdn.microsoft.com/en-us/library/aa983962(VS.71).aspx

    0 讨论(0)
提交回复
热议问题