c# - .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 安装的任何其他软件包从来没有真正遇到过这个问题。
有任何想法吗?
解决方案
仍然不确定问题是什么,但重新启动 PC 确实欺骗了¯_(ツ)_/¯
推荐阅读
- javascript - 反应绑定到类外部的常量
- php - 我的带有用户名、密码和 PIN 码的登录脚本,不使用 pin 登录(不知何故)
- javascript - 可能吗?如何从不同目录中的不同 node.js 文件访问 node.js 文件?
- ios - 如果通过复制粘贴输入文本,UITextView 计算高度错误
- java - 符号的正则表达式或什么都没有
- javascript - MEAN Stack:无法读取未定义的属性“companyTitle”
- mysql - MySQL IF 语句真的不像 Sql Server
- dart - 如何以编程方式在 Flutter 中选择 BottomNavigationBar Tab 而不是内置 onTap 回调?
- optimization - 用于 unicode 代码点的高效查找表
- java - 具有动态模态的 JFrame