Skip to content

Roslyn version for .NET Standard 🚧#1

Open
atifaziz wants to merge 1 commit into
codeFather2:masterfrom
atifaziz:roslyn-dotnet
Open

Roslyn version for .NET Standard 🚧#1
atifaziz wants to merge 1 commit into
codeFather2:masterfrom
atifaziz:roslyn-dotnet

Conversation

@atifaziz

@atifaziz atifaziz commented Feb 14, 2019

Copy link
Copy Markdown

This PR builds on top of PR KvanTTT#45 from @codeFather2 and updates the library to target .NET Standard 2.0 and tests to target .NET Core 2.1. While I realize that KvanTTT#45 is work-in-progress, I wanted to share my results and findings in case we'd like to get this merged.

Why do this?

Because there is no reason to limit the library to .NET Framework.

Summary of changes

The GUI was upgraded from .NET Framework 4.6 to 4.6.1 to neatly align with .NET Standard 2.0.

The biggest change needed was in the CompileUtils class that relied on System.CodeDom for compilation, but which is unsupported for now (see dotnet/corefx#12180). So what I did, instead, was to emulate some of the types to have the least impact on the rest of the code and instead spawn csc.exe for the real work. Its CanCompile and Compile methods were then changed to take an additional parameter that's the path to the C# compiler executable. I've also added a small batch to the root of the project called install.cmd that will download the compiler via the Microsoft.Net.Compilers package. If someone clones the repo, they have to run install.cmd. This can be improved to happen automagically if need be. However, I feel that CompileUtils should be moved out of the library project and into common code shared by the GUI and the test project that really use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant