[英]ambiguous reference to System.Data.Services.Client and Microsoft.Data.Services.Client
I've been trying to port a web reference to OData Exigo API from a website to web application. 我一直在尝试将对OData Exigo API的Web引用从网站移植到Web应用程序。 Getting this error whenever I try to run the web application which uses this reference.
每当我尝试运行使用此引用的Web应用程序时,都会出现此错误。 I do not have a reference to the system.data.services.client anywhere in the project.
我在项目中的任何地方都没有对system.data.services.client的引用。 Tried to uninstall from GAC but got an error because it is part of the .NET framework.
试图从GAC卸载,但由于它是.NET框架的一部分而出现错误。 What can I do?
我能做什么?
Parser Error Message: Reference.datasvcmap: The type 'System.Data.Services.Client.DataServiceCollection`1' is ambiguous: it could come from assembly 'C:\\myapp\\Microsoft.Data.Services.Client.DLL' or from assembly 'C:\\Windows\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Data.Services.Client\\v4.0_4.0.0.0__b77a5c561934e089\\System.Data.Services.Client.dll'. 解析器错误消息:Reference.datasvcmap:类型'System.Data.Services.Client.DataServiceCollection`1'不明确:它可能来自程序集'C:\\ myapp \\ Microsoft.Data.Services.Client.DLL'或程序集'C:\\ Windows \\ Microsoft.Net \\ assembly \\ GAC_MSIL \\ System.Data.Services.Client \\ v4.0_4.0.0.0__b77a5c561934e089 \\ System.Data.Services.Client.dll'。 Please specify the assembly explicitly in the type name.
请在类型名称中明确指定程序集。
Thanks 谢谢
这只能通过using Client = System.Data.Services.Client using Client = Microsoft.Data.Services.Client
,其中需要Client引用。
删除对System.Data.Services.Client的引用(如果存在)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.