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

前端 未结 6 1892
无人共我
无人共我 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:09

    Andy posted a link with a solution that's mostly worked for me; basically delete the following line from the project file:

    
    

    and add the following lines:

    
      
    
    
      
    
    
    
    

    I also found that disabling the project Debug property "Enable the Visual Studio hosting process" (for each configuration) prevented the MyProject.vshost.exe file from being generated.

    As David I. McIntosh pointed out in a comment on this answer, if your project is part of a solution with multiple projects and any other projects use the same output path as the content-only project, the above Clean target will delete all of the files in the output path, i.e. the build output of other projects, and would thus only be correct if the content-only project is the first project built (among those sharing the same build output path). The following is a safer and friendlier Clean target for this scenario:

    
      
    
    

提交回复
热议问题