One of the coolest feature in Visual Studio 2017 is the ‘Lightweight Solution Load’ which greatly reduces the Visual Studio startup time and the overall memory consumption.
However I have bumped into multiple issues working with Lightweight Solution Load feature turned ON in VS2017. In this article, I will list down few of my observations, so that you are aware of these limitations.
What is Lightweight Solution Load?
We might have all encountered the initial delay in loading big solutions with Visual Studio 2015. The ‘Lightweight Solution Load‘ feature minimizes this delay by skipping to load all the projects, when the solution is loaded. In simple words, the projects are not loaded until the time it is actually required.
Not compatible with Live Unit Testing
Once you enable Lightweight Solution Load for the entire IDE, you won’t find the option to even enable Live Unit Testing for your project.
Navigate to ‘Tools -> Options -> Projects and Solutions‘ and turn on Lightweight solution load feature, as highlighted in the diagram below —
When you click on your Test Menu now, you won’t even see the ‘Live Unit Testing’ option.
Not fully compatible with 3rd party extensions
Once you enable the Lightweight Solution Load feature, your projects are not loaded until the time it is actually required. Hence under such scenarios, if you have any 3rd party extensions like a Code Analyzer/NCrunch – which needs to scan through all your files – won’t work as expected.
The project file is loading in the background
The initial load is no doubt faster with Lightweight Solution Load feature enabled. However when you need to look at a particular file, you will have to expand the project. There will be a slight delay when the projects try to load. You will see a message saying – ‘The project file is loading in the background’. This was kind of frustrating for me after some time. The question is do I take the performance penalty hit one time right at the beginning when the solution loads, or take the hit every time I access a file inside a project!
Once you enable/disable the Lightweight Solution Load feature, it does not take effect immediately. You will need to restart your IDE or wait till the next time you reload your solution for the effect to take place. Please keep this behavior in mind – You do not want to spend time diagnosing why this feature is not working as expected – when all you need to do is restart your IDE or load your solution again.
Lightweight Solution Load is suitable for large solutions containing say over 50 projects. But with solutions having about 10-12 projects, you might think twice before enabling this feature.
There is a reason why the Lightweight Solution Load feature is turned off by default in VS2017. Having said that, these are still early days for this new feature, and I am sure it will be worked upon and enhanced by Microsoft Team in upcoming releases. If you face any other issues, make sure to use the ‘Report a Problem’ tool in the Visual Studio IDE to inform Microsoft Team regarding it, so that it can be addressed.