Quantcast
Channel: Entity Framework
Viewing all 10318 articles
Browse latest View live

New Post: Microsoft.AspNet.EntityDataSource 6.0.0 source code

$
0
0
Hello,
where do I find source code for Microsoft.AspNet.EntityDataSource 6.0.0?
  • if available at all
    Thanks,
    Tomasz

Edited Issue: EDMX (and DBML) design surface hangs on Windows 10 [2861]

$
0
0
Issue
------

When the edmx model has more than ~100 associations, and click whether left or right click makes visual studio unresponsive for minutes at a time. A diagram with no or few associations is fine.

Workarounds
---------------

**Workaround #1: Adjust VS graphics options**

The following is reported to resolve the issue for some (but not all) users:
* Navigate to Tools > Options > General
* Untick "Automatically adjust visual experience based on client performance"
* Untick "Use graphics acceleration if available"

________________

**Workaround #2: Avoid Remote Desktop**

Several users have reported the issue only affects them when using Remote Desktop. You could try logging directly into the machine, or using an alternate remote connection technology.
________________

**Workaround #2: Older Windows Version**

Since this issue only affects Windows 10, you can use a previous version of Windows to edit the model.

Updates
---------



**Update Feb-26-2016**

This looks to be a problem with **Microsoft.VisualStudio.Modeling.Sdk** - it has been handed off to that team and they are investigating the cause. We are leaving this issue open to keep a track of the issue on the EF side since it is affecting a large number of customers.

________________

**Update May-24-2016**

The **Microsoft.VisualStudio.Modeling.Sdk** team has implemented a fix for this issue and it will ship in the next updated to Visual Studio 2015.
________________

Additional Details
-------------------

More details are on a StackOverflow question: [http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465](http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465).

__ProcDump__ during the unresponsiveness gives this:

```
[External Code]
[Managed to Native Transition]
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!<Module>.GeoSCursor.search(GeoSCursor* value)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.get_ObjectsInRectangle(double x0, double y0, double x1, double y1, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.HitTest(Microsoft.VisualStudio.Modeling.Diagrams.RectangleD hitArea, bool requireCompleteContainment, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialQuery(Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialDirection direction, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement currentShape, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement parentShape)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.FindNextInChildShapes(Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement startFromChildShape, bool focusableRequired)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeAccessibleObject.GetChild(int index)
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.GetFocused()
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.Accessibility.IAccessible.accFocus.get()
System.Windows.Forms.dll!System.Windows.Forms.InternalAccessibleObject.System.Windows.Forms.UnsafeNativeMethods.IAccessibleInternal.get_accFocus()
```

Commented Issue: EDMX (and DBML) design surface hangs on Windows 10 [2861]

$
0
0
Issue
------

When the edmx model has more than ~100 associations, and click whether left or right click makes visual studio unresponsive for minutes at a time. A diagram with no or few associations is fine.

Workarounds
---------------

**Workaround #1: Adjust VS graphics options**

The following is reported to resolve the issue for some (but not all) users:
* Navigate to Tools > Options > General
* Untick "Automatically adjust visual experience based on client performance"
* Untick "Use graphics acceleration if available"

________________

**Workaround #2: Avoid Remote Desktop**

Several users have reported the issue only affects them when using Remote Desktop. You could try logging directly into the machine, or using an alternate remote connection technology.
________________

**Workaround #2: Older Windows Version**

Since this issue only affects Windows 10, you can use a previous version of Windows to edit the model.

Updates
---------



**Update Feb-26-2016**

This looks to be a problem with **Microsoft.VisualStudio.Modeling.Sdk** - it has been handed off to that team and they are investigating the cause. We are leaving this issue open to keep a track of the issue on the EF side since it is affecting a large number of customers.

________________

**Update May-24-2016**

The **Microsoft.VisualStudio.Modeling.Sdk** team has implemented a fix for this issue and it will ship in the next updated to Visual Studio 2015.
________________

Additional Details
-------------------

More details are on a StackOverflow question: [http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465](http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465).

__ProcDump__ during the unresponsiveness gives this:

