Wednesday, October 11, 2017

Fixing VS 2015 "buggy 'make console/win32 app' dialogs"

For some reason, this week, I wasn't able to make a Win32 pure or console application in VS2015. When I tried to type in a Project Name and a Solution Name (I was making a new solution at the time, with "Create directory for solution" checked.), I clicked ok, the dialog would disappear, but then reappear again (the same one).

I googled online. The only thing I found was this reddit post. There was no accepted solution. I found on my own that going to the "Programs and Features" window in the Control Panel, clicking my VS 2015 installation, clicking "Change", and clicking "Repair" in the VS installation dialog. VS apparently did a fresh reinstall, and it worked again.

=====
That worked for me in the first go, but the problem was that I was getting warnings that VS 2015 Redistributable (both x86 and x64 versions) were already installed. At face value, that's logically okay. As long as they existed, VS 2015 would run, but for some reason they weren't listed in my "Programs and Features" window, which was really mysterious to me.

I did a lot of searching about this. I found this forum post with an accepted answer saying that VS 2017 (which I had on my computer at the time, probably because of Unity) installs VS 2017 Redistributables with it that is sort of a "in-place upgrade" (I'm interpreting it as "minor upgrade") over the VS 2015 ones. It seems that registry keys may contribute to some installation programs interpreting the VS 2017 Redistributables as 2015 ones, causing the warnings in my VS 2015 re-installation. It'd also explain why no VS 2015 Redistributables were found in my "Programs and Features"; they were listed as the 2017 ones I'm guessing.

I uninstalled VS 2015 again. Unity and VS 2017 (probably didn't have to uninstall Unity, just wanted to be safe here). I uninstalled the 2017 Redistributables. I didn't manually install the 2015 redistributables here. I just ran the VS 2015 installer and let it install them for me. Everything was successful, and the 2015 redistributables were showing again for me.

Interestingly, I got Unity installed again on my laptop too. I don't remember clicking an option for that. Maybe it's automatic for VS 2015 installs since there is VS integration in Unity.

=====
The last thing I wanted to note here is getting Visual Studio installation logs. When I originally got the redistributable warnings, I didn't save a screen shot. I wanted to look at them again. I found this microsoft site about something called the "Microsoft Visual Studio and .NET Framework Log Collection Tool", which searches for VS installation logs and other installation logs, and puts it in a .zip folder.

I ran the too, got a zip, extracted it, and used the "Agent Ransack" search program to look for keywords I remembered from the redistributable warnings. One of the files was called:

dd_patch_KB3165756_20171006121844.log

The text of interest I found was:
[1608:0BB8][2017-10-06T12:24:55]i000: MUX:  Sending package issue to the caller: Type=2 Package Name=Microsoft Visual C++ 2015 Redistributable (x86) - 14.0.24215 Message=Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel. Error Code=-2147023258 (0x80070666)

[1608:0BB8][2017-10-06T12:24:55]i000: MUX:  Sending package issue to the caller: Type=2 Package Name=Microsoft Visual C++ 2015 Redistributable (x64) - 14.0.24215 Message=Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel. Error Code=-2147023258 (0x80070666)

(I added a newline between the two messages for easier reading.)

I think I got other hits, but this is the one I saved.

No comments:

Post a Comment