Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net VS:更新服务参考为“创建需求”;“全球”;Reference.vb中的前缀_Vb.net_Web Services_Entity Framework_Wcf - Fatal编程技术网

Vb.net VS:更新服务参考为“创建需求”;“全球”;Reference.vb中的前缀

Vb.net VS:更新服务参考为“创建需求”;“全球”;Reference.vb中的前缀,vb.net,web-services,entity-framework,wcf,Vb.net,Web Services,Entity Framework,Wcf,VB 2012 WCF和EF 6.1* 我有一个客户端和一个web服务。当我重新编译/更改WS时,我返回到我的客户机,并“更新服务引用”。工作起来很有魅力,但客户端中生成的Reference.vb抱怨说,从服务器定义的任何类都具有全局属性。前缀准确地说,错误描述是: Error 9 Type 'serverNamespace.CountryName' is not defined. C:\...\UpdateServiceReference\Reference.vb …其中Update

VB 2012 WCF和EF 6.1*

我有一个客户端和一个web服务。当我重新编译/更改WS时,我返回到我的客户机,并“更新服务引用”。工作起来很有魅力,但客户端中生成的Reference.vb抱怨说,从服务器定义的任何类都具有全局属性。前缀准确地说,错误描述是:

Error   9   Type 'serverNamespace.CountryName' is not defined.
C:\...\UpdateServiceReference\Reference.vb
…其中UpdateServiceReference是客户端代理

Public Interface IUpdateService
[...]
    <System.ServiceModel.OperationContractAttribute(Action:="http://...", ReplyAction:="http://.../IUpdateService/GetClientCountriesResponse")>  _
    Function GetClientCountries(ByVal placeHolder As Boolean) As serverNamespace.CountryName()
[...]
End Interface
但这里是真正奇怪(嗯,令人困惑)的部分。要清除错误列表中生成的错误,请执行以下操作:

未定义类型“serverNamespace.CountryName”。将“serverNamespace.CountryName”更改为 “Global.serverNamespace.CountryName”。

我需要按照上面编译器的建议进行操作,并使用以下内容更改(在Reference.vb中):

Function GetClientCountries(ByVal placeHolder As Boolean) As serverNamespace.CountryName()
…到

Function GetClientCountries(ByVal placeHolder As Boolean) As Global.serverNamespace.CountryName()
---在类主体和接口的每个位置。。。一切正常

如何装饰我的Web服务,使其正常工作

我已经尝试在WS代码中使用各种“导入”,但没有任何效果。。。只是愚蠢地在现有WS代码中添加一个全局前缀是不会编译的

Function GetClientCountries(ByVal placeHolder As Boolean) As Global.serverNamespace.CountryName()