microsoft / RTVS

R Tools for Visual Studio.
MIT License
389 stars 118 forks source link

R Tools > Data Science Settings... --> Error in R Interactive window - An exception was encountered while constructing the content of this frame. #4310

Closed OscarTex closed 6 years ago

OscarTex commented 6 years ago

I am using VS 2017 Community Edition - Version 15.6.6 - upgraded from version 15.6.5. Installed RTVS and in Visual Studio when R Tools > Data Science Settings... is selected, I got this message in the R Interactive window:

An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\v-joberc\AppData\Roaming\Microsoft\VisualStudio\15.0_0ffa9891\ActivityLog.xml".

Exception details: System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at Microsoft.VisualStudio.R.Package.Windows.ToolWindowPaneFactory1.GetOrCreate(Int32 instanceId, Func1 factory) at Microsoft.VisualStudio.R.Package.ToolWindows.ViewContainerToolWindowFactory.Factory2.GetOrCreate(Int32 instanceId) at Microsoft.VisualStudio.R.Package.ToolWindows.ViewContainerToolWindowFactory.GetOrCreate[TToolWindow](Int32 instanceId) at Microsoft.VisualStudio.R.Package.ToolWindows.VsRInteractiveWorkflowToolWindowService.Connections(Int32 instanceId) at Microsoft.R.Components.InteractiveWorkflow.Implementation.RInteractiveWorkflow.d__40.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.Common.Core.TaskExtensions.ReThrowTaskException(Object state) at Microsoft.VisualStudio.Threading.JoinableTaskFactory.SingleExecuteProtector.TryExecute() at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread() at Microsoft.VisualStudio.Threading.JoinableTask1.CompleteOnCurrentThread() at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func1 asyncMethod, JoinableTaskCreationOptions creationOptions) at Microsoft.VisualStudio.R.Package.Shell.VsTaskService.Wait[T](Func`1 method, T& result, Int32 ms, CancellationToken cancellationToken) at Microsoft.VisualStudio.R.Packages.R.RPackageToolWindowProvider.CreateInteractiveWindow(Int32 id) at Microsoft.VisualStudio.R.Packages.R.RPackageToolWindowProvider.CreateVisualComponent(Guid toolWindowGuid, Int32 id) at Microsoft.VisualStudio.R.Packages.R.RPackageToolWindowProvider.CreateToolWindow(Guid toolWindowGuid, Int32 id) at Microsoft.VisualStudio.R.Packages.R.RPackage.CreateToolWindow(Guid& toolWindowType, Int32 id) at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsToolWindowFactory.CreateToolWindow(Guid& toolWindowType, UInt32 id) at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()

Please help to fix this issue. TIA.

ericlecoutre commented 6 years ago

Add that right now. Guess issue is incompatibility with (maybe more recent) R client. I uninstall R client (3.4.4 I think), uninstalled Visual Studio and reinstalled it to use R client version coming with Data Science solution (3.3.2). Then it worked.

MikhailArkhipov commented 6 years ago

No, it is unrelated to R. Could you locate and send us your privateregistry.bin which should be in

C:\Users[USERNAME]\AppData\Local\Microsoft\VisualStudio\15.0**** Associated log files would help too

mikhaila AT microsoft

Thanks

OscarTex commented 6 years ago

privateregistry.zip Uploaded .bin file (in a zip file). Please advise where to find the associated logs files.

Thanks John Berchmans

MikhailArkhipov commented 6 years ago

Log files are usually next to it, such as privateregistry.bin.LOG?

OscarTex commented 6 years ago

I did not find any such file in the C:\Users\\AppData\Local\Microsoft\VisualStudio\15.0_0ffa9891 folder as well as other folders under that.

MikhailArkhipov commented 6 years ago

Just letting all know we found the problem and we will try and get the fix into the nearest VS update.

MikhailArkhipov commented 6 years ago

Closing, expected in 15.7.3 and 15.8.3

ashokpershad commented 6 years ago

Hi!! I am facing same issue. Is there any other way around on the solution or we have to wait until next VS update?