Is there such a thing as a “content/data only project” in visual studio

前端 未结 6 1883
无人共我
无人共我 2021-02-06 23:21

I have a bunch of ancillary XML and XSLT files that I want to edit and manage in visual studio.

The files do not logically belong under any code project in my solution

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 00:22

    This answer is just a convenient consolidation of the answers above given by Chris Fewtrell and Kenny Evitt, along with the slight modification in my comments above, and a bit more detail on what the declaration of the content items should/could look like:

    
    
        
            Debug
            AnyCPU
            {541463A7-7CFA-4F62-B839-6367178B16BD}
        
        
            x64
            ..\builds\$(Configuration)\
            ..\builds\$(Configuration)\Intermediate\YourProjectName\
        
        
            
            
            
              targetSubdirInOutputDir\app.log.basic.config
            
            
              yetAnotherFile.config
            
            ... more files ...
        
        
            
        
        
            
        
        
        
    
    

    Note that this always copies all the "content" files to the output directory - the options "Copy If Newer", "Copy Always" and "Do Not Copy", as presented in the visual studio GUI ( appears as, for example, PreserveNewest in the .csproj file) are ignored.

提交回复
热议问题