Ejemplo n.º 1
0
 public void ToFsprojProperties(XmlWriter writer)
 {
     if (BaseAddress.HasValue)
     {
         writer.WriteElementString("BaseAddress", "0x" + BaseAddress.Value.ToString("X", CultureInfo.InvariantCulture));
     }
     if (CodePage != null)
     {
         writer.WriteElementString("CodePage", CodePage);
     }
     writer.WriteElementString("DebugSymbols", XmlConvert.ToString(DebugSymbols));
     writer.WriteElementString("DebugType", Debug.ToString().ToLowerInvariant());
     if (Defines != null)
     {
         writer.WriteElementString("DefineConstants", string.Join(";", Defines));
     }
     if (DocOutput != null)
     {
         writer.WriteElementString("DocumentationFile", DocOutput);
     }
     writer.WriteElementString("HighEntropyVA", XmlConvert.ToString(HighEntropyVirtualAddressSpace));
     if (KeyFile != null)
     {
         writer.WriteElementString("KeyOriginatorFile", KeyFile);
     }
     if (SuppressedWarnings != null)
     {
         writer.WriteElementString("NoWarn",
                                   String.Join(";", SuppressedWarnings.Select(warn => warn.ToString(CultureInfo.InvariantCulture))));
     }
     writer.WriteElementString("Optimize", XmlConvert.ToString(Optimize));
     writer.WriteElementString("Tailcalls", XmlConvert.ToString(Tailcalls));
     writer.WriteElementString("PlatformTarget", Platform.ToString().ToLowerInvariant());
     writer.WriteElementString("WarningLevel", XmlConvert.ToString((int)WarningLevel));
     writer.WriteElementString("TreatWarningsAsErrors", XmlConvert.ToString(AllWarningsAsError));
     if (SpecificWarningsAsError != null)
     {
         writer.WriteElementString("WarningsAsErrors",
                                   String.Join(";", SpecificWarningsAsError.Select(warn => warn.ToString(CultureInfo.InvariantCulture))));
     }
     if (OtherFlags != null)
     {
         writer.WriteElementString("OtherFlags", OtherFlags);
     }
 }
        public void ToVcxprojProperties(XmlWriter writer)
        {
            if (AreAdditionalIncludeDirectoriesSpecified && AdditionalIncludeDirectories.Length > 0)
            {
                writer.WriteElementString("AdditionalIncludeDirectories", string.Join(";", AdditionalIncludeDirectories));
            }
            if (AreAdditionalOptionsSpecified && AdditionalOptions.Length > 0)
            {
                writer.WriteElementString("AdditionalOptions", string.Join(";", AdditionalOptions));
            }
            if (AreAdditionalUsingDirectoriesSpecified && AdditionalUsingDirectories.Length > 0)
            {
                writer.WriteElementString("AdditionalUsingDirectories", string.Join(";", AdditionalUsingDirectories));
            }
            if (IsAssemblerListingLocationSpecified)
            {
                writer.WriteElementString("AssemblerListingLocation", AssemblerListingLocation);
            }
            writer.WriteElementString("AssemblerOutput", (IsAssemblerOutputSpecified ? AssemblerOutput : AssemblerOutputType.NoListing).ToString());
            if (IsBasicRuntimeChecksSpecified && BasicRuntimeChecks != RuntimeCheckType.Default)
            {
                writer.WriteElementString("BasicRuntimeChecks", BasicRuntimeChecks.ToString());
            }
            if (IsBrowseInformationFileSpecified)
            {
                writer.WriteElementString("BrowseInformationFile", BrowseInformationFile);
            }
            writer.WriteElementString("BufferSecurityCheck", XmlConvert.ToString(!IsBufferSecurityCheckSpecified || BufferSecurityCheck));
            writer.WriteElementString("CallingConvention", (IsCallingConventionSpecified ? CallingConvention : CallingConvention.Cdecl).ToString());
            if (IsCompileAsSpecified && CompileAs != CLanguage.Default)
            {
                writer.WriteElementString("CompileAs", CompileAs.ToString());
            }
            writer.WriteElementString("CompileAsManaged", CompileAsManagedToString(IsCompileAsManagedSpecified ? CompileAsManaged : ManagedCppType.NotManaged));
            writer.WriteElementString("CreateHotpatchableImage", XmlConvert.ToString(IsCreateHotpatchableImageSpecified && CreateHotpatchableImage));
            if (IsDebugInformationFormatSpecified && DebugInformationFormat != DebugInformationFormat.None)
            {
                writer.WriteElementString("DebugInformationFormat", DebugInformationFormat.ToString());
            }
            else
            {
                writer.WriteElementString("DebugInformationFormat", (suite.ActiveGoal.Has(Suite.DebugGoal.Name)
                    ? DebugInformationFormat.EditAndContinue
                    : DebugInformationFormat.None).ToString());
            }
            writer.WriteElementString("DisableLanguageExtensions", XmlConvert.ToString(IsDisableLanguageExtensionsSpecified && DisableLanguageExtensions));
            WriteStringArray(writer, "DisableSpecificWarnings", AreSuppressedWarningsSpecified ? SuppressedWarnings.Select(warn => warn.ToString(CultureInfo.InvariantCulture)).ToArray() : new string[0]);
            if (IsEnableEnhancedInstructionSetSpecified && EnableEnhancedInstructionSet != EnhancedInstructionSet.None)
            {
                writer.WriteElementString("EnhancedInstructionSet", EnableEnhancedInstructionSet.ToString());
            }
            else
            {
                writer.WriteElementString("EnhancedInstructionSet", (EnhancedInstructionSet.SSE2).ToString());
            }
            writer.WriteElementString("EnableFiberSafeOptimizations", XmlConvert.ToString(IsEnableFiberSafeOptimizationsSpecified && EnableFiberSafeOptimizations));
            writer.WriteElementString("CodeAnalysis", XmlConvert.ToString(!IsCodeAnalysisSpecified || CodeAnalysis));
            if (IsExceptionHandlingSpecified && ExceptionHandling != ExceptionHandlingType.NotSpecified)
            {
                writer.WriteElementString("ExceptionHandling", ExceptionHandling.ToString());
            }
            writer.WriteElementString("ExpandAttributedSource", XmlConvert.ToString(IsExpandAttributedSourceSpecified && ExpandAttributedSource));
            writer.WriteElementString("FavorSizeOrSpeed", (IsFavorSpecified ? Favor : OptimizationFavor.Speed).ToString());
            writer.WriteElementString("FloatingPointExceptions", XmlConvert.ToString(!IsFloatingPointExceptionsSpecified || FloatingPointExceptions));
            writer.WriteElementString("FloatingPointModel", (IsFloatingPointModelSpecified ? FloatingPointModel : FloatingPointModel.Precise).ToString());
            writer.WriteElementString("ForceConformanceInForLoopScope", XmlConvert.ToString(IsForceConformanceInForLoopScopeSpecified && ForceConformanceInForLoopScope));
            WriteStringArray(writer, "ForcedUsingFiles", AreForcedUsingFilesSpecified ? ForcedUsingFiles : new string[0]);
            writer.WriteElementString("FunctionLevelLinking", XmlConvert.ToString(IsFunctionLevelLinkingSpecified && FunctionLevelLinking));
            writer.WriteElementString("GenerateXMLDocumentationFiles", XmlConvert.ToString(IsGenerateXMLDocumentationFilesSpecified && GenerateXMLDocumentationFiles));
            writer.WriteElementString("IgnoreStandardIncludePath", XmlConvert.ToString(IsIgnoreStandardIncludePathSpecified && IgnoreStandardIncludePath));
            if (IsInlineFunctionExpansionSpecified && InlineFunctionExpansion != InlineExpansion.Default)
            {
                writer.WriteElementString("InlineFunctionExpansion", InlineFunctionExpansion.ToString());
            }
            writer.WriteElementString("IntrinsicFunctions", XmlConvert.ToString(IsIntrinsicFunctionsSpecified && IntrinsicFunctions));
            writer.WriteElementString("MinimalRebuild", XmlConvert.ToString(!IsMinimalRebuildSpecified || MinimalRebuild));
            writer.WriteElementString("MultiProcessorCompilation", XmlConvert.ToString(!IsMultiProcessorCompilationSpecified || MultiProcessorCompilation));
            writer.WriteElementString("OmitDefaultLibName", XmlConvert.ToString(IsOmitDefaultLibNameSpecified && OmitDefaultLibName));
            writer.WriteElementString("OmitFramePointers", XmlConvert.ToString(IsOmitFramePointersSpecified && OmitFramePointers));
            writer.WriteElementString("OpenMPSupport", XmlConvert.ToString(IsOpenMPSupportSpecified && OpenMPSupport));
            writer.WriteElementString("Optimization",
                                      (IsOptimizationSpecified
                    ? Optimization
                    : suite.ActiveGoal.Has(Suite.DebugGoal.Name)
                        ? OptimizationLevel.Disabled
                        : OptimizationLevel.Full).ToString());

            string[] defines;
            if (AreDefinesSpecified)
            {
                defines = Defines;
            }
            else
            {
                defines = suite.ActiveGoal.Has(Suite.DebugGoal.Name)
                          ? new[] { "_DEBUG" }
            }
            : new[] { "NDEBUG" };
            WriteStringArray(writer, "PreprocessorDefinitions", defines);

            if (ProcessorNumber.HasValue)
            {
                writer.WriteElementString("ProcessorNumber", ProcessorNumber.Value.ToString(CultureInfo.InvariantCulture));
            }

            writer.WriteElementString("RuntimeLibrary",
                                      (IsRuntimeLibrarySpecified
                    ? RuntimeLibrary
                    : suite.ActiveGoal.Has(Suite.DebugGoal.Name)
                        ? RuntimeLibraryType.MultiThreadedDebugDLL
                        : RuntimeLibraryType.MultiThreadedDLL).ToString());
            writer.WriteElementString("RuntimeTypeInfo", XmlConvert.ToString(!IsRuntimeTypeInfoSpecified || RuntimeTypeInfo));
            writer.WriteElementString("SmallerTypeCheck", XmlConvert.ToString(IsSmallerTypeCheckSpecified ? SmallerTypeCheck : suite.ActiveGoal.Has(Suite.DebugGoal.Name)));
            writer.WriteElementString("StringPooling", XmlConvert.ToString(!IsStringPoolingSpecified || StringPooling));
            if (StructMemberAlignment.HasValue)
            {
                writer.WriteElementString("StructMemberAlignment", StructMemberAlignment.Value.ToString(CultureInfo.InvariantCulture));
            }
            writer.WriteElementString("TreatWarningAsError", XmlConvert.ToString(IsAllWarningsAsErrorSpecified && AllWarningsAsError));
            WriteStringArray(writer, "SpecificWarningsAsError", AreSpecificWarningsAsErrorSpecified ? SpecificWarningsAsError.Select(warn => warn.ToString(CultureInfo.InvariantCulture)).ToArray() : new string[0]);
            writer.WriteElementString("TreatWCharTAsBuiltInType", XmlConvert.ToString(!IsTreatWCharTAsBuiltInTypeSpecified || TreatWCharTAsBuiltInType));
            writer.WriteElementString("UndefineAllPreprocessorDefinitions", XmlConvert.ToString(IsUndefineAllPreprocessorDefinitionsSpecified && UndefineAllPreprocessorDefinitions));
            WriteStringArray(writer, "UndefinePreprocessorDefinitions", AreUndefinePreprocessorDefinitionsSpecified ? UndefinePreprocessorDefinitions : new string[0]);
            writer.WriteElementString("WarningLevel", WarningLevelToString(IsWarningLevelSpecified ? WarningLevel : CppWarningLevel.All));
            writer.WriteElementString("WholeProgramOptimization", XmlConvert.ToString(IsWholeProgramOptimizationSpecified ? WholeProgramOptimization : suite.ActiveGoal.Has(Suite.ReleaseGoal.Name)));
            writer.WriteElementString("ProgramDataBaseFileName", PDBFileName);
        }
