首页 > 解决方案 > .NET Core Google.Cloud.Firestore 包已安装但命名空间缺失

问题描述

我有一个简单的 asp.net core 2.2 项目并运行以下命令来安装 Google.Cloud.Firestore 包:

dotnet add package Google.Cloud.Firestore --version 1.0.0-beta19

包安装正确,我什至通过查看 nuget 全局包存储(users/user/.nuget/packages)中的 dll 文件来验证这一点。

安装的输出甚至有这个日志:

info : Package 'Google.Cloud.Firestore' is compatible with all the specified frameworks in project

以下是我的 .csprodj 文件:

<ItemGroup>
  <PackageReference Include="Google.Cloud.Firestore" Version="1.0.0-beta19" />
  <PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
  <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" /> 
</ItemGroup>

然而,我在尝试引用命名空间时得到以下信息:

The type or namespace name 'Google' could not be found (are you missing a using directive or an assembly reference?)

使用 dotnet CLI 安装的任何其他软件包从来没有真正遇到过这个问题。

有任何想法吗?

标签: c#.net-coregoogle-cloud-firestore

解决方案


仍然不确定问题是什么,但重新启动 PC 确实欺骗了¯_(ツ)_/¯


推荐阅读