```
[External Code]
[Managed to Native Transition]
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!<Module>.GeoSCursor.search(GeoSCursor* value)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.get_ObjectsInRectangle(double x0, double y0, double x1, double y1, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.HitTest(Microsoft.VisualStudio.Modeling.Diagrams.RectangleD hitArea, bool requireCompleteContainment, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialQuery(Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialDirection direction, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement currentShape, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement parentShape)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.FindNextInChildShapes(Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement startFromChildShape, bool focusableRequired)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeAccessibleObject.GetChild(int index)
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.GetFocused()
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.Accessibility.IAccessible.accFocus.get()
System.Windows.Forms.dll!System.Windows.Forms.InternalAccessibleObject.System.Windows.Forms.UnsafeNativeMethods.IAccessibleInternal.get_accFocus()
```
Comments: The Microsoft.VisualStudio.Modeling.Sdk team has implemented a fix for this issue and it will ship in the next updated to Visual Studio 2015.

Created Unassigned: Make EF 6 PMC migrations commands aware of EF Core [2927]

$
0
0
If you try to use such commands as add-migration in a solution in which you have projects that use EF 6 and also projects that use EF Core, you may end up running the wrong commands. In this situation it is possible to disambiguate which commands you want to run, e.g. by saying entityframeworkcore\add-migration but by default you will just get whatever commands were loaded last.

This item is to look at improving the commands we ship with EF 6 (e.g. in the EF 6.2 release) so that they give you good guidance on how to disambiguate when they are applied to EF Core.

Edited Unassigned: Make EF 6 PMC migrations commands aware of EF Core [2927]

$
0
0
If you try to use such commands as add-migration in a solution in which you have projects that use EF 6 and also projects that use EF Core, you may end up running the wrong commands. In this situation it is possible to disambiguate which commands you want to run, e.g. by saying entityframeworkcore\add-migration but by default you will just get whatever commands were loaded last.

This item is to look at improving the commands we ship with EF 6 (e.g. in the EF 6.2 release) so that they give you good guidance on how to disambiguate when they are applied to EF Core.

Edited Unassigned: Make EF 6 migrations commands aware of EF Core [2927]

$
0
0
If you try to use such commands as add-migration in a solution in which you have projects that use EF 6 and also projects that use EF Core, you may end up running the wrong commands. In this situation it is possible to disambiguate which commands you want to run, e.g. by saying entityframeworkcore\add-migration but by default you will just get whatever commands were loaded last.

This item is to look at improving the commands we ship with EF 6 (e.g. in the EF 6.2 release) so that they give you good guidance on how to disambiguate when they are applied to EF Core.

Edited Unassigned: Make EF 6 migrations commands aware of EF Core [2927]

$
0
0
If you try to use commands like `add-migration` in a solution in which contains a project that uses EF 6 and also a project that uses EF Core, you may end up running the commands against a mismatched version of EF.

In this situation it is possible to disambiguate which commands you want to run, e.g. by typing something like entityframeworkcore\add-migration but by default you will just get whatever commands were loaded last.

This item is to look at improving the commands we ship with EF 6 (e.g. in the EF 6.2 release) so that they give you good guidance on how to disambiguate when they fail because they are applied to EF Core.

Commented Issue: Creating relationship in model with composite keys throws “Property is part of key and can't be modified” exception [955]

$
0
0
When creating a relationship in a model with composite keys an exception “Property is part of key and can't be modified” is thrown although no part of the key has been changed.

The details of this possible bug along with an example how to reproduce it are described in this Stackoverflow question:

