Issues After Upgrade to Visual Studio SP3

Aug 15, 2014 at 3:29 PM
Anyone is having problems after upgrading to VS SP3?

When i tried to open the Customer page, i receive that message error:

{ "odata.error":{ "code":"","message":{ "lang":"en-US","value":"An error has occurred." },"innererror":{ "message":"Uma exce\u00e7\u00e3o foi acionada pelo destino de uma chamada.","type":"System.Reflection.TargetInvocationException","stacktrace":" em System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n em System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n em System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n em System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)\r\n em System.Web.Http.OData.ExpressionHelpers.Count(IQueryable query, Type type)\r\n em System.Web.Http.OData.Query.InlineCountQueryOption.GetEntityCount(IQueryable query)\r\n em System.Web.Http.OData.Query.ODataQueryOptions.ApplyTo(IQueryable query, ODataQuerySettings querySettings)\r\n em System.Web.Http.OData.EnableQueryAttribute.ApplyQuery(IQueryable queryable, ODataQueryOptions queryOptions)\r\n em System.Web.Http.OData.EnableQueryAttribute.ExecuteQuery(Object response, HttpRequestMessage request, HttpActionDescriptor actionDescriptor)\r\n em System.Web.Http.OData.EnableQueryAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)\r\n em System.Web.Http.Filters.ActionFilterAttribute.OnActionExecutedAsync(HttpActionE...tionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)\r\n em System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry)\r\n em System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)\r\n em System.Data.SqlClient.SqlConnection.Open()\r\n em System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)\r\n em System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action2 operation, TInterceptionContext interceptionContext, Action3 executing, Action3 executed)\r\n em System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)\r\n em System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2()\r\n em System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()\r\n em System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func1 operation)\r\n em System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation)\r\n em System.Data.Entity.Core.EntityClient.EntityConnection.Open()","internalexception":{ "message":"O sistema n\u00e3o pode encontrar o arquivo especificado","type":"System.ComponentModel.Win32Exception","stacktrace":"" } } } } }}

I´ve tried to update the Nuget packages, but didnt work too.

Aug 16, 2014 at 10:04 AM
I have VS2013 update 3 installed, and don't get any issues on the customer page. I am using the latest commit in the repository.

Does this issue occur if you create a second Northwind database and use that? Can you data-diff your current database with the default one?

This looks like an OData query issue. The customer page uses OData to request a page of data. You could try debugging your odata request with VS and seeing what entities are being requested on the page that fails. Then see if you can work out why one or more of those entities in your database are different to the default Northwind install. There may be an underlying issue with the way the query is run by our framework, but without knowing what entities you have in your database I can't tell you what is going wrong.
Marked as answer by lelong37 on 8/19/2014 at 10:17 PM
Aug 18, 2014 at 3:22 AM
Hi AGBrown,

Thanks for answering me.
I've deleted my database and get a script to generate a new one.
But now i got the following error:

The complex type 'Northwind.Entities.Models.Territory' refers to the entity type 'Northwind.Entities.Models.Employee' through the property 'Employees'.

Maybe my database isnt with the right schema?

Aug 18, 2014 at 8:16 PM
Have a look at CustomerRepository_Tests.cs, it should reference the script for you to use. If I recall correctly it is Northwind.Test/Sql/instnwnd.sql