Thursday, December 28, 2017

Visual Studio 2015 VSIX Project Stopped Working

Yesterday I opened up a VSIX project to add a new feature. This is a Visual Studio 2015 project that I hadn't worked on in a few months. It worked fine a few months ago, but now, all of the sudden, it wouldn't build. What's going on?

The error message I was getting stated:

"Cannot find wrapper assembly for type library "EnvDTE100". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component."

After Googling, I found from this site that if you install Visual Studio 2017 on your machine, it will affect your references to the EnvDTE assemblies. I had recently installed VS 2017. Thankfully, the site also contained the solution:

"In old VSIX projects: Remove old COM references to EnvDTE, EnvDTE80, EnvDTE90 and EnvDTE100. Add new references using Assemblies | Extensions tab and select EnvDTE, EnvDTE80, EnvDTE90, EnvDTE100. The project should build now."

I updated my references and everything started working again.

Tuesday, May 9, 2017

Deleting Files in Visual Studio/TFS Taking a Long Time

I needed to delete some files from source control and noticed that it was taking Visual Studio/TFS about 30 seconds to delete a file (move it to the delete pending list). Since I needed to delete a lot of files, you can imagine how annoying this was. So, I fired up good old Process Monitor and started watching devenv.exe. Then I went into Source Control explorer and deleted a file. Suddenly Process Monitor was full of folder accesses. Dozens of folders were being scanned. After some research, it turned out that when I deleted a file for some reason Visual Studio was looking through all the folders in the same workspace as the file.

So, I created a new workspace and put my project and only that project in the workspace. Now when I try to delete a file it happens very quickly.
Lesson learned.