[Creating relationship in model with composite keys throws “Property is part of key and can't be modified” exception](http://stackoverflow.com/q/15390679/270591)
Comments: In my case the suggested workaround is not possible as I can't set the foreign key manually as it contains an ident value which is unknown. Is there any alternative solution for this?

Commented Unassigned: Intermittent Error in Data.Entity.Core [2922]

$
0
0
We have a windows service running our in house calculation engine which uses a combination of Entity Framework and SQLBulkCopy for data operations.

We have observed several instances of a System.Reflection.TargetInvocation exception being thrown from the call to: System.Data.Entity.Core.Objects.ELinq.QueryParameterExpression.EvaluateParameter
```
Exception Info: System.Reflection.TargetInvocationException
Stack:
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Delegate.DynamicInvokeImpl(System.Object[])
at System.Data.Entity.Core.Objects.ELinq.QueryParameterExpression.EvaluateParameter(System.Object[])
at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(System.Nullable`1<System.Data.Entity.Core.Objects.MergeOption>)
at System.Data.Entity.Core.Objects.ObjectQuery`1+<>c__DisplayClass7[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<GetResults>b__6()
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func`1<System.__Canon>, System.Data.Entity.Infrastructure.IDbExecutionStrategy, Boolean, Boolean)
at System.Data.Entity.Core.Objects.ObjectQuery`1+<>c__DisplayClass7[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<GetResults>b__5()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func`1<System.__Canon>)
at System.Data.Entity.Core.Objects.ObjectQuery`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetResults(System.Nullable`1<System.Data.Entity.Core.Objects.MergeOption>)
at System.Data.Entity.Core.Objects.ObjectQuery`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
at <OurApplicationCode>.FindAndLoadParametersAndTimesteps(...)
```

The exception has been observed during a call into EF to read information from SQL Server. This is code path is executed thousands of times during a normal run.

This exception was caught on a test environment where we were able to extract additional details from the exception which indicated a possible memory management issue:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

The incidence of this error is low but it is a critical part of our data processing pipeline and we want to understand the underlying reason for these failures. Can anyone shed any light on this? Thanks.

