在Visual Studio 3個文件通常組合在一起:Visual Studio的文件分組
- filename.aspx
- filename.aspx.cs
- filename.aspx.designer.cs
有沒有辦法添加另一個分組的文件,以便它可以摺疊並且不在視圖中?
- filename.aspx
- filename.aspx.cs
- filename.aspx.designer.cs
- customfile.cs
感謝
在Visual Studio 3個文件通常組合在一起:Visual Studio的文件分組
有沒有辦法添加另一個分組的文件,以便它可以摺疊並且不在視圖中?
感謝
如果打開的.csproj文件,你會看到它是如何完成的。嘗試按照該模式添加新文件。
例如:
<Compile Include="Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
下面是XML(對應於示例)
<Compile Include="customfile.cs">
<DependentUpon>filename.aspx</DependentUpon>
</Compile>
就像一個魅力。
我創建了一個Visual Studio添加它(和更多)。 它與VS 2008和2010年,您可以點擊此處查看:http://mokosh.co.uk/vscommands
神奇 - 愛它! – Daniel 2010-02-01 22:33:29
@John:感謝您的編輯。 – 2010-02-01 22:53:27