Monday, July 25, 2011

Silverlight Assembly related problems keep on recurring

I am again getting the assembly related errors. Specifically it seems that it cannot generate the client side code for the Silverlight application. The error I am getting is:

CreateRiaClientFilesTask task failed unexpectedly. The reason is that it could not load some file from the assembly. Or at least that is what I think it is, because I get a FileNotFoundException somewhere in the call stack. I am not quite sure what an assembly is. Is it a file, or a dll, or a bunch of files? A bit of reading also seems to suggest that the real problem could be something else, which is not being reported correctly.

Anyways, I think the first thing I should do is turn on FusionLogging (here's how), which logs assembly related errors.

I opened the VisualStudio SDK CMD prompt, and types fslogvw.exe, which opened up the 'Assembly Binding log viewer'. However, the log viewer does not show me any error messages, whereas VS2010 does have the same errors. Someone on StackOverflow mentioned that it might help if we setup a custom path for logging. Great... I s now have a custom path for logging. Setting a custom log location got it to work. Gosh this is really crazy. I had no idea Microsoft products were so buggy.

Now, very interestingly, once I had the logging working, and I rebuild the application (for the nth time today), it just started working. I seriously do not know what to make out of all this. I am trying hard not to curse :-)

I guess I will leave this issue as it is for now, and revisit it when it crops up again.

No comments:

Post a Comment