dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.92k stars 4.02k forks source link

Question: Allowed to redistribute .Net reference assemblies? #18821

Open fabianoliver opened 7 years ago

fabianoliver commented 7 years ago

Hi,

from a legal/licensing point of view: Am I allowed to redistribute all of .Nets reference assemblies and related files (.xml and such) instealled by the .Net Targetting Packs (i.e. files you'd find in %ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework.NETFramework )?

Quick background & why its Roslyn related at all:

I'm working on a simple Roslyn-based code editor/compiler for scripting purposes, think of an Excel VBA editor, only for C#-based AddIns. Depending on the chosen target framework and such, I will need to add certain (Metadata)references to .Net framework libraries (think of mscorlib, System, PresentationFramework etc.), and would ideally like to reference DLLs from the .Net targeting packs / reference assemblies, rather than the GAC-based versions.

The catch is that most users of the editor won't have any .Net developer pack installed on their machines, and won't be able to do so either due to a lack of admin rights.

The easiest (only?) solution to me seems like simply providing all the reference assemblies & related files as part of my editor, directly packed into it, or as downloadable plugins, and linking these ones for all users that don't already have the targeting packs installed.

Is this permissible?

tmat commented 7 years ago

@terrajobst

tmat commented 7 years ago

Related: https://github.com/dotnet/roslyn/wiki/Runtime-code-generation-using-Roslyn-compilations-in-.NET-Core-App