I'm trying to make use of Roslyn in my application. I added the NuGet package for that (Microsoft.CodeAnalysis.CSharp
). It turns out that this package depends on many others:
Most of them seem unused on the .NET Framework (e.g. System.Runtime
which provides types such as Int32
).
There is an incredible contrast between the size of those packages and what is actually being used. A lot of the data appear to be translations:
(I'm not saying someone did a bad job here. I'm not competent enough to make that determination. I just want to find out how to deal with this, see below.)
It seems like a bad idea to check all of that in to source control. If I update those packages every few months then then repository will bloat by gigabytes from all those files over time. I'm also worried about IDE speed and frankly about confusing myself in this huge sea of packages.
Package restore cannot be used due to security concerns and reliance on another company's ongoing service for our source code to be able to build. By "other company" I mean that I need to trust Microsoft and the package authors to be available at all times, not send me a virus and not remove old versions causing my app to break. If I download just once, or every few month, the exposure is greatly reduced.
How would I best minimize the source control impact of using Roslyn?
I really hope I will be able to put the packages into source control. I hope there is a way to remove all the packages I don't need and restrict them to what ends up in the bin folder.