Reputation: 23
We're working in quite a large project and is having a hard time getting people to configure their Visual Studio correct (tabs instead of spaces etc.). We found a great solution in using the EditorConfig extension for Visual Studio.
However there are still some developers that seems to ignore our request to install this extension to their Visual Studio and hence I'm wondering if there is any way to force an extension to be installed before a solution can be opened, maybe some setting in the .sln file?
Upvotes: 2
Views: 2099
Reputation: 340
You can use .vsconfig! (see the video below)
The file has been around for a while, but it VS 2022 they added "extensions". (I assume they will add a nice UI to manage them at some point...)
https://www.youtube.com/watch?v=DHOA9b8rtjk
Upvotes: 0
Reputation: 114461
No there is no such option built-in. If your machines are domain joined, you could push out the installer through System Center or domain logon scripts.
You could cheat and create a solution level pre-build step. Create a target file named: before.{solutionname.sln}.targets
and store it next to your solution file. Check it into source control. In the targets file you can use standard MsBuild to see if the extension is installed (you'll need to check the file system probably) and if not present force the installation by calling vsixinstaller.exe
to trigger the install.
Upvotes: 0