private static void WriteIl2CppOutputProjectFile(
            BuildTargetGroup buildTargetGroup,
            string projectTemplate,
            string projectItems,
            string filterItems,
            string targetPath,
            string additionalDefines,
            IIl2CppPlatformProvider il2cppPlatformProvider)
        {
            string[]             buildingIl2CppArguments = IL2CPPUtils.GetBuildingIL2CPPArguments(il2cppPlatformProvider, buildTargetGroup);
            string[]             debuggerIl2CppArguments = IL2CPPUtils.GetDebuggerIL2CPPArguments(il2cppPlatformProvider, buildTargetGroup);
            string               str1               = ((IEnumerable <string>)debuggerIl2CppArguments).Any <string>() ? ((IEnumerable <string>)debuggerIl2CppArguments).Aggregate <string>((Func <string, string, string>)((x, y) => x + " " + y)) : string.Empty;
            IEnumerable <string> second             = ((IEnumerable <string>)additionalDefines.Split(';')).Select <string, string>((Func <string, string>)(d => "--additional-defines=" + d));
            string               str2               = ((IEnumerable <string>)buildingIl2CppArguments).Concat <string>(second).Aggregate <string>((Func <string, string, string>)((x, y) => x + " " + y));
            string               netProfileArgument = IL2CPPUtils.ApiCompatibilityLevelToDotNetProfileArgument(PlayerSettings.GetApiCompatibilityLevel(buildTargetGroup));
            string               str3               = ((IEnumerable <string>)IL2CPPUtils.GetBuilderDefinedDefines(il2cppPlatformProvider, buildTargetGroup)).Aggregate <string>((Func <string, string, string>)((x, y) => x + ";" + y)) + ";" + additionalDefines;
            string               contents1          = string.Format(projectTemplate, (object)projectItems, (object)str3, (object)str2, (object)netProfileArgument, (object)str1);

            FileUtil.DeleteFileOrDirectory(targetPath);
            File.WriteAllText(targetPath, contents1, Encoding.UTF8);
            string path      = targetPath + ".filters";
            string contents2 = string.Format(VisualStudioProjectHelpers.GetFiltersTemplate(), (object)filterItems);

            FileUtil.DeleteFileOrDirectory(path);
            File.WriteAllText(path, contents2, Encoding.UTF8);
        }