c# - 为什么当我使用 gPRC 在 .Net Framework(非核心)中获取请求数据时出现运行时错误?
问题描述
我使用 lib Grpc.Core。我的代码:
var uri = new Uri(url);
_channel = new Grpc.Core.Channel(uri.Host, uri.Port, Grpc.Core.ChannelCredentials.Insecure);
_client = new Provider.ProviderClient(_channel);
//...
当我调用此代码时,我得到一个运行时异常:
无法加载文件或程序集 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' 或其依赖项之一。该系统找不到指定的文件。”
我的“提供者”是在 .Net 5 上编写的。但是旧项目中的这段代码,我只能使用 .Net Framework。
请帮帮我。
解决方案
推荐阅读
- python - 如何在 Python 中使用分隔符连接列表中的元素?
- javascript - 数组的动态对象键
- javascript - 导入“某物”而不是使用“某物”中的导入某物是什么意思?
- flutter - 异步代码运行延迟(Flutter/Dart)
- java - 对于此语法,如何处理 JavaCC 中所有运算符的左关联?
- javascript - 在另一个对象中访问不同对象的属性
- sql - SQL:找到最小的正时间差
- json - JsonParseException: Unexpected character ('s' (code 115)): 期待双引号开始字段名称
- python - Firebase python读/写使用计数?
- c# - 有没有办法继承静态函数调用带有参数的子类的构造函数?