Hi I have a class that inherits from OpenAccessDataContex, but when I try to build the solution I get this errors.
C:\xxxFramework.WPF\DataContextBase.Desktop.cs(77,18): error CS0012: The type 'System.Data.Services.IUpdatable' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
c:\xxxFramework\_ExternalComponents\Framework\WPF\Telerik.OpenAccess.40.dll: (Related file)
C:\xxxFramework.WPF\DataContextBase.Desktop.cs(77,18): error CS0012: The type 'System.Data.Services.IExpandProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
c:\xxxFramework\_ExternalComponents\Framework\WPF\Telerik.OpenAccess.40.dll: (Related file)
My Project has right System.Data.Services.dll reference, is from .NET Framework 3.5 SP1 and I checked an is the version that Telerik.OpenAccess.40.dll is requesting.
Any ideas why i'm getting this errors?
I needed to deliver this today and can't build it cause of this, is driving me crazy.
TIA
My class looks like this.
| using System; |
| using System.Collections; |
| using System.Collections.Generic; |
| using System.Data.Services; |
| using System.Diagnostics; |
| using System.Linq; |
| using System.Globalization; |
| using System.Reflection; |
| using Telerik.OpenAccess; |
| using Telerik.OpenAccess.Helper; |
| namespace MyNamespace |
| { |
| public class DataContextBase : OpenAccessDataContext |
| { |
| public DataContextBase() : base() { } |
| public DataContextBase(IObjectScope scope) : base(scope) { } |
| public DataContextBase(IObjectScope scope, bool shouldDispose) : base(scope,shouldDispose) { } |
| public void OnEntityChange(BusinessEntityBase entity, UpdateOperations uo, string entityDisplayName) |
| { |
| if (uo == UpdateOperations.Add || uo == UpdateOperations.Change) |
| { |
| if (!entity.IsValid()) |
| { |
| System.Text.StringBuilder sb = new System.Text.StringBuilder(); |
| sb.AppendLine(string.Format(CultureInfo.CurrentCulture, Properties.Resources.EntityNameError)); |
| foreach (var item in entity.ValidatationErrors) |
| { |
| sb.AppendLine(item.Value.BrokenRule.RuleEventArgs.BrokenRuleDescription); |
| } |
| throw new DataServiceException(400, sb.ToString()); |
| } |
| } |
| } |
| } |
| } |