WCF service warning - Client proxy generation for service 'MyProject.Web.MyService' failed: Generating metadata files...
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?
VS 2010 Ultimate
.NET Framework 4
The same basic steps work for me.
You don't mention adding a service reference to the Silverlight Project for Service1. If not, I.m not sure where the client proxy gerneration error for Service1 is comming from.
Check to make sure your're running WCF RIA 1.0 Sp2 and the SL5 SDK/Tools for Visual Studio
Also, check the location of the project. I've seen weire things when workign with a project/solution located on a share on another machine.
The steps I explained before are all there is to it.
Didn't wrote any code and didn't add any service to the project.
Anyway, 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"
Thanks for Your answer.