VS Code Intellisense对nuget包不起作用

问题描述 投票:0回答:1

建立 :

  • dotnet核心2.2
  • Visual Studio代码内幕1.33.0

VS代码扩展:

  • C#1.17.1
  • NuGet包管理器1.1.6

对于学校项目,我必须使用ADO.NET来访问数据库。所以我添加了带有nuget扩展的nuget包System.Data.SqlClient。这是我的csproj文件的结果。

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App"/>
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All"/>
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.2"/>
    <PackageReference Include="System.Data.SqlClient" Version="4.7.0-preview3.19128.7"/>
    <PackageReference Include="System.Data.Common" Version="4.3.0"/>
    <PackageReference Include="Useful.Utilities" Version="1.0.5"/>
  </ItemGroup>
</Project>

问题是没有Intellisense。

When I want to do a using

SqlCommand

但它正在使用Visual Studio Community Version 16.0.0 RC2

Add a using with Intellisense working

SqlCommand

问题不仅发生在System.Data.SqlClient上,而且还添加了我添加的所有nuget包。

我应该怎么做才能在Visual Studio Code上运行Intellisense?

c# visual-studio asp.net-core visual-studio-code nuget
1个回答
0
投票

您可以重置设置和扩展,如果这没有帮助,请执行干净的VS安装

© www.soinside.com 2019 - 2024. All rights reserved.