Hide files in .csproj without excluding them from build

后端 未结 1 1186
小鲜肉
小鲜肉 2021-01-13 00:54

Is it possible to hide files/folders in .net core csproj without excluding them from build? I have a folder containing generated files which I would rather see they are not

1条回答
  •  再見小時候
    2021-01-13 01:21

    You can set the Visible="false" attribute on the items.

    For an SDK-based project (.net core / asp.net core templates), you could add e.g.:

    
      
    
    

    Depending on your project type (=> defaults), you might have to replace Content with None for the particular type, or even Compile for generated code files.

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