Copy to Output Directory copies folder structure but only want to copy files

后端 未结 8 1842
谎友^
谎友^ 2020-11-27 12:05

I have a VS2008 I want to copy certain files from a directory into my /bin/ folder. I have set the files (located in /common/browserhawk/) to \"Co

8条回答
  •  有刺的猬
    2020-11-27 12:28

    Since I cannot comment on previous answers, I will put the solution here:

    Adding to what @PaulAlexander provided, add the following to your .csproj/.vbproj file:

    
        
          false
          
    
    
          
    
    

    This allows you to select "RootContent" as the Build Action in the Properties window, and all can be accessed via the GUI. A more complete explanation: the "AvailableItemName" option basically creates a new named-list that you can assign items in the project to under the "Build Action" property in the Properties window. You can then use this newly created list in any Target you like (eg via "@(RootContent)").

提交回复
热议问题