0
votes

I 've been working on this problem for 2 days without finding anything. Need Help, please.

I have a solution With : - A silverlight Application (SL4) - A Web project with WCF Service

My Silverlight Application reference my WCF Service with Service Reference. Nothing unusual for the time. But when I build the Silverlight Application, I obtain an error which indicates that "GenerateWCFClientFilesTask generate an unexpected error...Impossible to load file or assembly 'Microsoft.VisualStudio.ServiceModel.ClientCodeGeneration.resources, version=4.0.0.0,...--> File not found.

I've already re-install RIA Service, re-install Silverlight_Tools, I've googled it but not found anything.

Any suggestions ?

My config :

  • VS 2010
  • RIA Service V1.0
  • SL 4
  • Windows 7+IIS7

Here is my trace (sorry it's in French)

Erreur 4 Échec inattendu de la tâche "GenerateWcfClientFilesTask". System.IO.FileNotFoundException: Impossible de charger le fichier ou l'assembly 'Microsoft.VisualStudio.ServiceModel.ClientCodeGeneration.resources, Version=4.0.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35' ou une de ses dépendances. Le fichier spécifié est introuvable. Nom de fichier : 'Microsoft.VisualStudio.ServiceModel.ClientCodeGeneration.resources, Version=4.0.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35' ---> System.IO.FileNotFoundException: Le fichier spécifié est introuvable. (Exception de HRESULT : 0x80070002) à System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence) à System.Reflection.Assembly.LoadFile(String path) à Microsoft.VisualStudio.ServiceModel.ClientCodeGeneration.SlSvcUtilWrapper.get_SlSvcUtilAssembly() à Microsoft.VisualStudio.ServiceModel.ClientCodeGeneration.WcfClientFilesTaskBase.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs args) à System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName) à System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) à System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark) à System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark) à System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark) à System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark) à System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) à System.Resources.ResourceManager.GetString(String name, CultureInfo culture) à Microsoft.Tools.ServiceModel.SvcUtil.SR.GetString(String name, Object[] args) à Microsoft.VisualStudio.ServiceModel.ClientCodeGeneration.WcfClientFilesTaskBase.Execute() à Microsoft.Build.Framework.ITask.Execute() à Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() à Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

PS: Sorry for my bad english

2
A suggestion when you want to google it is using unlocalize.comSilvermind

2 Answers

1
votes

This almost always works:
Disable the Ria Services Link in the Properties Pages.
Remove the bin, obj and generatedcodefolder.
Build the entire solution. (giving you all sorts of errors)
Enable the Ria Services Link again in your Properties pages. Build again.

If that does not work:
Try on another machine.
Check your .csproj files for inconsistences.

0
votes

Thanks for your help,

Sorry to reply so late. It wasn't easy to get another machine with the same config. Disable and re enabled the Ria Services doesn't work. I have finally succeed to compile the project on another computer and it works.

The problem seems to come from my first machine. I'll try to create a new project on it.