Ejemplo n.º 3
0
 public void ToCsprojProperties(XmlWriter writer)
 {
     if (BaseAddress.HasValue)
     {
         writer.WriteElementString("BaseAddress", "0x" + BaseAddress.Value.ToString("X", CultureInfo.InvariantCulture));
     }
     writer.WriteElementString("CheckForOverflowUnderflow", XmlConvert.ToString(Checked));
     if (CodePage != null)
     {
         writer.WriteElementString("CodePage", CodePage);
     }
     writer.WriteElementString("DebugType", Debug.ToString().ToLowerInvariant());
     if (Defines != null)
     {
         writer.WriteElementString("DefineConstants", string.Join(";", Defines));
     }
     writer.WriteElementString("DelaySign", XmlConvert.ToString(DelaySign));
     if (DocOutput != null)
     {
         writer.WriteElementString("DocumentationFile", DocOutput);
     }
     if (FileAlign.HasValue)
     {
         writer.WriteElementString("FileAlignment", XmlConvert.ToString(FileAlign.Value));
     }
     writer.WriteElementString("HighEntropyVA", XmlConvert.ToString(HighEntropyVirtualAddressSpace));
     if (KeyContainer != null)
     {
         writer.WriteElementString("KeyContainerName", KeyContainer);
     }
     if (KeyFile != null)
     {
         writer.WriteElementString("KeyOriginatorFile", KeyFile);
     }
     writer.WriteElementString("LangVersion", ToParameter(LanguageVersion));
     if (MainClass != null)
     {
         writer.WriteElementString("StartupObject", MainClass);
     }
     if (NoStdLib)
     {
         writer.WriteElementString("NoCompilerStandardLib", XmlConvert.ToString(NoStdLib));
     }
     if (SuppressedWarnings != null)
     {
         writer.WriteElementString("NoWarn",
                                   String.Join(";", SuppressedWarnings.Select(warn => warn.ToString(CultureInfo.InvariantCulture))));
     }
     writer.WriteElementString("NoWin32Manifest", XmlConvert.ToString(NoWin32Manifest));
     writer.WriteElementString("Optimize", XmlConvert.ToString(Optimize));
     writer.WriteElementString("PlatformTarget", Platform.ToString().ToLowerInvariant());
     if (PreferredUILang != null)
     {
         writer.WriteElementString("PreferredUILang", PreferredUILang);
     }
     if (SubsystemVersion != null)
     {
         writer.WriteElementString("SubsystemVersion", SubsystemVersion);
     }
     writer.WriteElementString("AllowUnsafeBlocks", XmlConvert.ToString(Unsafe));
     writer.WriteElementString("WarningLevel", XmlConvert.ToString((int)WarningLevel));
     writer.WriteElementString("TreatWarningsAsErrors", XmlConvert.ToString(AllWarningsAsError));
     if (SpecificWarningsAsError != null)
     {
         writer.WriteElementString("WarningsAsErrors",
                                   String.Join(";", SpecificWarningsAsError.Select(warn => warn.ToString(CultureInfo.InvariantCulture))));
     }
     if (RootNamespace != null)
     {
         writer.WriteElementString("RootNamespace", RootNamespace);
     }
 }
