Generate .NET Standard 2.0 DLL using Roslyn?

Dec 13 2017 2:47 AM
I am chipping away at an administration which, given a URL to a Swagger definition, utilizes NSwag to create a C# Proxy for the Service. The whole intermediary is contained inside a solitary C# record.
I might want to incorporate the created code into a DLL utilizing Roslyn that is perfect with.NET Standard 2.0.
To affirm this is conceivable, I have made a .NET Standard 2.0 class library venture in Visual Studio 2017 and included NuGet conditions for Newtonsoft.Json (10.0.3) and System.ComponentModel.Annotations (4.4.0). I can see that the task sort likewise acquires a SDK reliance on NETStandard.Library.
I comprehend that I won't utilize an undertaking record to create the DLL with Roslyn, in any case, I am attempting to make sense of the comparable strides to take to produce the same DLL.