Skip to main content Skip to footer

Using Lightweight Solution Load and Code Style Configuration in Visual Studio 2017

As you most likely know, Visual Studio 2017 was launched on March 7 with many great new features. In a recent Q&A, Microsoft Technical Evangelist for Developer Experience Robert Green says that his two favorite new features are the Lightweight Solution Load and the custom code style configuration. Let's look at each of those features.

Lightweight Solution Load

Do you ever wish that loading your solution took less time? It seems absurd to have to wait as long as you do when you only need to access one project. With Visual Studio 2017's Lightweight Solution Load, you can load a solution without fully loading all of the projects. With this feature turned on, you don't need to have every project fully loaded in order to do things such as navigate through the code, build the solution, or make code changes across projects. The projects load as needed, so this saves a ton of time, especially with more complex solutions. The Visual Studio blog details some of the load performance here: https://blogs.msdn.microsoft.com/visualstudio/2016/10/11/shorter-solution-load-time-in-visual-studio-15/ Solution-Load-Time The gains in productivity should be significant if you don't generally need to load all of the projects. The only downside is the potential for the unloaded projects loading later on, but that doesn't seem like a big enough negative to warrant not using the feature. To enable Lightweight Solution Load globally, go to Tools -> Options -> Projects and Solutions -> General. Check Lightweight Solution Load.

Code Style Configuration

All developers are different. Many developers have different ideas as to how to style their code. With Visual Studio 2017, you can configure rules to enforce a particular style. As Green writes, "So using the Options dialog, you can specify that interface names should start with a capital I, that braces should be on new lines for methods but not for properties, that you should use var for built-in types or when the type is obvious. What this means is that you can define for yourself what readable code looks like and Visual Studio will help you." The implications are huge and the benefits are easy to see. Using Visual Studio 2017's code style configuration will help teams stick to a particular standard and make their code uniformly styled across the board. This creates cleaner code and, like the Lightweight Solution Load, it saves time. Developers no longer have to figure out other developers' personal styles when they look at their code for the first time. They'll simply be able to read the code, and they'll already have their bearings. With this new version of Visual Studio, the time it takes to write code and the time it takes to interpret others' code will be potentially significantly reduced. This new release introduces support for the open source file format, EditorConfig, which checks files into source control to help the enforcement of code style conventions live within the code editor. To see an excellent example of this in action for the Visual Studio 2017 RC, check out this blog post: https://blogs.msdn.microsoft.com/dotnet/2016/12/15/code-style-configuration-in-the-vs2017-rc-update/

Conclusion

I recommend these two features to a team that has many projects or many developers and need a boost in productivity. Both of these features have positives that outweigh the drawbacks and should be considered by anyone using Visual Studio 2017. Check out more of what Visual Studio 2017 has to offer here: https://www.visualstudio.com/vs/whatsnew/

MESCIUS inc.

comments powered by Disqus