Ejemplo n.º 4
0
        public void ToFsprojProperties(XmlWriter writer)
        {
            if (BaseAddress.HasValue)
            {
                writer.WriteElementString("BaseAddress", "0x" + BaseAddress.Value.ToString("X", CultureInfo.InvariantCulture));
            }
            if (IsCodePageSpecified)
            {
                writer.WriteElementString("CodePage", CodePage);
            }
            writer.WriteElementString("DebugSymbols",
                                      XmlConvert.ToString(IsDebugSymbolsSpecified ? DebugSymbols : suite.ActiveGoal.Has(Suite.DebugGoal.Name)));

            var debug = IsDebugSpecified
                ? Debug
                : suite.ActiveGoal.Has(Suite.DebugGoal.Name) ? DebugLevel.Full : DebugLevel.None;

            writer.WriteElementString("DebugType", debug.ToString().ToLowerInvariant());

            if (AreDefinesSpecified)
            {
                writer.WriteElementString("DefineConstants", string.Join(";", Defines));
            }

            if (IsDocOutputSpecified)
            {
                writer.WriteElementString("DocumentationFile", DocOutput);
            }

            if (IsHighEntropyVirtualAddressSpaceSpecified)
            {
                writer.WriteElementString("HighEntropyVA", XmlConvert.ToString(HighEntropyVirtualAddressSpace));
            }

            if (IsKeyFileSpecified)
            {
                writer.WriteElementString("KeyOriginatorFile", KeyFile);
            }

            if (AreSuppressedWarningsSpecified)
            {
                writer.WriteElementString("NoWarn",
                                          String.Join(";", SuppressedWarnings.Select(warn => warn.ToString(CultureInfo.InvariantCulture))));
            }

            writer.WriteElementString("Optimize",
                                      XmlConvert.ToString(IsOptimizeSpecified ? Optimize : suite.ActiveGoal.Has(Suite.ReleaseGoal.Name)));
            writer.WriteElementString("Tailcalls",
                                      XmlConvert.ToString(IsTailcallsSpecified ? Tailcalls : suite.ActiveGoal.Has(Suite.ReleaseGoal.Name)));

            CLRPlatform platform;

            if (IsPlatformSpecified)
            {
                platform = Platform;
            }
            else if (suite.ActiveGoal.Has("x86"))
            {
                platform = CLRPlatform.x86;
            }
            else if (suite.ActiveGoal.Has("x64"))
            {
                platform = CLRPlatform.x64;
            }
            else
            {
                platform = CLRPlatform.AnyCPU;
            }
            writer.WriteElementString("PlatformTarget", platform.ToString().ToLowerInvariant());

            writer.WriteElementString("WarningLevel",
                                      XmlConvert.ToString((int)(IsWarningLevelSpecified ? WarningLevel : WarningLevel.All)));

            writer.WriteElementString("TreatWarningsAsErrors", XmlConvert.ToString(IsAllWarningsAsErrorSpecified && AllWarningsAsError));
            if (AreSpecificWarningsAsErrorSpecified)
            {
                writer.WriteElementString("WarningsAsErrors",
                                          String.Join(";", SpecificWarningsAsError.Select(warn => warn.ToString(CultureInfo.InvariantCulture))));
            }
            if (AreOtherFlagsSpecified)
            {
                writer.WriteElementString("OtherFlags", OtherFlags);
            }

            var targetFrameworkVersion = IsTargetFrameworkVersionSpecified
               ? TargetFrameworkVersion
               : FrameworkVersion.v4;

            writer.WriteElementString("TargetFrameworkVersion", ToFrameworkVersion(targetFrameworkVersion));

            var targetFrameworkProfile = IsTargetFrameworkProfileSpecified
                ? TargetFrameworkProfile
                : FrameworkProfile.Default;

            writer.WriteElementString("TargetFrameworkProfile", ToFrameworkProfile(targetFrameworkProfile));

            writer.WriteStartElement("MinimumVisualStudioVersion");
            writer.WriteAttributeString("Condition", "'$(MinimumVisualStudioVersion)' == '11.0'");
            writer.WriteString("11");
            writer.WriteEndElement();
        }
