Visual Studio 2017 - 'Lightweight Solution Load' to shorter load time


If you have a big solution with so many projects in it, the all new 'Visual Studio 2017' provides a new feature called 'Lightweight Solution Load', that helps to reduce the solution load time and substantial improvement in memory usage.

 

Today in this blog post, we are going to discuss about this feature along with the option to enable or disable the 'Lightweight Solution Load' feature.

 

Visual Studio 2017 - 'Lightweight Solution Load' to shorter load time (www.kunal-chowdhury.com)

 

The 'Lightweight Solution Load' in Visual Studio 2017 enables you to load large Solutions faster. For large Solutions, it will not only reduce the solution load time but also improve memory usage. This feature is not enabled by default but you can enable it to a specific solution or globally in the IDE.

 

To enable the said feature globally, navigate to Tools -> Options dialog. Then expand to 'General' under the 'Projects and Solutions' tree. There you will find an option settings called 'Lightweight Solution load'. It is unchecked by default. To enable the feature, just check it and click 'OK'.

 

Visual Studio 2017 - How to enable 'Lightweight Solution Load' (www.kunal-chowdhury.com)

 

To disable the feature IDE level, follow the same steps and uncheck the 'Lightweight Solution load' checkbox. The feature can be turned on and off for individual Solutions in the Solution properties pane too.


Once you have the lightweight solution load enabled, you can open and work with your projects and solutions normally. The setting will take effect the next time when you load a Solution; restarting the IDE is not require.

 

Lightweight Solution Load is best suited for large solutions that contain C# or a mix of C# and C++ projects. You may be prompted to enable the feature if the 'Visual Studio 2017' IDE detects that you are working with large solutions.

 

 


If you have come this far, it means that you liked what you are reading. Why not reach little more and connect with me directly on Twitter, Facebook, Google+ and LinkedIn. I would love to hear your thoughts and opinions on my articles directly. Also, don't forget to share your views and/or feedback in the comment section below.

10 comments

  1. Thank you but I can't find in this article what exactly happens when I do enable that option. What are the drawbacks? Why isn't this turn on by default?

    ReplyDelete
  2. In my legacy ASP.NET MVC project enabling the option cause VS 2017 to hang in Find in Files.

    ReplyDelete
  3. Without explanations HOW it's done, this article is useless. We need to know, because drawbacks directly depends from how smart MS solution is.

    ReplyDelete
  4. Thank you so much for your valuable information.It is happy to hear that Once you have the lightweight solution load enabled, you can open and work with your projects and solutions normally. I used this visual application when i was a working as a writer at essay writing service company.

    ReplyDelete
  5. Nice post, thanks for sharing..useful information

    ReplyDelete
  6. Is there a way to DISABLE this "feature"?! It is unchecked in the options window, but the project is still loaded in the lightweight mode. Uhrghghhh... This feature is so annoying, I cannot work. I have to use VS2015 because I cannot disable it in VS2017.
    Be careful, people!

    ReplyDelete
  7. Did you find a solution? I have the same problem my solutions all load in light weight mode even though it is switched off. Find in files is now useless and and you get intellisense compiler errors everywhere, this feature is pointless for the vast majority of developers

    ReplyDelete
  8. Setting in Tools -> Options is just option for default value. To disable lightweight mode (in case you have enabled it) select solution from Solution Explorer. There is an property "Lightweight load" in properties window.

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. As I understand it, the IDE doesn't fully load any of the projects when you open the solution, or if it does it may only load the startup project. It still loads some minimal features from all the projects, and projects will still build normally, but the project contents won't show in the solution explorer until you actually expand it, or if you use "go to definition" and it takes you to one of the "unloaded" projects.

    Drawbacks (as of the 5th preview, I believe, they may be fixed in RC):

    * If a feature related to a project seems to be missing from the IDE, try expanding that project in the Solution Explorer.
    * NuGet package restore isn’t yet integrated with lightweight Solution load.
    * The Test Explorer will not see tests unless a project is fully loaded.
    * If you need to retarget or upgrade all projects in a Solution, disable Lightweight Solution load for best results.

    More info at this MSDN blog post:
    https://blogs.msdn.microsoft.com/visualstudio/2016/10/11/shorter-solution-load-time-in-visual-studio-15/

    ReplyDelete

 
© 2008-2017 Kunal-Chowdhury.com - Microsoft Technology Blog for developers and consumers | Designed by Kunal Chowdhury
Back to top