Questions tagged «service-fabric-stateless»

14
找不到System.Net.Http 4.2.0.0的奇怪问题
我有一个奇怪的问题,这使我发疯… 我有一个简单的类库项目(完整的.NET Framework,4.6.1),其中包含用于Cosmos DB功能的包装类。因此,我已经向该项目添加了“ Microsoft.Azure.DocumentDB” NuGet软件包1.19.1。除此之外,我还引用了“ Newtonsoft.Json” NuGet软件包10.0.3,以及一些“ Microsoft.Diagnostics.EventFlow。*” NuGet软件包。 到目前为止,所有内容均可正确编译。 但是,一旦我击中包装器类(从简单的Service Fabric无状态服务(完整的.NET Framework 4.6.1)中使用),并尝试执行以下代码行: _docClient = new DocumentClient(new Uri(cosmosDbEndpointUrl), cosmosDbAuthKey); 我在运行时收到这个奇怪的错误: 发生System.IO.FileNotFoundException HResult = 0x80070002 消息=无法加载文件或程序集'System.Net.Http,版本= 4.2.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a'或其依赖项之一。该系统找不到指定的文件。 Source = StackTrace:在Microsoft.Azure.Documents.Client.DocumentClient.Initialize(Uri 1 desiredConsistencyLevel) at Microsoft.Azure.Documents.Client.DocumentClient..ctor(Uri serviceEndpoint, String authKeyOrResourceToken, ConnectionPolicy connectionPolicy, NullableserviceEndpoint ,ConnectionPolicy connectionPolicy,可为1的requiredConsistencyLevel) 内部异常1:FileNotFoundException:无法加载文件或程序集'System.Net.Http,Version = 4.0.0.0,Culture = neutral,PublicKeyToken …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.