Ejemplo n.º 5
0
        public void ToCsprojProperties(XmlWriter writer)
        {
            if (BaseAddress.HasValue)
            {
                writer.WriteElementString("BaseAddress", "0x" + BaseAddress.Value.ToString("X", CultureInfo.InvariantCulture));
            }

            writer.WriteElementString("CheckForOverflowUnderflow", XmlConvert.ToString(IsCheckedSpecified && Checked));

            if (IsCodePageSpecified)
            {
                writer.WriteElementString("CodePage", CodePage);
            }

            DebugLevel debug;

            if (IsDebugSpecified)
            {
                debug = Debug;
            }
            else if (suite.ActiveGoal.Has(Suite.DebugGoal.Name))
            {
                debug = DebugLevel.Full;
            }
            else
            {
                debug = DebugLevel.None;
            }
            writer.WriteElementString("DebugType", debug.ToString().ToLowerInvariant());

            string[] defines;
            if (AreDefinesSpecified)
            {
                defines = Defines;
            }
            else if (suite.ActiveGoal.Has(Suite.DebugGoal.Name))
            {
                defines = new[] { "DEBUG" }
            }
            ;
            else
            {
                defines = new string[0];
            }
            writer.WriteElementString("DefineConstants", string.Join(";", defines));

            writer.WriteElementString("DelaySign", XmlConvert.ToString(IsDelaySignSpecified && DelaySign));

            if (IsDocOutputSpecified)
            {
                writer.WriteElementString("DocumentationFile", DocOutput);
            }

            if (FileAlign.HasValue)
            {
                writer.WriteElementString("FileAlignment", XmlConvert.ToString(FileAlign.Value));
            }

            writer.WriteElementString("HighEntropyVA", XmlConvert.ToString(IsHighEntropyVirtualAddressSpaceSpecified && HighEntropyVirtualAddressSpace));

            if (IsKeyContainerSpecified)
            {
                writer.WriteElementString("KeyContainerName", KeyContainer);
            }

            if (IsKeyFileSpecified)
            {
                writer.WriteElementString("KeyOriginatorFile", KeyFile);
            }

            writer.WriteElementString("LangVersion", ToParameter(IsLanguageVersionSpecified ? LanguageVersion : CsharpLanguageVersion.Default));

            if (IsMainClassSpecified)
            {
                writer.WriteElementString("StartupObject", MainClass);
            }

            if (IsNoStdLibSpecified && NoStdLib)
            {
                writer.WriteElementString("NoCompilerStandardLib", XmlConvert.ToString(NoStdLib));
            }

            if (AreSuppressedWarningsSpecified)
            {
                writer.WriteElementString("NoWarn", String.Join(";", SuppressedWarnings.Select(warn => warn.ToString(CultureInfo.InvariantCulture))));
            }

            writer.WriteElementString("NoWin32Manifest", XmlConvert.ToString(IsNoWin32ManifestSpecified && NoWin32Manifest));

            bool optimize = IsOptimizeSpecified ? Optimize : suite.ActiveGoal.Has(Suite.ReleaseGoal.Name);

            writer.WriteElementString("Optimize", XmlConvert.ToString(optimize));

            CLRPlatform platform;

            if (IsPlatformSpecified)
            {
                platform = Platform;
            }
            else if (suite.ActiveGoal.Has("x86"))
            {
                platform = CLRPlatform.x86;
            }
            else if (suite.ActiveGoal.Has("x64"))
            {
                platform = CLRPlatform.x64;
            }
            else
            {
                platform = CLRPlatform.AnyCPU;
            }
            writer.WriteElementString("PlatformTarget", platform.ToString().ToLowerInvariant());

            if (IsPreferredUILangSpecified)
            {
                writer.WriteElementString("PreferredUILang", PreferredUILang);
            }

            if (IsSubsystemVersionSpecified)
            {
                writer.WriteElementString("SubsystemVersion", SubsystemVersion);
            }

            writer.WriteElementString("AllowUnsafeBlocks", XmlConvert.ToString(IsUnsafeSpecified && Unsafe));

            WarningLevel warningLevel = IsWarningLevelSpecified ? WarningLevel : WarningLevel.All;

            writer.WriteElementString("WarningLevel", XmlConvert.ToString((int)warningLevel));

            writer.WriteElementString("TreatWarningsAsErrors", XmlConvert.ToString(IsAllWarningsAsErrorSpecified && AllWarningsAsError));

            if (AreSpecificWarningsAsErrorSpecified)
            {
                writer.WriteElementString("WarningsAsErrors",
                                          String.Join(";", SpecificWarningsAsError.Select(warn => warn.ToString(CultureInfo.InvariantCulture))));
            }

            if (IsRootNamespaceSpecified)
            {
                writer.WriteElementString("RootNamespace", RootNamespace);
            }

            var targetFrameworkVersion = IsTargetFrameworkVersionSpecified
                ? TargetFrameworkVersion
                : FrameworkVersion.v4;

            writer.WriteElementString("TargetFrameworkVersion", ToFrameworkVersion(targetFrameworkVersion));

            var targetFrameworkProfile = IsTargetFrameworkProfileSpecified
                ? TargetFrameworkProfile
                : FrameworkProfile.Default;

            writer.WriteElementString("TargetFrameworkProfile", ToFrameworkProfile(targetFrameworkProfile));
        }
