WCF服务警告-服务'MyProject.Web.MyService'的客户端代理生成失败:正在生成元数据文件... [英] WCF service warning - Client proxy generation for service 'MyProject.Web.MyService' failed: Generating metadata files...

查看:60
本文介绍了WCF服务警告-服务'MyProject.Web.MyService'的客户端代理生成失败:正在生成元数据文件...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我做了一个简单的尝试,试图找出我的VS可能出了什么问题.

-创建了一个新的Silverlight应用程序项目;

-将启用WCF RIA服务"设置为true;

-要清除必须先生成"MyProject.Web.csproj"项目,然后才能生成客户端代理类."警告做出构建解决方案";

-在MyProject.Web上创建了WCF服务类型的新项目.

没有比这更简单的了!

当我重建项目时,收到此警告,我从经验中知道,以后会给我带来麻烦:

为服务"MyProject.Web.Service1"生成客户端代理"失败:正在生成元数据文件...
警告:无法加载配置名称为"MyProject.Web.Service1"的服务.要导出服务,请同时提供包含服务类型的程序集和具有此服务配置的可执行文件.
详细信息:传递的程序集都不是带有配置文件的可执行文件,或者都不是包含配置名称为"MyProject.Web.Service1"的服务的配置文件.

警告:未生成元数据文件.没有导出服务合同.
要导出服务,请使用/serviceName选项.要导出数据合同,请指定/dataContractOnly选项.有时在某些安全上下文中可能会发生这种情况,例如,通过UNC网络文件共享加载程序集时.如果是这种情况,请尝试将程序集复制到受信任的环境中并运行它."


这是今天从无处传来的,我怀疑我的VS出了点问题.

有人可以帮我吗?

使用:
VS 2010 Ultimate
.NET Framework 4
Silverlight 4

谢谢

解决方案

我请了一天假,下载并重新安装了VS Pack孔,但该警告消失了.

我找到了其他人,但是在四处搜寻之后,他们似乎属于忽略它"类型.

"WCF客户端代理自动生成失败.无法转换透明代理以键入"Microsoft.VisualStudio.ServiceModel.ClientCodeGeneration.CrossAppDomainHelper"."

名称空间"http://schemas.microsoft.com/developer/msbuild/2003"中的元素"Target"在名称空间"http://schemas.microsoft"中具有无效的子元素"GenerateWcfClientFilesTask". com/developer/msbuild/2003".可能的元素列表:任务,AL,AspNetCompiler,AssignCulture,AssignProjectConfiguration,AssignTargetPath,AxImp,CallTarget,CombinePath,ConvertToAbsolutePath,Copy,CreateCSharpManifestResourceName,CreateItem,CreateProperty,CreateVisualBasicManifestResourceName,C删除,错误,执行,FindInConfigFile,FindInList,FindUnderPath,FormatUrl,FormatVersion,GenerateApplicationManifest,GenerateBootstrapper,GenerateDeploymentManifest,GenerateResource,GenerateTrustInfo,GetAssemblyIdentity,GetFrameworkPath,GetFrameworkSdkPath,GetReferenceAssemblyPaths,LC,MakeDir,Message, RemoveDuplicates,RequiresFramework35SP1Assembly,ResolveAssemblyReference,ResolveComReference,ResolveKey源,ResolveManifestFiles,ResolveNativeReference,ResolveNonMSBuildProjectOutput,SGen,SignFile,TlbImp,Touch,UnregisterAssembly,UpdateManifest,Vbc,VCBuild,警告,WriteCodeFragment,WriteLinesToFile,XslTransformation,CodeAnalysis,CL,Link,BSCMake,CPPClean,Get ...程序文件\ MSBuild \ Microsoft \ Silverlight \ v4.0 \ Microsoft.VisualStudio.ServiceModel.targets"

他们真的被忽略了吗?


我发现我有一个重复的域服务例程,但是即使我注释掉了,警告也不会消失,直到我关闭Visual Studio并重新打开. /blockquote>

Hi
I made a simple experience on trying to find out what could be wrong with my VS.

- Created a new Silverlight Application project;

- Set Enable WCF RIA Service to true;

- To clear the "The ''MyProject.Web.csproj'' project must be built before client proxy classes can be generated." warning made "build solution";

- On MyProject.Web created a new item of type WCF Service.

Nothing could be simpler than this!

When I rebuild the project get this warning that I know from experience that is going to give me trouble later on:

"Client proxy generation for service ''MyProject.Web.Service1'' failed: Generating metadata files...
Warning: Unable to load a service with configName ''MyProject.Web.Service1''. To export a service provide both the assembly containing the service type and an executable with configuration for this service.
Details:Either none of the assemblies passed were executables with configuration files or none of the configuration files contained services with the config name ''MyProject.Web.Service1''.

Warning: No metadata files were generated. No service contracts were exported.
To export a service, use the /serviceName option. To export data contracts, specify the /dataContractOnly option. This can sometimes occur in certain security contexts, such as when the assembly is loaded over a UNC network file share. If this is the case, try copying the assembly into a trusted environment and running it."


This came out from nowhere today and I suspect that there is something wrong with my VS.

Can anyone help me on this?

Using:
VS 2010 Ultimate
.NET Framework 4
Silverlight 4

Thanks

解决方案

I took a day off, downloaded and reinstaled the hole VS pack and that warning disapeared.

I got others thou, but after googling around they seem to be of the "ignore it" type.

"WCF client proxy auto generation failed. Unable to cast transparent proxy to type ''Microsoft.VisualStudio.ServiceModel.ClientCodeGeneration.CrossAppDomainHelper''."

"The element ''Target'' in namespace ''http://schemas.microsoft.com/developer/msbuild/2003'' has invalid child element ''GenerateWcfClientFilesTask'' in namespace ''http://schemas.microsoft.com/developer/msbuild/2003''. List of possible elements expected: ''Task, AL, AspNetCompiler, AssignCulture, AssignProjectConfiguration, AssignTargetPath, AxImp, CallTarget, CombinePath, ConvertToAbsolutePath, Copy, CreateCSharpManifestResourceName, CreateItem, CreateProperty, CreateVisualBasicManifestResourceName, Csc, Delete, Error, Exec, FindAppConfigFile, FindInList, FindUnderPath, FormatUrl, FormatVersion, GenerateApplicationManifest, GenerateBootstrapper, GenerateDeploymentManifest, GenerateResource, GenerateTrustInfo, GetAssemblyIdentity, GetFrameworkPath, GetFrameworkSdkPath, GetReferenceAssemblyPaths, LC, MakeDir, Message, Move, MSBuild, ReadLinesFromFile, RegisterAssembly, RemoveDir, RemoveDuplicates, RequiresFramework35SP1Assembly, ResolveAssemblyReference, ResolveComReference, ResolveKeySource, ResolveManifestFiles, ResolveNativeReference, ResolveNonMSBuildProjectOutput, SGen, SignFile, TlbImp, Touch, UnregisterAssembly, UpdateManifest, Vbc, VCBuild, Warning, WriteCodeFragment, WriteLinesToFile, XslTransformation, CodeAnalysis, CL, Link, BSCMake, CPPClean, Get.... C:\Program Files\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.VisualStudio.ServiceModel.targets"

Are they really to be ignored?


I found I had a duplicate domain service routine, but even though I commented it out the warning would not go away until I closed Visual Studio and reopened.


这篇关于WCF服务警告-服务'MyProject.Web.MyService'的客户端代理生成失败:正在生成元数据文件...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