Comments: I did a little research into the reference code site and the end of our stack trace can be found in: [Funcletizer.cs](http://referencesource.microsoft.com/#System.Data.Entity/System/Data/Objects/ELinq/Funcletizer.cs,4765a0cb91d3aa0d) The exception observed above seems to come from the following method. Does anyone know what could cause this method to raise a TargetInvocationException? EvaluateParameter source ``` /// <summary> /// Gets the current value of the parameter given (optional) compiled query arguments. /// </summary> internal object EvaluateParameter(object[] arguments) { if (_cachedDelegate == null) { if (_funcletizedExpression.NodeType == ExpressionType.Constant) { return ((ConstantExpression)_funcletizedExpression).Value; } ConstantExpression ce; if (TryEvaluatePath(_funcletizedExpression, out ce)) { return ce.Value; } } try { if (_cachedDelegate == null) { // Get the Func<> type for the property evaluator Type delegateType = TypeSystem.GetDelegateType(_compiledQueryParameters.Select(p => p.Type), _type); // Now compile delegate for the funcletized expression _cachedDelegate = Expression.Lambda(delegateType, _funcletizedExpression, _compiledQueryParameters).Compile(); } return _cachedDelegate.DynamicInvoke(arguments); } catch (TargetInvocationException e) { throw e.InnerException; } } ```

New Post: Ef 6.1.3 Startup Very Very Slow

$
0
0
Good evening, to be noted that I have already addressed this issue, researching, testing, msdn forum, but have not managed to solve. (View pre-generated, ngen)

I state that I am doing tests in a fairly fast machine (ssd, 16gb ram i7overclock) then on a customer's machine time can only increase.

the problem is the classic startup ef, loses in my opinion too much time (in my pc about 30 seconds). So when the customer opens my application has to wait 30+ seconds, obviously there is a splashcreen with barprogress endless, before accessing the menu and the dashboard, sql server utilization, ef 6.1.3 first code, manual migration, wpf mvvm.
The db is composed of about 330 tables including 60/70 entity with one to many relationship.

Add the SednaContex link (to understand the structure of my db):
SednaCOntext

When I start my application I do I make a model check to see if there have been changes, in which case you migrate.Most of the time I just lose them ... after I make a dummy query (query cold) to make sure, that when User (finally) comes in, which ones will not have to freeze when feelings will make the first query.
**************Compatible******************
 var sednaContext = new SednaContext(dbHelper.CreateConnectionString(Ditta, ditte?.DirectoryDitta));
            var compatibleWithModel = sednaContext.Database.CompatibleWithModel(true);
            if (!compatibleWithModel)
            {
                var result = RunMigrations();
            }
*******Fine Compatible: 14987ms***

**************ColdQuery******************
var   datiDitta = datiDittaRepository.Prendi(string.Empty);//coldquery

********Fine Cold Query: 13748ms******
As you can see in this example, I added the time it is going to run, only these two operations about 28 seconds + more seconds to load the menu and the MAINVIEW, but few seconds so it's not important.

Now I wanted to see if there is something wrong in my implementation, if there are other methods, or implementations to solve the problem, because I think there are around made software with ef and above all much larger than this ... I hope someone can help me because this problem is lho a long time but I ignored it, but now has become of primary importance


I created a console program to get a better idea where to video releases me of the time it takes to compare the model and the cold query
Example


I tried also with ngen I post a screenshot where you see the result, the creations of all the .dll with ngen, and through windows process verification using native images, but the result has not changed:

ScreenShot ngen

As for the pre-generated view with vs 2015 I did not do them because I f are from a compilation error of a path too long, I read that with the new compiler is rosylin this limitation but do not know ....

New Post: Ef Power tools c#6 vs 2015

$
0
0
As for the pre-generated view with vs 2015 I did not do them because I f are from a compilation error of a path too long, I read that with the new compiler is rosylin this limitation but do not know ....

New Post: Persistence in postgresql oid column

$
0
0
How to save a file in PostgreSQL oid column?
Oid is the PostgreSQL column type for large objects, like SQL Server varbinary.

Reviewed: EF 6.0.0 (6月 03, 2016)

$
0
0
Rated 5 Stars (out of 5) - e4wfasrfwerwe

Created Issue: Execution issue from different threads when using interceptors [2928]

$
0
0
### Steps to reproduce
I simply set an interceptor to log the queries and commands generated by EF. This is the setting I used:

```
<interceptors>
<interceptor type="System.Data.Entity.Infrastructure.Interception.DatabaseLogger, EntityFramework">
<parameters>
<parameter value="C:\Users\Public\EF-Log-Output.txt" />
</parameters>
</interceptor>
</interceptors>
```

### The issue
When I run to queries from different threads, it raises the following exception:
> System.IO.IOException
> The process cannot access the file 'C:\Users\Public\EF-Log-Output.txt' because it is being used by another process.

The following is the code I used to execute queries asynchronously:

```
public async Task SyncCacheEntities(string connectionString)
{
var task1 = SyncUserProfile(cacheContext);
var task2 = SyncUserAvatar(cacheContext);
await Task.WhenAll(task1, task2);
}
```

### Stack trace:
```
> System.TypeInitializationException: The type initializer for 'SaShi.DbLayer.EhrContext' threw an exception. ---> System.InvalidOperationException: The type 'System.Data.Entity.Infrastructure.Interception.DatabaseLogger, EntityFramework' registered in the application config file as an IDbInterceptor not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: The process cannot access the file 'C:\Users\Public\EF-Log-Output.txt' because it is being used by another process.
> at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
> at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
> at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
> at System.IO.StreamWriter..ctor(String path, Boolean append)
> at System.Data.Entity.Infrastructure.Interception.DatabaseLogger..ctor(String path, Boolean append)
> --- End of inner exception stack trace ---
> at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
> at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
> at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
> at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
> at System.Activator.CreateInstance(Type type, Object[] args)
> at System.Data.Entity.Internal.ConfigFile.InterceptorElement.CreateInterceptor()
> --- End of inner exception stack trace ---
> at System.Data.Entity.Internal.ConfigFile.InterceptorElement.CreateInterceptor()
> at System.Data.Entity.Internal.ConfigFile.InterceptorsCollection.<get_Interceptors>b__0(InterceptorElement e)
> at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
> at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
> at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
> at System.Data.Entity.Internal.ConfigFile.InterceptorsCollection.get_Interceptors()
> at System.Data.Entity.Internal.AppConfig.get_Interceptors()
> at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetServicesFactory(Type type, Object key)
> at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.<>c__DisplayClass8.<GetServices>b__3(Tuple`2 t)
> at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
> at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetServices(Type type, Object key)
> at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.<>c__DisplayClass6.<GetServices>b__5(IDbDependencyResolver r)
> at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
> at System.Linq.Enumerable.<ConcatIterator>d__58`1.MoveNext()
> at System.Linq.Enumerable.<OfTypeIterator>d__92`1.MoveNext()
> at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
> at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
> at System.Data.Entity.Infrastructure.DependencyResolution.InternalConfiguration.Lock()
> at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.<.ctor>b__1()
> at System.Lazy`1.CreateValue()
> at System.Lazy`1.LazyInitValue()
> at System.Lazy`1.get_Value()
> at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.GetConfiguration()
> at System.Data.Entity.Database.SetInitializer[TContext](IDatabaseInitializer`1 strategy)
> at SaShi.DbLayer.EhrContext..cctor() in d:\Sayid\Projects\iMedex\Source\Data.DbLayer\EhrContext.cs:line 66
> --- End of inner exception stack trace ---
> at SaShi.DbLayer.EhrContext..ctor()
> at SaShi.DbLayer.ContextProviders.EhrDb.GetInstance() in d:\Sayid\Projects\iMedex\Source\Data.DbLayer\ContextProviders\EhrDb.cs:line 13
> at SaShi.Data.Service.DbService.DbGenericService.<GetListByModelAsync>d__5`2.MoveNext() in d:\Sayid\Projects\iMedex\Source\Data.Service\DbService\DbGenericService.cs:line 37
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
> at SaShi.Data.Service.Security.Users.UserDataService.<GetAllAsync>d__0.MoveNext() in d:\Sayid\Projects\iMedex\Source\Data.Service\Security\Users\UserDataService.cs:line 39
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
> at SaShi.Data.Service.CacheService.CacheServerDataService.<SyncUserProfile>d__b.MoveNext() in d:\Sayid\Projects\iMedex\Source\Data.Service\CacheService\CacheServerDataService.cs:line 41
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
> at SaShi.Data.Service.CacheService.CacheServerDataService.<SyncCacheEntities>d__4.MoveNext() in d:\Sayid\Projects\iMedex\Source\Data.Service\CacheService\CacheServerDataService.cs:line 36
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
> at SaShi.Business.Server.Web.CacheServer.CacheServerLogic.<SyncServer>d__8.MoveNext() in d:\Sayid\Projects\iMedex\Source\Business.Server.Web\CacheServer\CacheServerLogic.cs:line 103
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
> at SaShi.UI.Server.Web.Controllers.CacheServersController.<SyncServer>d__2.MoveNext() in d:\Sayid\Projects\iMedex\Source\UI.Server.Web\Controllers\CacheServersController.cs:line 95
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult)
> at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
> at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
>

Commented Issue: Execution issue from different threads when using interceptors [2928]

$
0
0
### Steps to reproduce
I simply set an interceptor to log the queries and commands generated by EF. This is the setting I used:

```
<interceptors>
<interceptor type="System.Data.Entity.Infrastructure.Interception.DatabaseLogger, EntityFramework">
<parameters>
<parameter value="C:\Users\Public\EF-Log-Output.txt" />
</parameters>
</interceptor>
</interceptors>
```

### The issue
When I run to queries from different threads, it raises the following exception:
> System.IO.IOException
> The process cannot access the file 'C:\Users\Public\EF-Log-Output.txt' because it is being used by another process.

The following is the code I used to execute queries asynchronously:

```
public async Task SyncCacheEntities(string connectionString)
{
var task1 = SyncUserProfile(cacheContext);
var task2 = SyncUserAvatar(cacheContext);
await Task.WhenAll(task1, task2);
}
```

### Stack trace:
```
> System.TypeInitializationException: The type initializer for 'SaShi.DbLayer.EhrContext' threw an exception. ---> System.InvalidOperationException: The type 'System.Data.Entity.Infrastructure.Interception.DatabaseLogger, EntityFramework' registered in the application config file as an IDbInterceptor not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: The process cannot access the file 'C:\Users\Public\EF-Log-Output.txt' because it is being used by another process.
> at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
> at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
> at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
> at System.IO.StreamWriter..ctor(String path, Boolean append)
> at System.Data.Entity.Infrastructure.Interception.DatabaseLogger..ctor(String path, Boolean append)
> --- End of inner exception stack trace ---
> at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
> at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
> at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
> at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
> at System.Activator.CreateInstance(Type type, Object[] args)
> at System.Data.Entity.Internal.ConfigFile.InterceptorElement.CreateInterceptor()
> --- End of inner exception stack trace ---
> at System.Data.Entity.Internal.ConfigFile.InterceptorElement.CreateInterceptor()
> at System.Data.Entity.Internal.ConfigFile.InterceptorsCollection.<get_Interceptors>b__0(InterceptorElement e)
> at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
> at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
> at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
> at System.Data.Entity.Internal.ConfigFile.InterceptorsCollection.get_Interceptors()
> at System.Data.Entity.Internal.AppConfig.get_Interceptors()
> at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetServicesFactory(Type type, Object key)
> at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.<>c__DisplayClass8.<GetServices>b__3(Tuple`2 t)
> at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
> at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetServices(Type type, Object key)
> at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.<>c__DisplayClass6.<GetServices>b__5(IDbDependencyResolver r)
> at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
> at System.Linq.Enumerable.<ConcatIterator>d__58`1.MoveNext()
> at System.Linq.Enumerable.<OfTypeIterator>d__92`1.MoveNext()
> at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
> at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
> at System.Data.Entity.Infrastructure.DependencyResolution.InternalConfiguration.Lock()
> at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.<.ctor>b__1()
> at System.Lazy`1.CreateValue()
> at System.Lazy`1.LazyInitValue()
> at System.Lazy`1.get_Value()
> at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.GetConfiguration()
> at System.Data.Entity.Database.SetInitializer[TContext](IDatabaseInitializer`1 strategy)
> at SaShi.DbLayer.EhrContext..cctor() in d:\Sayid\Projects\iMedex\Source\Data.DbLayer\EhrContext.cs:line 66
> --- End of inner exception stack trace ---
> at SaShi.DbLayer.EhrContext..ctor()
> at SaShi.DbLayer.ContextProviders.EhrDb.GetInstance() in d:\Sayid\Projects\iMedex\Source\Data.DbLayer\ContextProviders\EhrDb.cs:line 13
> at SaShi.Data.Service.DbService.DbGenericService.<GetListByModelAsync>d__5`2.MoveNext() in d:\Sayid\Projects\iMedex\Source\Data.Service\DbService\DbGenericService.cs:line 37
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
> at SaShi.Data.Service.Security.Users.UserDataService.<GetAllAsync>d__0.MoveNext() in d:\Sayid\Projects\iMedex\Source\Data.Service\Security\Users\UserDataService.cs:line 39
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
> at SaShi.Data.Service.CacheService.CacheServerDataService.<SyncUserProfile>d__b.MoveNext() in d:\Sayid\Projects\iMedex\Source\Data.Service\CacheService\CacheServerDataService.cs:line 41
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
> at SaShi.Data.Service.CacheService.CacheServerDataService.<SyncCacheEntities>d__4.MoveNext() in d:\Sayid\Projects\iMedex\Source\Data.Service\CacheService\CacheServerDataService.cs:line 36
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
> at SaShi.Business.Server.Web.CacheServer.CacheServerLogic.<SyncServer>d__8.MoveNext() in d:\Sayid\Projects\iMedex\Source\Business.Server.Web\CacheServer\CacheServerLogic.cs:line 103
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
> at SaShi.UI.Server.Web.Controllers.CacheServersController.<SyncServer>d__2.MoveNext() in d:\Sayid\Projects\iMedex\Source\UI.Server.Web\Controllers\CacheServersController.cs:line 95
> --- End of stack trace from previous location where exception was thrown ---
> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
> at System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult)
> at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
> at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
> at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
>
Comments: Originally reported at https://github.com/aspnet/EntityFramework/issues/5567

Created Unassigned: computed column and formula, default value wanted [2929]

$
0
0
We want these feature adding to EF6 very much:
(1)computed column and formula and generation choice(insert,update) --EF7, NHibernate does have
(2)column default value -- EF7, Nhibernate does have
(3)properties bag --EF7 in roadmap, NHibernate does have
(4)Enum mapping value choice, (string or int)
(5)column check constrains --NHibernate can only set name
(6)Entity and Column Caching control in mapping --Nhibernate does have



Downloade Users on nuget of EF are ten times of nhibernate, I think we must make EF6 much better.
EF7 maybe good, but it does have a long way to go, maybe two years, Adding Missing features to EF6 will be much easier and sooner and make loyal users happier.
Thanks in advance

Created Unassigned: Code First Migrations with .NET Core [2930]

$
0
0
I'd like to use code first migrations from EF6.1.3 toolings with .NET Core project
But even if I have the EF package in my project, the package manager console tells me this

The EntityFramework package is not installed on project 'xxxxxx'.

Have the same usage of EF on other projects (WPF for instance) and it works perfectly of course. Is there a workaround/solution ?

Thanks

Commented Issue: EDMX (and DBML) design surface hangs on Windows 10 [2861]

$
0
0
Issue
------

When the edmx model has more than ~100 associations, and click whether left or right click makes visual studio unresponsive for minutes at a time. A diagram with no or few associations is fine.

Workarounds
---------------

**Workaround #1: Adjust VS graphics options**

The following is reported to resolve the issue for some (but not all) users:
* Navigate to Tools > Options > General
* Untick "Automatically adjust visual experience based on client performance"
* Untick "Use graphics acceleration if available"

________________

**Workaround #2: Avoid Remote Desktop**

Several users have reported the issue only affects them when using Remote Desktop. You could try logging directly into the machine, or using an alternate remote connection technology.
________________

**Workaround #2: Older Windows Version**

Since this issue only affects Windows 10, you can use a previous version of Windows to edit the model.

Updates
---------



**Update Feb-26-2016**

This looks to be a problem with **Microsoft.VisualStudio.Modeling.Sdk** - it has been handed off to that team and they are investigating the cause. We are leaving this issue open to keep a track of the issue on the EF side since it is affecting a large number of customers.

________________

**Update May-24-2016**

The **Microsoft.VisualStudio.Modeling.Sdk** team has implemented a fix for this issue and it will ship in the next updated to Visual Studio 2015.
________________

Additional Details
-------------------

More details are on a StackOverflow question: [http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465](http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465).

__ProcDump__ during the unresponsiveness gives this:

```
[External Code]
[Managed to Native Transition]
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!<Module>.GeoSCursor.search(GeoSCursor* value)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.get_ObjectsInRectangle(double x0, double y0, double x1, double y1, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.HitTest(Microsoft.VisualStudio.Modeling.Diagrams.RectangleD hitArea, bool requireCompleteContainment, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialQuery(Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialDirection direction, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement currentShape, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement parentShape)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.FindNextInChildShapes(Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement startFromChildShape, bool focusableRequired)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeAccessibleObject.GetChild(int index)
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.GetFocused()
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.Accessibility.IAccessible.accFocus.get()
System.Windows.Forms.dll!System.Windows.Forms.InternalAccessibleObject.System.Windows.Forms.UnsafeNativeMethods.IAccessibleInternal.get_accFocus()
```
Comments: The fix for this issue is included in Visual Studio 2015 Update 3. The Release Candidate of Update 3 is now available https://blogs.msdn.microsoft.com/visualstudio/2016/06/07/visual-studio-2015-update-3-rc/.

Edited Issue: EDMX (and DBML) design surface hangs on Windows 10 [2861]

$
0
0
Issue
------

When the edmx model has more than ~100 associations, and click whether left or right click makes visual studio unresponsive for minutes at a time. A diagram with no or few associations is fine.

Workarounds
---------------

**Workaround #1: Install VS2015 Update 3 RC**

The fix for this issue will be included in Visual Studio 2015 Update 3. You can get the release candidate of this update from https://blogs.msdn.microsoft.com/visualstudio/2016/06/07/visual-studio-2015-update-3-rc/.

**Workaround #2: Adjust VS graphics options**

The following is reported to resolve the issue for some (but not all) users:
* Navigate to Tools > Options > General
* Untick "Automatically adjust visual experience based on client performance"
* Untick "Use graphics acceleration if available"

________________

**Workaround #3: Avoid Remote Desktop**

Several users have reported the issue only affects them when using Remote Desktop. You could try logging directly into the machine, or using an alternate remote connection technology.
________________

**Workaround #2: Older Windows Version**

Since this issue only affects Windows 10, you can use a previous version of Windows to edit the model.

Updates
---------



**Update Feb-26-2016**

This looks to be a problem with **Microsoft.VisualStudio.Modeling.Sdk** - it has been handed off to that team and they are investigating the cause. We are leaving this issue open to keep a track of the issue on the EF side since it is affecting a large number of customers.

________________

**Update May-24-2016**

The **Microsoft.VisualStudio.Modeling.Sdk** team has implemented a fix for this issue and it will ship in the next updated to Visual Studio 2015.
________________

**Update June-13-2016**

The fix for this issue is included in Visual Studio 2015 Update 3. The Release Candidate of Update 3 is now available https://blogs.msdn.microsoft.com/visualstudio/2016/06/07/visual-studio-2015-update-3-rc/.

________________

Additional Details
-------------------

More details are on a StackOverflow question: [http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465](http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465).

__ProcDump__ during the unresponsiveness gives this:

```
[External Code]
[Managed to Native Transition]
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!<Module>.GeoSCursor.search(GeoSCursor* value)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.get_ObjectsInRectangle(double x0, double y0, double x1, double y1, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.HitTest(Microsoft.VisualStudio.Modeling.Diagrams.RectangleD hitArea, bool requireCompleteContainment, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialQuery(Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialDirection direction, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement currentShape, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement parentShape)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.FindNextInChildShapes(Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement startFromChildShape, bool focusableRequired)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeAccessibleObject.GetChild(int index)
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.GetFocused()
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.Accessibility.IAccessible.accFocus.get()
System.Windows.Forms.dll!System.Windows.Forms.InternalAccessibleObject.System.Windows.Forms.UnsafeNativeMethods.IAccessibleInternal.get_accFocus()
```

Edited Issue: EDMX (and DBML) design surface hangs on Windows 10 [2861]

$
0
0
Issue
------

When the edmx model has more than ~100 associations, and click whether left or right click makes visual studio unresponsive for minutes at a time. A diagram with no or few associations is fine.

Workarounds
---------------

**Workaround #1: Install VS2015 Update 3 RC**

The fix for this issue will be included in Visual Studio 2015 Update 3. You can get the release candidate of this update from https://blogs.msdn.microsoft.com/visualstudio/2016/06/07/visual-studio-2015-update-3-rc/.

________________

**Workaround #2: Adjust VS graphics options**

The following is reported to resolve the issue for some (but not all) users:
* Navigate to Tools > Options > General
* Untick "Automatically adjust visual experience based on client performance"
* Untick "Use graphics acceleration if available"

________________

**Workaround #3: Avoid Remote Desktop**

Several users have reported the issue only affects them when using Remote Desktop. You could try logging directly into the machine, or using an alternate remote connection technology.
________________

**Workaround #4: Older Windows Version**

Since this issue only affects Windows 10, you can use a previous version of Windows to edit the model.

Updates
---------



**Update Feb-26-2016**

This looks to be a problem with **Microsoft.VisualStudio.Modeling.Sdk** - it has been handed off to that team and they are investigating the cause. We are leaving this issue open to keep a track of the issue on the EF side since it is affecting a large number of customers.

________________

**Update May-24-2016**

The **Microsoft.VisualStudio.Modeling.Sdk** team has implemented a fix for this issue and it will ship in the next updated to Visual Studio 2015.
________________

**Update June-13-2016**

The fix for this issue is included in Visual Studio 2015 Update 3. The Release Candidate of Update 3 is now available https://blogs.msdn.microsoft.com/visualstudio/2016/06/07/visual-studio-2015-update-3-rc/.

________________

Additional Details
-------------------

More details are on a StackOverflow question: [http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465](http://stackoverflow.com/questions/33854875/entity-framework-edmx-click-on-diagram-very-slow/33884465).

__ProcDump__ during the unresponsiveness gives this:

```
[External Code]
[Managed to Native Transition]
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!<Module>.GeoSCursor.search(GeoSCursor* value)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.get_ObjectsInRectangle(double x0, double y0, double x1, double y1, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.HitTest(Microsoft.VisualStudio.Modeling.Diagrams.RectangleD hitArea, bool requireCompleteContainment, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialQuery(Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialDirection direction, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement currentShape, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement parentShape)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.FindNextInChildShapes(Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement startFromChildShape, bool focusableRequired)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeAccessibleObject.GetChild(int index)
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.GetFocused()
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.Accessibility.IAccessible.accFocus.get()
System.Windows.Forms.dll!System.Windows.Forms.InternalAccessibleObject.System.Windows.Forms.UnsafeNativeMethods.IAccessibleInternal.get_accFocus()
```
Viewing all 10318 articles
Browse latest View live




Latest Images