daveaglick / Scripty

Tools to let you use Roslyn-powered C# scripts for code generation
MIT License
620 stars 69 forks source link

Component cache doesn't get reset after installing Scripty extension in Visual Studio 2017 update 2 #99

Open coldacid opened 7 years ago

coldacid commented 7 years ago

After installing the Scripty extension in VS 2017.2, the VS package responsible for project loading and management fails to load, as the VS component cache is not reset or updated. Deleting the ComponentModelCache directory in %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_* causes the cache to be rebuilt on next launch of Visual Studio, after which everything works fine again.

daveaglick commented 7 years ago

I've had issues on and off with the VS 2017 component cache. Your fix is the exact same one I finally stumbled on and use. Unfortunately I'm not sure if it's a problem with the way I'm building the VSIX, and if it is, how to fix it. If you or anyone else out there has any insights into the cause, I'd be grateful.

naasking commented 6 years ago

There are additional issues as well. I disabled the extension to keep working, then found this ticket. I deleted the component cache, restarted VS 2017 and re-enabled Scripty, then restarted VS again. The Scripty extension had then disappeared.

I just went through the whole process again this time without disabling Script, ie. installing the extension, deleting the cache, restarting VS, and Scripty extension still isn't installed. So I'm not sure what's going on there.

naasking commented 6 years ago

I figured out that I had deleted too much in that folder, so the extension now stays, but Scripty still doesn't run and generate output as a VS 2017 extension. Not even after I select "run custom tool". Looks like nothing happens, so I'm not sure where to even start debugging this.

daveaglick commented 6 years ago

Note that I’m in the midst of reworking everything (it’s a WIP on a branch). Once that’s done I’m hoping we’ll be able to go through and clean up a bunch of these issues.