.NET Core - Cross-Platform Code Generation with Roslyn and .NET Core RRS feed

  • General discussion

  • Alessandro Del Sole shows you how set up a C# project on .NET Core to use the Roslyn APIs. Now you can write C# code to build cross-platform Console and Web applications that run on Windows, Linux and macOS.

    Read this article in the May 2017 issue of MSDN Magazine

    Monday, May 1, 2017 3:38 PM

All replies

  • HI

    In the section of code under

    Compiling and Executing Code with Emit APIs and Reflection

    I can get the line

    var systemRefLocation=typeof(object).GetTypeInfo().Assembly.Location;

    to compile when in a VS2017 .net core 1.4 application using the Microsoft.NETCore.App sdk.

    However it does not compile when in the standard class library project using the NETStandard.Library.

    Similar issues referencing the System.Runtime.Loader assembly.

    How can I compile code from within a common class library project rather than a main application project.



    Saturday, June 3, 2017 6:45 AM