Error generating proxy classes for WCF RIA /V Silverlight

Posts   
 
    
nbrake
User
Posts: 30
Joined: 18-May-2008
# Posted on: 08-Jan-2013 16:07:11   

Hallo!

First, the configuration data: - LLBLGen Pro v3.5 Final (December 11th, 2012) on .NET 4.0 or 4.5, Any CPU - Template Group is SD.Presets.Adapter.General2010 (no modifications) - Windows Server 2008 R2 SP1 - Visual Studio 2010 .NET 4.0 - WCF RIA Services Toolkit (September 2011) - WCF RIA Services V1.0 SP1 - C# - All Library References are set to CopyLocal = true. Project to which the code is generated has references to the following libs: SD.LLBLGen.Pro.DQE.SqlServer.NET20 (GAC) SD.LLBLGen.Pro.LinqSupportClasses.NET35 (Installation Folder) SD.LLBLGen.Pro.ORMSupportClasses.NET20 (GAC) SD.LLBLGen.Pro.QuerySpec (Installation Folder) SD.LLBLGen.Pro.RiaSupportClasses (Installation Folder)

I habe been using LLBLGen with this project starting with 3.1, and now finally had the time to upgrade to 3.5. The model was migrated by the designer. C# code was frozen for the purpose of this migration.

The build of the project fails with the following error message

Exception has been thrown by the target of an invocation. C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Ria.Client.targets 303

Looking into the build file, I found the task

CreateRiaClientFilesTask

I turned the diagnostic output-mode in VS on and here is the part where the error message is made:

C:\Dev\trunk\GeoMan\src\SlRia\Wk.Server\Wk.Data\Output\StringOutput.shared.cs C:\Dev\trunk\GeoMan\src\SlRia\Wk.Server\Wk.Data\SearchAttribute.shared.cs C:\Dev\trunk\GeoMan\src\SlRia\CommonAssemblyInfo.cs (TaskId:356) C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Ria.Client.targets(303,5): error : Exception has been thrown by the target of an invocation. Assembly 'Telerik.Windows.Controls, Version=2012.1.430.1050, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' could not be loaded and will be ignored. Could not load file or assembly 'Telerik.Windows.Controls, Version=2012.1.430.1050, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified. (TaskId:356) Assembly 'Microsoft.Practices.Unity.Silverlight, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded and will be ignored.

So no error message is being output that can be used to track down the cause of the error.

I have been trying to narrow down the cause by removing files from the web project to no avail. I recreated the Silverlight project and it still fails.

Reverting the changes to LLBLGen Pro 3.1 causes the error to disappear and build runs without errors. LLBLGen 3.5 has many features that would enhance our product like OData, SQL Server 2012 support, Entity Instances Projections (this alone makes the upgrade worth it!), Rule based .NET Attribute definitions (we have VERY wide tables).

Thank you very much for your assistance on this!

Best regards

Nasser

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 08-Jan-2013 18:44:18   

If you could create a small repro case that would be great as our test stuff work OK, so it must be something specific with your application, how you have set it up. No need for telerik's controls (we don't have those), just a basic ria svc setup and tiny silverlight class which accesses the service. Thanks.

Frans Bouma | Lead developer LLBLGen Pro
nbrake
User
Posts: 30
Joined: 18-May-2008
# Posted on: 09-Jan-2013 11:05:28   

Hallo!

I have prepared a project that contains - ASP.NET Project with the LLBLGen generated classes and WCF RIA domain-context - simple Silverlight project that connects to the domain context

The zip is still 18 MB, how can I send you the archive?

Thank you for your assistance!

Nasser

nbrake
User
Posts: 30
Joined: 18-May-2008
# Posted on: 09-Jan-2013 15:23:18   

Hallo!

It turns out that I didn't modify a member in web.config after migrating to 3.5:

<section name="dependencyInjectionInformation" type="SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionSectionHandler, SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27"/>

I found out about the error thorugh deactivating all Silverlight projects and attempting to call the service through http. The error I received was

Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: An error occurred creating the configuration section handler for dependencyInjectionInformation: Could not load file or assembly 'SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 10: </sectionGroup> Line 11: <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler" /> Line 12: <section name="dependencyInjectionInformation" type="SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionSectionHandler, SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27"/> Line 13: </configSections> Line 14: <appSettings>

Source File: C:\Dev\trunk\GeoMan\src\SlRia\Wk.Server\Wk.Web\web.config Line: 12

Assembly Load Trace: The following information can be helpful to determine why the assembly 'SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' could not be loaded.

The hint to try and invoke the service from http came from Colin Blair (http://social.msdn.microsoft.com/Forums/en-US/silverlightwcf/thread/c7c0f3dc-2378-4245-8365-262411155ca8)

Thank you for your assistance!

Best regards

Nasser