Ejemplo n.º 6
0
 public void ToVcxprojProperties(XmlWriter writer)
 {
     if (AdditionalIncludeDirectories != null && AdditionalIncludeDirectories.Length > 0)
     {
         writer.WriteElementString("AdditionalIncludeDirectories", string.Join(";", AdditionalIncludeDirectories));
     }
     if (AdditionalOptions != null && AdditionalOptions.Length > 0)
     {
         writer.WriteElementString("AdditionalOptions", string.Join(";", AdditionalOptions));
     }
     if (AdditionalUsingDirectories != null && AdditionalUsingDirectories.Length > 0)
     {
         writer.WriteElementString("AdditionalUsingDirectories", string.Join(";", AdditionalUsingDirectories));
     }
     if (!string.IsNullOrWhiteSpace(AssemblerListingLocation))
     {
         writer.WriteElementString("AssemblerListingLocation", AssemblerListingLocation);
     }
     writer.WriteElementString("AssemblerOutput", AssemblerOutput.ToString());
     if (BasicRuntimeChecks != RuntimeCheckType.Default)
     {
         writer.WriteElementString("BasicRuntimeChecks", BasicRuntimeChecks.ToString());
     }
     if (!string.IsNullOrWhiteSpace("BrowseInformationFile"))
     {
         writer.WriteElementString("BrowseInformationFile", BrowseInformationFile);
     }
     writer.WriteElementString("BufferSecurityCheck", XmlConvert.ToString(BufferSecurityCheck));
     writer.WriteElementString("CallingConvention", CallingConvention.ToString());
     if (CompileAs != CLanguage.Default)
     {
         writer.WriteElementString("CompileAs", CompileAs.ToString());
     }
     writer.WriteElementString("CompileAsManaged", CompileAsManagedToString(CompileAsManaged));
     writer.WriteElementString("CreateHotpatchableImage", XmlConvert.ToString(CreateHotpatchableImage));
     if (DebugInformationFormat != DebugInformationFormat.None)
     {
         writer.WriteElementString("DebugInformationFormat", DebugInformationFormat.ToString());
     }
     writer.WriteElementString("DisableLanguageExtensions", XmlConvert.ToString(DisableLanguageExtensions));
     WriteStringArray(writer, "DisableSpecificWarnings", SuppressedWarnings.Select(warn => warn.ToString(CultureInfo.InvariantCulture)).ToArray());
     if (EnableEnhancedInstructionSet != EnhancedInstructionSet.None)
     {
         writer.WriteElementString("EnhancedInstructionSet", EnableEnhancedInstructionSet.ToString());
     }
     writer.WriteElementString("EnableFiberSafeOptimizations", XmlConvert.ToString(EnableFiberSafeOptimizations));
     writer.WriteElementString("CodeAnalysis", XmlConvert.ToString(CodeAnalysis));
     if (ExceptionHandling != ExceptionHandlingType.NotSpecified)
     {
         writer.WriteElementString("ExceptionHandling", ExceptionHandling.ToString());
     }
     writer.WriteElementString("ExpandAttributedSource", XmlConvert.ToString(ExpandAttributedSource));
     writer.WriteElementString("FavorSizeOrSpeed", Favor.ToString());
     writer.WriteElementString("FloatingPointExceptions", XmlConvert.ToString(FloatingPointExceptions));
     writer.WriteElementString("FloatingPointModel", FloatingPointModel.ToString());
     writer.WriteElementString("ForceConformanceInForLoopScope", XmlConvert.ToString(ForceConformanceInForLoopScope));
     WriteStringArray(writer, "ForcedUsingFiles", ForcedUsingFiles);
     writer.WriteElementString("FunctionLevelLinking", XmlConvert.ToString(FunctionLevelLinking));
     writer.WriteElementString("GenerateXMLDocumentationFiles", XmlConvert.ToString(GenerateXMLDocumentationFiles));
     writer.WriteElementString("IgnoreStandardIncludePath", XmlConvert.ToString(IgnoreStandardIncludePath));
     if (InlineFunctionExpansion != InlineExpansion.Default)
     {
         writer.WriteElementString("InlineFunctionExpansion", InlineFunctionExpansion.ToString());
     }
     writer.WriteElementString("IntrinsicFunctions", XmlConvert.ToString(IntrinsicFunctions));
     writer.WriteElementString("MinimalRebuild", XmlConvert.ToString(MinimalRebuild));
     writer.WriteElementString("MultiProcessorCompilation", XmlConvert.ToString(MultiProcessorCompilation));
     writer.WriteElementString("OmitDefaultLibName", XmlConvert.ToString(OmitDefaultLibName));
     writer.WriteElementString("OmitFramePointers", XmlConvert.ToString(OmitFramePointers));
     writer.WriteElementString("OpenMPSupport", XmlConvert.ToString(OpenMPSupport));
     writer.WriteElementString("Optimization", Optimization.ToString());
     WriteStringArray(writer, "PreprocessorDefinitions", Defines);
     if (ProcessorNumber.HasValue)
     {
         writer.WriteElementString("ProcessorNumber", ProcessorNumber.Value.ToString(CultureInfo.InvariantCulture));
     }
     writer.WriteElementString("RuntimeLibrary", RuntimeLibrary.ToString());
     writer.WriteElementString("RuntimeTypeInfo", XmlConvert.ToString(RuntimeTypeInfo));
     writer.WriteElementString("SmallerTypeCheck", XmlConvert.ToString(SmallerTypeCheck));
     writer.WriteElementString("StringPooling", XmlConvert.ToString(StringPooling));
     if (StructMemberAlignment.HasValue)
     {
         writer.WriteElementString("StructMemberAlignment", StructMemberAlignment.Value.ToString(CultureInfo.InvariantCulture));
     }
     writer.WriteElementString("AllWarningsAsError", XmlConvert.ToString(AllWarningsAsError));
     WriteStringArray(writer, "SpecificWarningsAsError", SpecificWarningsAsError.Select(warn => warn.ToString(CultureInfo.InvariantCulture)).ToArray());
     writer.WriteElementString("TreatWCharTAsBuiltInType", XmlConvert.ToString(TreatWCharTAsBuiltInType));
     writer.WriteElementString("UndefineAllPreprocessorDefinitions", XmlConvert.ToString(UndefineAllPreprocessorDefinitions));
     WriteStringArray(writer, "UndefinePreprocessorDefinitions", UndefinePreprocessorDefinitions);
     writer.WriteElementString("WarningLevel", WarningLevelToString(WarningLevel));
     writer.WriteElementString("WholeProgramOptimization", XmlConvert.ToString(WholeProgramOptimization));
     writer.WriteElementString("ProgramDataBaseFileName", PDBFileName);
 }