【问题标题】:SCSS files not grouped in Solution Explorer in Visual StudioSCSS 文件未在 Visual Studio 的解决方案资源管理器中分组
【发布时间】:2015-12-03 17:44:04
【问题描述】:
我正在使用 Visual Studio 2013。
在解决方案资源管理器中,scss 文件通常将它们的 .css、.css.map、.min.css 文件分组在 .scss 文件下的树中。但是,我的解决方案资源管理器将它们全部单独显示,这导致了一些混乱。
谁能帮助我,让我知道将这些文件重新组合在一起的快捷方式/技巧?
【问题讨论】:
标签:
css
visual-studio
visual-studio-2013
web-essentials
【解决方案1】:
手动编辑项目文件或使用这个漂亮的 Visual Studio 扩展:
手动技巧是编辑项目文件并将DependentUpon 元数据添加到要显示嵌套的每个文件中:
<ItemGroup>
<!-- This will cause Visual Studio to show the file under Foo.1.cs -->
<Compile Include="Foo.1.1.cs">
<DependentUpon>Foo.1.cs</DependentUpon>
</Compile>
<!-- This will cause Visual Studio to show the file under Foo.cs -->
<Compile Include="Foo.1.cs">
<DependentUpon>Foo.cs</DependentUpon>
</Compile>
<Compile Include="Foo.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
来源: