c# - Visual Studio 2015 不显示项目文件夹内容

标签 c# visual-studio-2015 windows-10 atlassian-sourcetree

通过从安装文件修复 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>

最佳答案

将文件添加到正确的文件夹后。单击“显示所有文件”选项,将文件包含在项目中。就是这样

关于c# - Visual Studio 2015 不显示项目文件夹内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31940135/

相关文章:

c# - Windows 服务停止

c# - Unity - 使用自定义检查器时是否可以访问 OnValidate()?

clr - asp.net mvc 6如何知道 Controller 不继承自Controller类时要添加哪些资源?

c - 在使用 Visual Studio 2015 进行常规编译之前使用预编译器

python - 以点开头的 Windows 文件引发 PermissionError?

c# - 数据访问层和 DDD

c# - 简单的 WCF 服务,不是从客户端到服务的所有参数

c++ - Qt5.9.1 和 Visual Studio 2015 添加 Qt WebEngine 模块

mysql - 从 mysql 执行时找不到 Linux Bash 自定义函数

java - IntelliJ IDEA Edu-使用Gradle编译Java会在Win 10上变慢