microsoft / RTVS

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

Recent VS update killed R Tools plugin #4317

Closed Ilia-Kosenkov closed 6 years ago

Ilia-Kosenkov commented 6 years ago

After a standard procedure of installing new updates - as prompted in notifications - pretty much every single operation that R Tools performs and that involves file manipulations - fails. So far it is confirmed on two different x64 machines with the same update, but different set of installed tools (both however include at least .NET & RTVS tools).

R Tools is 1.3.40402.1027. Studio is 15.7.1.

The exception thrown displays a MessageBox with following string: "Could not load file or assembly 'Microsoft.Extensions.FileSystemGlobbing, Version=1.0.1.0, Culture = neutral, PublicKeyToken = adb9793829ddae60' or one of its dependencies. The system cannot find the file specified."

This message is generated by every shortcut command available through icons in the interactive window (like Reset, Source files, attach debugger, etc), by almost all subitems of "R Tools" menu in the main window Menu Bar (I did not check every single option, but out of all checked every single one displayed error message and did nothing). Same goes for all the hotkeys I use (like simple Ctrl + Shift + S).

R session seems to be fine, all commands entered directly into the command prompt or through sourcing an *.R file appear to work, plots are generated and displayed in the R Plot window.

All other menu items and options not related to RTVS work fine, at least one other .NET Framework project loads, compiles, and runs without any errors and VS accepts all hotkeys. So the issue is related to RTVS plugin.

Here is a screenshot:

rtvs_bug

Ilia-Kosenkov commented 6 years ago

The RTVS installation folder contains Microsoft.Extensions.FileSystemGlobbing dll, but version is 1.1.0. If I replace it by the same dll with version 1.0.1, as the one mentioned in the initial post, RTVS wont even connect to the R session and now every single action complains that there is no dll with version 1.1.0.0 (same error message).

It feels like different parts of the plugin use different versions of the lib (1.0.1 and 1.1.0), but only one version is shipped with the extension (at least listed in the installation folder), which in turn causes this problem.

And here 1f16eb491345d96047fb650215114ae0d79576a0 there are conditional assembly references, and for net46 Microsoft.Extensions.FileSystemGlobbing is v 1.0.1, while for netstandard1.6 it is v 1.1.0, don't know if it is related to my issue, but looks like it can cause that problem.

MikhailArkhipov commented 6 years ago

4312, @AlexanderSher is working on it

jorgethomasm commented 6 years ago

I am having the same issue here:

vs_error_filesystemglobbing

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.

saTrilogy commented 6 years ago

I have this with Microsoft Visual Studio Community 2017 Version 15.7.2 VisualStudio.15.Release/15.7.2+27703.2018 and R Tools for Visual Studio 1.3.40402.1027 (as of today) so I presume the update is still forthcoming.

MikhailArkhipov commented 6 years ago

Yes, it is going to 15.7.3 and 15.8.3

MikhailArkhipov commented 6 years ago

Closing, expected in 15.7.3 and 15.8.3

KangOxford commented 6 years ago

thank you, I hope our trouble will be solved in the latest visual studio

XiaomoWu commented 6 years ago

How close are we to the nearest patch? In days or weeks or months? This bug is really annoying!

Ilia-Kosenkov commented 6 years ago

I would also like to know if there is a way to accelerate things. Is it already available in the preview version of VS? I also tried to build plugin from source, but had some issues with e.g MSYS2 (the instructions are not up to date) and eventually I failed to debug it. It is also hard to revert back to other tools like RStudio, because it turns out RTVS has so many nice little features that make the development process much easier (for me) compared to other IDEs/editors. I hope we can get the update soon.

MikhailArkhipov commented 6 years ago

@FinTechNJU - https://www.visualstudio.com/vs/preview/ is 15.8. However, it does not have 15.8.3 yet, current is 15.8 Preview 2

For some people installing .NET 4.7 + C# workload fixed assembly loading issue.

Masutani commented 6 years ago

Hi I suffer this issue from last update. But still using RTVS only with R interactive :) Any instant work around for this ? I tried refreshing vs by installer and clear component cache or .NET 4.7 but no effect on the issue.

MikhailArkhipov commented 6 years ago

15.7.3 is live

CarlosCaPe commented 6 years ago

I have installed the Version 15.7.3 and.... the problem is still there :(

Ilia-Kosenkov commented 6 years ago

I can confirm that on three different machines (1709 and 1803) 15.7.3 solved the problem (or at least the majority of problems, the tools I use do not produce error message boxes as described in the original post) and everything seems to work fine.

MikhailArkhipov commented 6 years ago

@CarlosCaPe - try resetting VS fully.

Masutani commented 6 years ago

I confirmed this "FileSystemGlobbing" error issue solved by just updating 15.7.2 to 15.7.3 in my environment. Thank you !

RafalLukawiecki commented 6 years ago

I can confirm that just upgrading from 15.7.2 to 15.7.3 does not fix the problem for me. I will try the full reset procedure. I have tried this on several different VMs.

MikhailArkhipov commented 6 years ago

@RafalLukawiecki - try installing .NET 4.7.2

RafalLukawiecki commented 6 years ago

@MikhailArkhipov, installing .NET 4.7.2 has fixed the issue, and RTVS no longer crashes VS 15.7.3. Thank you, very much, for your speedy help, much appreciated.

JPablo9 commented 5 years ago

I have installed the Version 15.8.8 and I can not load R tools, I can't see the R interactive window