private string[] GetClassLibraries()
        {
            BuildTargetGroup buildTargetGroup = BuildPipeline.GetBuildTargetGroup(this.BuildTarget);

            string[] result;
            if (PlayerSettings.GetScriptingBackend(buildTargetGroup) != ScriptingImplementation.WinRTDotNET)
            {
                string        monoAssemblyDirectory = base.GetMonoProfileLibDirectory();
                List <string> list = new List <string>();
                list.AddRange(from dll in MicrosoftCSharpCompiler.GetReferencesFromMonoDistribution()
                              select Path.Combine(monoAssemblyDirectory, dll));
                if (PlayerSettings.GetApiCompatibilityLevel(buildTargetGroup) == ApiCompatibilityLevel.NET_4_6)
                {
                    string path = Path.Combine(monoAssemblyDirectory, "Facades");
                    list.Add(Path.Combine(path, "System.ObjectModel.dll"));
                    list.Add(Path.Combine(path, "System.Runtime.dll"));
                    list.Add(Path.Combine(path, "System.Runtime.InteropServices.WindowsRuntime.dll"));
                    list.Add(Path.Combine(monoAssemblyDirectory, "System.Numerics.dll"));
                    list.Add(Path.Combine(monoAssemblyDirectory, "System.Numerics.Vectors.dll"));
                }
                result = list.ToArray();
            }
            else
            {
                if (this.BuildTarget != BuildTarget.WSAPlayer)
                {
                    throw new InvalidOperationException(string.Format("MicrosoftCSharpCompiler cannot build for .NET Scripting backend for BuildTarget.{0}.", this.BuildTarget));
                }
                WSASDK wSASDK = WSASDK.UWP;
                if (wSASDK != WSASDK.UWP)
                {
                    result = Directory.GetFiles(MicrosoftCSharpCompiler.GetNETCoreFrameworkReferencesDirectory(wSASDK), "*.dll");
                }
                else
                {
                    NuGetPackageResolver nuGetPackageResolver = new NuGetPackageResolver
                    {
                        ProjectLockFile = "UWP\\project.lock.json"
                    };
                    result = nuGetPackageResolver.Resolve();
                }
            }
            return(result);
        }
        private string[] GetNETWSAAssemblies(WSASDK wsaSDK)
        {
            if (MicrosoftCSharpCompiler.GetCurrentScriptingBackend() == ScriptingImplementation.IL2CPP)
            {
                string monoAssemblyDirectory = BuildPipeline.GetMonoLibDirectory(BuildTarget.WSAPlayer);
                return((from dll in MicrosoftCSharpCompiler.GetReferencesFromMonoDistribution()
                        select Path.Combine(monoAssemblyDirectory, dll)).ToArray <string>());
            }
            if (wsaSDK != WSASDK.UWP)
            {
                return(Directory.GetFiles(MicrosoftCSharpCompiler.GetNETCoreFrameworkReferencesDirectory(wsaSDK), "*.dll"));
            }
            NuGetPackageResolver nuGetPackageResolver = new NuGetPackageResolver
            {
                ProjectLockFile = "UWP\\project.lock.json"
            };

            return(nuGetPackageResolver.Resolve());
        }
        private string[] GetNETWSAAssemblies(WSASDK wsaSDK)
        {
            if (MicrosoftCSharpCompiler.GetCurrentScriptingBackend() == ScriptingImplementation.IL2CPP)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: reference to a compiler-generated method
                return(((IEnumerable <string>)MicrosoftCSharpCompiler.GetReferencesFromMonoDistribution()).Select <string, string>(new Func <string, string>(new MicrosoftCSharpCompiler.\u003CGetNETWSAAssemblies\u003Ec__AnonStoreyB3()
                {
                    monoAssemblyDirectory = BuildPipeline.GetMonoLibDirectory(BuildTarget.WSAPlayer)
                }.\u003C\u003Em__20C)).ToArray <string>());
            }
            if (wsaSDK != WSASDK.UWP)
            {
                return(Directory.GetFiles(MicrosoftCSharpCompiler.GetNETCoreFrameworkReferencesDirectory(wsaSDK), "*.dll"));
            }
            NuGetPackageResolver resolver = new NuGetPackageResolver()
            {
                ProjectLockFile = "UWP\\project.lock.json"
            };

            for (int index = !MicrosoftCSharpCompiler.EnsureProjectLockFile(resolver) ? 1 : 2; index != 0; --index)
            {
                try
                {
                    resolver.Resolve();
                }
                catch (Exception ex)
                {
                    if (index > 1)
                    {
                        Console.WriteLine("Failed to resolve NuGet packages. Deleting \"{0}\" and retrying.", (object)Path.GetFullPath(resolver.ProjectLockFile));
                        File.Delete(resolver.ProjectLockFile);
                        MicrosoftCSharpCompiler.EnsureProjectLockFile(resolver);
                    }
                    else
                    {
                        throw;
                    }
                }
            }
            return(resolver.ResolvedReferences);
        }