Visual Studio 2015 不显示项目文件夹内容
Visual Studio 2015 not showing project folder content
已通过从安装文件修复 VS2015 解决。
I've added a VS 2013 project to Visual Studio 2015. It compiles and
runs as expected, but in Solution Explore i can't see the content of
the folders.
I've tried deleting the folders and adding them again, but it didn't
work.
Any ideas? I also use SourceTree for the project, but i don't think
it's relevant.
[![enter image description here][1]][1]
[1]: http://i.stack.imgur.com/Bhm3B.png
Edit 1: Please note that this issues happens to all the folders in the
project (Resourfes, Themes, Sources)
1.) The files exist and are visible in Windows Explorer
2.) Deleting and adding the folder again, or the individual files in a newly created folder does not change the situation.
3.) csproj has the files that are not show in the folders :
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Sources\LoginViewModel.cs" />
<Compile Include="Sources\RelayCommand.cs" />
<Compile Include="Sources\ViewModel.cs" />
<Compile Include="Login.xaml.cs">
<DependentUpon>Login.xaml</DependentUpon>
</Compile>
<Compile Include="WrongPassword.xaml.cs">
<DependentUpon>WrongPassword.xaml</DependentUpon>
</Compile>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Resources\Icons.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Dark\MetroDark.MSControls.Core.Implicit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Dark\MetroDark.MSControls.Toolkit.Implicit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Dark\Styles.Shared.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Dark\Styles.WPF.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Dark\Theme.Colors.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Light\Metro.MSControls.Core.Implicit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Light\Metro.MSControls.Toolkit.Implicit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Light\Styles.Shared.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Light\Styles.WPF.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Metro\Light\Theme.Colors.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Login.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WrongPassword.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
这些文件可能未在解决方案中列出。尝试在 VS 中右键单击该文件夹,选择 'Open in File Explorer',然后将内容拖到 VS 中的文件夹中。这应该将它们添加到 .sln 文件中。
如果它被转换,那么文件应该在那里。也许解决方案文件刷新并跳过了这个文件夹的引用。
尝试以下步骤:
右击解决方案并卸载,然后编辑解决方案(右击并编辑解决方案),检查定义的文件路径是否正确。
导航到项目目录并检查文件是否存在。如果文件在那里,那么:刷新解决方案并单击以显示隐藏文件,如果您看到这些文件,则将其添加到解决方案中。
如果文件不在目录中,请将现有文件添加到解决方案中。
已通过从安装文件修复 VS2015 解决。
使用 VS 2015 Community Edition 时遇到了这个问题,并确定问题是由其中一个扩展引起的(Mexedge Stylesheet extension 在我的例子中)。禁用此扩展并重新启动后,问题解决。
我遇到了同样的问题。修复安装没有帮助。卸载和新安装完成了工作。
将文件添加到正确的文件夹后。单击“显示所有文件”选项,将文件包含在项目中。就是这样
遇到过这个问题,但仅限于一个特定的项目,在该项目中我看不到文件夹中的文件。如果我打开另一个项目,我可以看到它的文件在文件夹中,所以我知道我没有 Visual Studio 范围的问题。所以我只是重建了我的项目。步骤:
- 关闭 Visual Studio。
- 将我的项目移动到另一个文件夹(这样我就可以用它的旧名称重新创建我的项目)
- 推出VS。像我上一个一样创建了另一个项目,包括所有页面和文件夹。
- 将旧资源管理器文件夹中的旧页面复制到新项目的资源管理器文件夹中的页面之上(Visual Studio 识别更改并询问您是否要重新加载内容 - 比如 "Yes to All").
- 将 类 从旧资源管理器文件夹复制到新文件夹。
- 在 VS 中,在解决方案资源管理器中,右键单击您在此处创建的文件夹,该文件夹代表您在第 5 步 类 中复制到的资源管理器,select "Add Existing Item..." 并突出显示所有 类(Ctrl+A,或按住 Ctrl 并在文件上单击鼠标)并单击添加。
您应该回到解决方案资源管理器能够再次显示您的文件的位置。
在 VS 2015 中我们有新功能隐藏 Folder/Unhide 文件夹。有时人们会无意中按下它。您可以取回它,右键单击解决方案并单击列表中的取消隐藏选项,如下图所示。
已通过从安装文件修复 VS2015 解决。
I've added a VS 2013 project to Visual Studio 2015. It compiles and runs as expected, but in Solution Explore i can't see the content of the folders.
I've tried deleting the folders and adding them again, but it didn't work.
Any ideas? I also use SourceTree for the project, but i don't think it's relevant.
[![enter image description here][1]][1]
[1]: http://i.stack.imgur.com/Bhm3B.png
Edit 1: Please note that this issues happens to all the folders in the project (Resourfes, Themes, Sources)
1.) The files exist and are visible in Windows Explorer
2.) Deleting and adding the folder again, or the individual files in a newly created folder does not change the situation.
3.) csproj has the files that are not show in the folders :
<ItemGroup> <ApplicationDefinition Include="App.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </ApplicationDefinition> <Compile Include="Sources\LoginViewModel.cs" /> <Compile Include="Sources\RelayCommand.cs" /> <Compile Include="Sources\ViewModel.cs" /> <Compile Include="Login.xaml.cs"> <DependentUpon>Login.xaml</DependentUpon> </Compile> <Compile Include="WrongPassword.xaml.cs"> <DependentUpon>WrongPassword.xaml</DependentUpon> </Compile> <Page Include="MainWindow.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Compile Include="App.xaml.cs"> <DependentUpon>App.xaml</DependentUpon> <SubType>Code</SubType> </Compile> <Compile Include="MainWindow.xaml.cs"> <DependentUpon>MainWindow.xaml</DependentUpon> <SubType>Code</SubType> </Compile> <Page Include="Resources\Icons.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Dark\MetroDark.MSControls.Core.Implicit.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Dark\MetroDark.MSControls.Toolkit.Implicit.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Dark\Styles.Shared.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Dark\Styles.WPF.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Dark\Theme.Colors.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Light\Metro.MSControls.Core.Implicit.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Light\Metro.MSControls.Toolkit.Implicit.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Light\Styles.Shared.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Light\Styles.WPF.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Themes\Metro\Light\Theme.Colors.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> <Page Include="Login.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="WrongPassword.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup>
这些文件可能未在解决方案中列出。尝试在 VS 中右键单击该文件夹,选择 'Open in File Explorer',然后将内容拖到 VS 中的文件夹中。这应该将它们添加到 .sln 文件中。
如果它被转换,那么文件应该在那里。也许解决方案文件刷新并跳过了这个文件夹的引用。
尝试以下步骤:
右击解决方案并卸载,然后编辑解决方案(右击并编辑解决方案),检查定义的文件路径是否正确。
导航到项目目录并检查文件是否存在。如果文件在那里,那么:刷新解决方案并单击以显示隐藏文件,如果您看到这些文件,则将其添加到解决方案中。
如果文件不在目录中,请将现有文件添加到解决方案中。
已通过从安装文件修复 VS2015 解决。
使用 VS 2015 Community Edition 时遇到了这个问题,并确定问题是由其中一个扩展引起的(Mexedge Stylesheet extension 在我的例子中)。禁用此扩展并重新启动后,问题解决。
我遇到了同样的问题。修复安装没有帮助。卸载和新安装完成了工作。
将文件添加到正确的文件夹后。单击“显示所有文件”选项,将文件包含在项目中。就是这样
遇到过这个问题,但仅限于一个特定的项目,在该项目中我看不到文件夹中的文件。如果我打开另一个项目,我可以看到它的文件在文件夹中,所以我知道我没有 Visual Studio 范围的问题。所以我只是重建了我的项目。步骤:
- 关闭 Visual Studio。
- 将我的项目移动到另一个文件夹(这样我就可以用它的旧名称重新创建我的项目)
- 推出VS。像我上一个一样创建了另一个项目,包括所有页面和文件夹。
- 将旧资源管理器文件夹中的旧页面复制到新项目的资源管理器文件夹中的页面之上(Visual Studio 识别更改并询问您是否要重新加载内容 - 比如 "Yes to All").
- 将 类 从旧资源管理器文件夹复制到新文件夹。
- 在 VS 中,在解决方案资源管理器中,右键单击您在此处创建的文件夹,该文件夹代表您在第 5 步 类 中复制到的资源管理器,select "Add Existing Item..." 并突出显示所有 类(Ctrl+A,或按住 Ctrl 并在文件上单击鼠标)并单击添加。
您应该回到解决方案资源管理器能够再次显示您的文件的位置。
在 VS 2015 中我们有新功能隐藏 Folder/Unhide 文件夹。有时人们会无意中按下它。您可以取回它,右键单击解决方案并单击列表中的取消隐藏选项,如下图所示。