emi_sastra
asked on
Error import assembly
Hi All,
I have error for below assembly:
Imports System.Data.Services
Imports System.Data.Services.Commo n
Imports System.Data.Services.Provi ders
What references should I add ?
What component I have to install /
Thank you.
I have error for below assembly:
Imports System.Data.Services
Imports System.Data.Services.Commo
Imports System.Data.Services.Provi
What references should I add ?
What component I have to install /
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Ryan Chong,
Thanks for your answer. There are left below error.
Severity Code Description Project File Line Suppression State
Error BC30652 Reference required to assembly 'Microsoft.Data.Services.C lient, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35' containing the type 'DataServiceProtocolVersio n'. Add one to your project.
Where to find Microsoft.Data.Services.Cl ient ? I can not see it at add reference.
Severity Code Description Project File Line Suppression State
Error Unable to find a version of 'Microsoft.Data.Services.C lient' that is compatible with 'Microsoft.Data.Services 5.0.2 constraint: Microsoft.Data.Services.Cl ient (= 5.0.2)'.
What is this error ?
Thank you.
Thanks for your answer. There are left below error.
Severity Code Description Project File Line Suppression State
Error BC30652 Reference required to assembly 'Microsoft.Data.Services.C
Where to find Microsoft.Data.Services.Cl
Severity Code Description Project File Line Suppression State
Error Unable to find a version of 'Microsoft.Data.Services.C
What is this error ?
Thank you.
ASKER
The above problem solved.
Imports System.Data.Services
Imports System.Data.Services.Commo n
Imports System.Data.Services.Provi ders
Severity Code Description Project File Line Suppression State
Error BC30560 'DataServiceProtocolVersio n' is ambiguous in the namespace 'System.Data.Services.Comm on'.
How to solve it ?
Thank you.
Imports System.Data.Services
Imports System.Data.Services.Commo
Imports System.Data.Services.Provi
Severity Code Description Project File Line Suppression State
Error BC30560 'DataServiceProtocolVersio
How to solve it ?
Thank you.
Error BC30560 'DataServiceProtocolVersiocan you post the codes how you declare it (DataServiceProtocolVersion' is ambiguous in the namespace 'System.Data.Services.Comm on'.
I think you may need to declare it explicitly (with full namespace), or else remove the references which you're not using.
ASKER
Hi Ryan,
Here is the code
config.DataServiceBehavior .MaxProtoc olVersion = DataServiceProtocolVersion .V3
Thank you.
Here is the code
config.DataServiceBehavior
Thank you.
can you tell us how you declare the object config ? we need to know what class is this object come from...
ASKER
Here is the complete code of this class.
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Data.Services
Imports System.Data.Services.Commo n
Imports System.Data.Services.Provi ders
Imports System.Linq
Imports System.ServiceModel.Web
Imports System.Web
#If DEBUG Then
<System.ServiceModel.Servi ceBehavior (IncludeEx ceptionDet ailInFault s:=True)> _
<dsPelatihanDD.JSONPSuppor tBehavior> _
Public Class DataService
#Else
<dsPelatihanDD.JSONPSuppor tBehavior> _
Public Class DataService
#End If
Inherits DataService(Of ERP_VIHARAEntities)
Implements IServiceProvider
' This method is called only once to initialize service-wide policies.
Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration)
' TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
' Examples:
' config.SetEntitySetAccessR ule("MyEnt ityset", EntitySetRights.AllRead)
' config.SetServiceOperation AccessRule ("MyServic eOperation ", ServiceOperationRights.All )
config.SetEntitySetAccessR ule("*", EntitySetRights.All)
'config.DataServiceBehavio r.MaxProto colVersion = DataServiceProtocolVersion .V3
config.DataServiceBehavior .MaxProtoc olVersion = Microsoft.Data.OData.OData Version.V3
#If DEBUG Then
config.UseVerboseErrors = True
#End If
End Sub
Public Function GetService(ByVal serviceType As Type) As Object Implements IServiceProvider.GetServic e
If serviceType Is GetType(IDataServiceStream Provider) Then
' Return the stream provider to the data service.
Return New dsPelatihanDD.ImageStreamP rovider()
End If
Return Nothing
End Function
End Class
Is this your are looking for ?
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Data.Services
Imports System.Data.Services.Commo
Imports System.Data.Services.Provi
Imports System.Linq
Imports System.ServiceModel.Web
Imports System.Web
#If DEBUG Then
<System.ServiceModel.Servi
<dsPelatihanDD.JSONPSuppor
Public Class DataService
#Else
<dsPelatihanDD.JSONPSuppor
Public Class DataService
#End If
Inherits DataService(Of ERP_VIHARAEntities)
Implements IServiceProvider
' This method is called only once to initialize service-wide policies.
Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration)
' TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
' Examples:
' config.SetEntitySetAccessR
' config.SetServiceOperation
config.SetEntitySetAccessR
'config.DataServiceBehavio
config.DataServiceBehavior
#If DEBUG Then
config.UseVerboseErrors = True
#End If
End Sub
Public Function GetService(ByVal serviceType As Type) As Object Implements IServiceProvider.GetServic
If serviceType Is GetType(IDataServiceStream
' Return the stream provider to the data service.
Return New dsPelatihanDD.ImageStreamP
End If
Return Nothing
End Function
End Class
Is this your are looking for ?
not really doing similar thing, but to resolve the line of code:
it seems that we need to use Microsoft.Data.Services.Cl ient library instead.
remove ther references of System.Data.Services.Clien t and remove the code below:
DataServiceProtocolVersion Enumeration
https://msdn.microsoft.com/en-us/library/system.data.services.common.dataserviceprotocolversion(v=vs.103).aspx
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3
it seems that we need to use Microsoft.Data.Services.Cl
remove ther references of System.Data.Services.Clien
Imports System.Data.Services.Providers
DataServiceProtocolVersion
https://msdn.microsoft.com/en-us/library/system.data.services.common.dataserviceprotocolversion(v=vs.103).aspx
ASKER
If i remove Imports System.Data.Services.Provi ders
Then I get error Severity Code Description Project File Line Suppression State
Error BC30002 Type 'IDataServiceStreamProvide r' is not defined.
Public Function GetService(ByVal serviceType As Type) As Object Implements IServiceProvider.GetServic e
If serviceType Is GetType(IDataServiceStream Provider) Then
' Return the stream provider to the data service.
Return New dsPelatihanDD.ImageStreamP rovider()
End If
Return Nothing
End Function
Thank you.
Then I get error Severity Code Description Project File Line Suppression State
Error BC30002 Type 'IDataServiceStreamProvide
Public Function GetService(ByVal serviceType As Type) As Object Implements IServiceProvider.GetServic
If serviceType Is GetType(IDataServiceStream
' Return the stream provider to the data service.
Return New dsPelatihanDD.ImageStreamP
End If
Return Nothing
End Function
Thank you.
ASKER
If I change to config.DataServiceBehavior .MaxProtoc olVersion = Microsoft.Data.OData.OData Version.V3
Then I get error
Severity Code Description Project File Line Suppression State
Warning BC42016 Implicit conversion from 'ODataVersion' to 'DataServiceProtocolVersio n'.
Thank you.
Then I get error
Severity Code Description Project File Line Suppression State
Warning BC42016 Implicit conversion from 'ODataVersion' to 'DataServiceProtocolVersio
Thank you.
are you inherit this project from someone else? do you have some documentation can referring to?
I think you may need to test by adding or removing some of the libraries from References
so sorry that I can't neither access to your environment for troubleshooting nor simulate the exact error you're encountering.
I think you may need to test by adding or removing some of the libraries from References
so sorry that I can't neither access to your environment for troubleshooting nor simulate the exact error you're encountering.
ASKER
Hi Ryan,
- are you inherit this project from someone else?
This is brand new project.
-do you have some documentation can referring to?
No.
-I think you may need to test by adding or removing some of the libraries from References
Yes, I have tried it.
I remove the old one with this one and the compile error is gone.
config.DataServiceBehavior .MaxProtoc olVersion = Microsoft.Data.OData.OData Version.V3
Thank you.
- are you inherit this project from someone else?
This is brand new project.
-do you have some documentation can referring to?
No.
-I think you may need to test by adding or removing some of the libraries from References
Yes, I have tried it.
I remove the old one with this one and the compile error is gone.
config.DataServiceBehavior
Thank you.
I remove the old one with this one and the compile error is gone.
ok, so is that mean the issue was resolved now?
ASKER
- This expert suggested creating a Gigs project.
I don't get this.
- ok, so is that mean the issue was resolved now?
Yes, it is. For compile.
Thank you.
I don't get this.
- ok, so is that mean the issue was resolved now?
Yes, it is. For compile.
Thank you.
- ok, so is that mean the issue was resolved now?ok, you may proceed to close this question if there's no further issue.
Yes, it is. For compile.
ASKER
Hi Ryan,
- ok, you may proceed to close this question if there's no further issue.
I confuse how could I close this question. Which solution wiil be used to close this question?
Thank you.
- ok, you may proceed to close this question if there's no further issue.
I confuse how could I close this question. Which solution wiil be used to close this question?
Thank you.
see if any comment(s) above is useful
then you can:
How do I accept a comment as my solution?
http://support.experts-exchange.com/customer/portal/articles/608621-how-do-i-accept-a-comment-as-my-solution-
or
How do I delete a question?
http://support.experts-exchange.com/customer/portal/articles/610263
then you can:
How do I accept a comment as my solution?
http://support.experts-exchange.com/customer/portal/articles/608621-how-do-i-accept-a-comment-as-my-solution-
or
How do I delete a question?
http://support.experts-exchange.com/customer/portal/articles/610263
ASKER
Hi Ryan,
Thank you very much for your help and time.
Thank you very much for your help and time.
ASKER