Visual Studio 2015未显示项目文件夹内容

Geo*_*ker 4 c# atlassian-sourcetree windows-10 visual-studio-2015

修复了从安装文件修复VS2015.


我已经在Visual Studio 2015中添加了一个VS 2013项目.它按预期编译并运行,但在Solution Explore中我无法看到文件夹的内容.

我已经尝试删除文件夹并再次添加它们,但它没有用.

有任何想法吗?我也使用SourceTree进行项目,但我不认为这是相关的.

[![在此输入图片说明] [1]] [1]

[1]:http://i.stack.imgur.com/Bhm3B.png

编辑1:请注意,这个问题发生在项目中的所有文件夹中(Resourfes,Themes,Sources)

1.)文件存在并在Windows资源管理器中可见

2.)再次删除和添加文件夹,或新创建的文件夹中的单个文件不会改变这种情况.

3.)csproj具有未在文件夹中显示的文件:

     <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>
Run Code Online (Sandbox Code Playgroud)

小智 9

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


pet*_*bil 7

这些文件可能未在解决方案中列出.尝试右键单击VS中的文件夹,选择"在文件资源管理器中打开",然后将内容拖到VS中的文件夹中.这应该将它们添加到.sln文件中.