- Home
- LLBLGen Pro
- LLBLGen Pro Runtime Framework
LLBLGen Pro 4 + WCF DS Server 5.5.0 + Odata 3
Joined: 06-Sep-2011
Hello,
I've created a sample WCF Data Services project to experiment with LLBLGen for a commercial product we will be developing. I created an MVC4 solution, and made the WCF Data Service, per your online instructions. I installed "WCF Data Services Server 5.5.0-alpha1" via nuget using "Install-Package Microsoft.Data.Services -Pre". Everything compiles fine, but I get the following error when I try to query the service. Is it a conflict with the LLBLGenPro 4's assemblies?
Thanks,
Mike
Server Error in '/' Application. Could not load file or assembly 'Microsoft.Data.Services, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Data.Services, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Data.Services, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
=== Pre-bind state information ===
LOG: User = DEVPC\Dev
LOG: DisplayName = Microsoft.Data.Services, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file //c
projects/ExpirationTraxDS/ExpirationTraxDS/
LOG: Initial PrivatePath = c:\projects\ExpirationTraxDS\ExpirationTraxDS\bin
Calling assembly : SD.LLBLGen.Pro.ODataSupportClasses, Version=4.0.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27.
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\projects\ExpirationTraxDS\ExpirationTraxDS\web.config
LOG: Using host configuration file: C:\Users\Dev.DEVPC\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Data.Services, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file //C
Users/Dev.DEVPC/AppData/Local/Temp/Temporary ASP.NET Files/root/4668e6e9/a7f264df/Microsoft.Data.Services.DLL.
LOG: Attempting download of new URL file
//C
Users/Dev.DEVPC/AppData/Local/Temp/Temporary ASP.NET Files/root/4668e6e9/a7f264df/Microsoft.Data.Services/Microsoft.Data.Services.DLL.
LOG: Attempting download of new URL file
//c
projects/ExpirationTraxDS/ExpirationTraxDS/bin/Microsoft.Data.Services.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Stack Trace:
[FileLoadException: Could not load file or assembly 'Microsoft.Data.Services, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) +0 System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +41 System.Reflection.Assembly.GetType(String name, Boolean throwOnError) +17 System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +295 System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +1434 System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +52 System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +598
[ServiceActivationException: The service '/ETDataServiceMS.svc' cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly 'Microsoft.Data.Services, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).] System.Runtime.AsyncResult.End(IAsyncResult result) +495736 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +178 System.ServiceModel.Activation.ServiceHttpHandler.EndProcessRequest(IAsyncResult result) +6 System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +129
The WCF Data Services Server version you have is an alpha. The SD.LLBLGen.Pro.ODataSupportClasses.dll assembly is compiled against v5.3. So, as I see, you have these options:
A. (preferred) Uninstall DS Server 5.5.0 and install v5.3 ( http://www.nuget.org/packages/Microsoft.Data.Services/5.3.0 )
B. Put an assembly binding redirect on your .config file.
C. Re-compile the ODataSupportClasses assembly against DS Server 5.5.0. You can find the source code at <LLBLGen v4 installation folder>\SouceCode\Frameworks\LLBLGen Pro\RuntimeLibraries\ODataSupportClasses
I wouldn't recommend B and C, because it might be that the LLBLGen assembly will run into breaking code with new DS changes. So, go for B/C only if really necessary.
Joined: 06-Sep-2011
Hi Daelmo,
Thank you for giving me the list of options. While I was waiting for your response, I added a binding to my web.config, and it permitted me to continue with my work. We are still in early development, so I will probably continue to use the binding method until we either encounter an issue or get ready for release. My hope is that when we are ready for release, LLBLGen will have updated to 5.5. Do you expect that this support will come soon?
Thanks and have a great weekend,
Mike
ABOH wrote:
Thank you for giving me the list of options. While I was waiting for your response, I added a binding to my web.config, and it permitted me to continue with my work. We are still in early development, so I will probably continue to use the binding method until we either encounter an issue or get ready for release.
Good. Give us your feedback about that when you finish the test drive with DS.
ABOH wrote:
My hope is that when we are ready for release, LLBLGen will have updated to 5.5. Do you expect that this support will come soon?
Well, 5.5 is still on alpha, so I doubt it will be 'officially' supported soon, but you stay alert to the changelog and the download rss feed to know when it's supported.
ABOH wrote:
Thanks and have a great weekend,
Thanks Mike. Have a nice weekend too!
It was really a bad timing. We moved to v5.3, tested it, removed the limitations we had to add because the .NET 4/4.5 version of OData is limited (Odata v2, not v3). Then during our beta, MS released 5.4, and right after that 5.5 was going into beta. So their speed is remarkable, and we decided to wait a bit till it settles down at their end. As v5.3 is still available on nuget, it's not a big deal
If it's really needed today, you can compile the sourcecode today against v5.5 beta if you want.
We'll update the code to v5.5 when it goes RTM, but we'll not keep up with their releasecycle, also because they add features without a lot of documentation and what it means for 3rd party o/r mappers.
You too have a nice weekend