The last few days when I start VS2017 I get an error and Coderush isn't loaded. I can bring it back by disabling it (from within VS2017) and then enabling it again, but this is pretty time consuming, since I need to restart VS twice to do it. This is the activity log entry that the error refers to - any ideas?
XML<entry>
<record>985</record>
<time>2019/02/07 13:32:58.445</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.IO.FileNotFoundException: Could not load file or assembly 'DevExpress.Xpf.Core.v15.3, Version=15.3.127.127, Culture=neutral, PublicKeyToken=79868b8147b5eae4' or one of its dependencies. The system cannot find the file specified.
File name: 'DevExpress.Xpf.Core.v15.3, Version=15.3.127.127, Culture=neutral, PublicKeyToken=79868b8147b5eae4'
 at System.ModuleHandle.ResolveMethod(RuntimeModule module, Int32 methodToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount)
 at System.ModuleHandle.ResolveMethodHandleInternalCore(RuntimeModule module, Int32 methodToken, IntPtr[] typeInstantiationContext, Int32 typeInstCount, IntPtr[] methodInstantiationContext, Int32 methodInstCount)
 at System.ModuleHandle.ResolveMethodHandleInternal(RuntimeModule module, Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
 at System.Reflection.RuntimeModule.ResolveMethod(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
 at Microsoft.VisualStudio.Composition.Reflection.ResolverExtensions.Resolve(MethodRef methodRef)
 at Microsoft.VisualStudio.Composition.Reflection.MethodRef.Resolve()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToStateTransitively(PartLifecycleState requiredState, HashSet`1 visitedNodes)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
 at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
 at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Lazy`1.get_Value()
 at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
 at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
 at System.Lazy`1.CreateValue()
 at System.Lazy`1.LazyInitValue()
 at System.Lazy`1.get_Value()
 at DevExpress.CodeRush.VisualStudio.VsTextViewCreationListener.VsTextViewCreated(IVsTextView textViewAdapter)
 at Microsoft.VisualStudio.Editor.Implementation.SimpleTextViewWindow.<>c__DisplayClass423_0.<SendVsTextViewCreated>b__0()
 at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
</description>
</entry>
Updated to 18.2.7, and now the coderush menu doesn't appear until about 10 seconds or so after the solution loads and I'm able to start editing?!? I'm going to quit and restart a few times to see if I can reproduce the original error with this version
Seems to be dependent upon the size of the solution being loaded. With no solution selected, the coderush menu appears about 7-8 seconds after the get started page renders. Opening VS2017 with a solution selected takes longer
I'm seeing a few errors in Coderush logs. I'll attach the most recent logs, but here are two examples:
2019.02.07 13:29:31.9232 Information: RenameNamespaceToMatchFolderSolutionExplorerAction not available 2019.02.07 13:30:20.3825 Error: Message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. 2019.02.07 13:30:20.3825 Error: Type: System.IO.IOException 2019.02.07 13:30:20.3825 Error: Source: System 2019.02.07 13:30:20.3825 Error: StackTrace: at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) at System.IO.Stream.<>c.<BeginEndReadAsync>b__43_1(Stream stream, IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.IO.StreamReader.<ReadBufferAsync>d__97.MoveNext() --- 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.IO.StreamReader.<ReadLineAsyncInternal>d__60.MoveNext() --- 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 DevExpress.CodeAnalysis.TypeScript.Scripts.TcpEventListener.<<Start>b__6_1>d.MoveNext() 2019.02.07 13:30:20.3825 Error: InnerException: 2019.02.07 13:30:20.3825 Error: Message: An existing connection was forcibly closed by the remote host 2019.02.07 13:30:20.3825 Error: Type: System.Net.Sockets.SocketException 2019.02.07 13:30:20.3825 Error: Source: System 2019.02.07 13:30:20.3825 Error: StackTrace: at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) 2019.02.07 13:30:21.3915 Information: Stopping CodeRush Engine 2019.02.07 13:30:21.4335 Information: Finalizing plugIns...
And the other one
2019.02.07 13:33:11.4997 Error: Message: Could not load file or assembly 'DevExpress.Data.v15.3, Version=15.3.127.127, Culture=neutral, PublicKeyToken=79868b8147b5eae4' or one of its dependencies. The system cannot find the file specified. 2019.02.07 13:33:11.4997 Error: Type: System.IO.FileNotFoundException 2019.02.07 13:33:11.4997 Error: Source: DevExpress.CodeRush.Package 2019.02.07 13:33:11.4997 Error: StackTrace: at DevExpress.CodeRush.Package.CREventTracker..ctor() at DevExpress.CodeRush.Package.CREventTrackerProvider.CreateEventTracker() at DevExpress.CodeRush.Platform.Diagnostics.AggregateEventTracker.GetTrackers(IEnumerable`1 providers) at DevExpress.CodeRush.Package.CREventTrackerService.RegisterTracker() at DevExpress.CodeRush.Package.CodeRushPackage.<InitializeAsync>d__79.MoveNext() 2019.02.07 13:39:58.6173 Error: Message: Object reference not set to an instance of an object. 2019.02.07 13:39:58.6343 Error: Type: System.NullReferenceException 2019.02.07 13:39:58.6343 Error: Source: DevExpress.CodeRush.VisualStudio 2019.02.07 13:39:58.6343 Error: StackTrace: at DevExpress.CodeRush.VisualStudio.TextEditor.CRTextView.GetOutliningManager()
Hi Kevin,
Thank you for your report.
We received some reports about this. The problem is related to automatic updates in Visual Studio. We made certain changes that will solve this problem in the future. These changes will be included only in version 18.2.8.
Currently I recommend that you completely remove CodeRush and reinstall it:
%localappdata%\Microsoft\VisualStudio\15.0_a053bf17\Extensions
As for System.Net.Sockets.SocketException, it is expected behavior when Visual Studio closes. We will remove this exceptions from log files in future builds.
Let me know your results.
Thanks Andrew, I'll give that a try as soon as I get a chance
By the way, is this a fix for coderush not loading, for the delay in loading, or for both?
Hi Kevin,
The new version will contain a fix for the issue when CodeRush is not loaded. We monitor performance and make corresponding enhancements with every release.
After updating an extension, the first load can be slow: Visual Studio collects MEF components and creates a cache.
I recommend enabling NGen compilation for CodeRush assemblies. See the what's new for 18.1.11 version.
The progress of the NGen compilation will be shown in the system tray icon.
If my recommendations do not help and you continue seeing messages that the CodeRush is slow, we will need additional information from you.
It would be very helpful if you could collect perf view data on this issue using the PerfView tool from Microsoft during the slowdown and provide us with this information. For this, install this tool and perform the steps shown in the screencast.
I suggest you upload the log files to our FTP. Use the following credentials for this:
Server: downloads.devexpress.com
User: UPLOAD
Password: HEREYOUARE
I'm looking forward to your reply.