$(visualstudiodir) changes upon starting visual studio

Kristof Nachtergaele 1 Reputation point
2021-05-06T14:45:44.77+00:00

Somehow part of the macro's used for creating paths in visual studio 2017 pro seem to be pointing to my documents folder in the onedrive folder. I'm trying to change this, so that this does not break the build, as for some reason (probably having their pc's longer than me) this does not happen for my colleagues.

I've been using vsregedit to change some settings, but when i open visual studio and close it, those changes disappear.
VsRegEdit.exe set local HKCU \ VisualStudioLocation string "%USERPROFILE%\Documents\Visual Studio 2017"
VsRegEdit.exe set local HKCU \ MyDocumentsLocation string "%USERPROFILE%\Documents"
These settings are correct if i check them after setting them, the only difference is that the %USERPROFILE% is replaced with the actual path.

But just starting up VS and closing again changes these back to the old ones with the onedrive path in them.

Anyone have any idea what might cause these changes?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,626 questions
{count} votes