From 462b27a71d8e13dc33cc54baf9f0c07a114300c3 Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Wed, 17 Dec 2014 12:02:50 -0800 Subject: [PATCH] Add System.Diagnostics.FileVersionInfo source Commit migrated from https://github.com/dotnet/corefx/commit/5e9db2482a100e8343349d77aed9ec83592a2230 --- .../System.Diagnostics.FileVersionInfo.sln | 22 + .../src/Interop/Interop.manual.cs | 86 +++ .../System.Diagnostics.FileVersionInfo.csproj | 136 +++++ .../src/System/Diagnostics/FileVersionInfo.cs | 553 ++++++++++++++++++ .../src/packages.config | 17 + 5 files changed, 814 insertions(+) create mode 100644 src/libraries/System.Diagnostics.FileVersionInfo.sln create mode 100644 src/libraries/System.Diagnostics.FileVersionInfo/src/Interop/Interop.manual.cs create mode 100644 src/libraries/System.Diagnostics.FileVersionInfo/src/System.Diagnostics.FileVersionInfo.csproj create mode 100644 src/libraries/System.Diagnostics.FileVersionInfo/src/System/Diagnostics/FileVersionInfo.cs create mode 100644 src/libraries/System.Diagnostics.FileVersionInfo/src/packages.config diff --git a/src/libraries/System.Diagnostics.FileVersionInfo.sln b/src/libraries/System.Diagnostics.FileVersionInfo.sln new file mode 100644 index 00000000000..acea3abfc4b --- /dev/null +++ b/src/libraries/System.Diagnostics.FileVersionInfo.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Diagnostics.FileVersionInfo", "System.Diagnostics.FileVersionInfo\src\System.Diagnostics.FileVersionInfo.csproj", "{00EDA5FD-E802-40D3-92D5-56C27612D36D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {00EDA5FD-E802-40D3-92D5-56C27612D36D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00EDA5FD-E802-40D3-92D5-56C27612D36D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00EDA5FD-E802-40D3-92D5-56C27612D36D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00EDA5FD-E802-40D3-92D5-56C27612D36D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/src/Interop/Interop.manual.cs b/src/libraries/System.Diagnostics.FileVersionInfo/src/Interop/Interop.manual.cs new file mode 100644 index 00000000000..90941f456cd --- /dev/null +++ b/src/libraries/System.Diagnostics.FileVersionInfo/src/Interop/Interop.manual.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; + +internal partial class Interop +{ + internal partial class mincore + { + [DllImport("api-ms-win-core-localization-l1-2-0.dll", CharSet = CharSet.Unicode, EntryPoint = "VerLanguageNameW")] + public static extern int VerLanguageName(uint langID, StringBuilder lpBuffer, uint nSize); + + [DllImport("api-ms-win-core-version-l1-1-0.dll", CharSet = CharSet.Unicode, EntryPoint = "VerQueryValueW")] + internal extern static bool VerQueryValue( + IntPtr pBlock, + string lpSubBlock, + out IntPtr lplpBuffer, + out uint puLen); + + [DllImport("api-ms-win-core-version-l1-1-0.dll", CharSet = CharSet.Unicode, EntryPoint = "GetFileVersionInfoExW")] + internal extern static bool GetFileVersionInfoEx( + uint dwFlags, + string lpwstrFilename, + uint dwHandle, + uint dwLen, + IntPtr lpData); + + [DllImport("api-ms-win-core-version-l1-1-0.dll", CharSet = CharSet.Unicode, EntryPoint = "GetFileVersionInfoSizeExW")] + internal extern static uint GetFileVersionInfoSizeEx( + uint dwFlags, + string lpwstrFilename, + out uint lpdwHandle); + } + + internal enum Constants : uint + { + ErrorSuccess = 0x0u, + FileVerGetLocalised = 0x1u, + VS_FF_Debug = 0x1u, + MutexModifyState = 0x1u, + FileVerGetNeutral = 0x2u, + VS_FF_Prerelease = 0x2u, + ErrorFileNotFound = 0x2u, + EventModifyState = 0x2u, + FileTypeChar = 0x2u, + ErrorPathNotFound = 0x3u, + VS_FF_Patched = 0x4u, + ErrorAccessDenied = 0x5u, + ErrorInvalidHandle = 0x6u, + VS_FF_PrivateBuild = 0x8u, + ErrorInvalidDrive = 0xFu, + VS_FF_InfoInferred = 0x10u, + VS_FF_SpecialBuild = 0x20u, + ErrorSharingViolation = 0x20u, + ErrorInvalidParameter = 0x57u, + ErrorInvalidName = 0x7Bu, + ErrorBadPathname = 0xA1u, + ErrorAlreadyExists = 0xB7u, + ErrorFilenameExcedRange = 0xCEu, + Synchronize = 0x100000u, + StdErrorHandle = 0xFFFFFFF4u, + StdOutputHandle = 0xFFFFFFF5u, + StdInputHandle = 0xFFFFFFF6u, + } + + [StructLayout(LayoutKind.Sequential)] + internal struct VS_FIXEDFILEINFO + { + public uint dwSignature; + public uint dwStrucVersion; + public uint dwFileVersionMS; + public uint dwFileVersionLS; + public uint dwProductVersionMS; + public uint dwProductVersionLS; + public uint dwFileFlagsMask; + public uint dwFileFlags; + public uint dwFileOS; + public uint dwFileType; + public uint dwFileSubtype; + public uint dwFileDateMS; + public uint dwFileDateLS; + } +} diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/src/System.Diagnostics.FileVersionInfo.csproj b/src/libraries/System.Diagnostics.FileVersionInfo/src/System.Diagnostics.FileVersionInfo.csproj new file mode 100644 index 00000000000..1b8ded30dea --- /dev/null +++ b/src/libraries/System.Diagnostics.FileVersionInfo/src/System.Diagnostics.FileVersionInfo.csproj @@ -0,0 +1,136 @@ + + + + + + <_WindowsKitBinPath>$(MSBuildProgramFiles32)\Windows Kits\8.1\bin\x86 + <_WindowsPhoneKitBinPath>$(MSBuildProgramFiles32)\Windows Phone Kits\8.1\bin + $(_WindowsKitBinPath)\makepri.exe + $(_WindowsKitBinPath)\makeappx.exe + $(_WindowsKitBinPath)\signtool.exe + $(_WindowsPhoneKitBinPath)\x86\MrmEnvironmentExtDl.dll + $(_WindowsPhoneKitBinPath)\x64\MrmEnvironmentExtDl.dll + + + Debug + AnyCPU + {00EDA5FD-E802-40D3-92D5-56C27612D36D} + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Library + System.Diagnostics.FileVersionInfo + $(BaseOutputPath)bin\$(Configuration)\$(AssemblyName)\ + v4.5 + Profile7 + False + + + true + AnyCPU + MinimumRecommendedRules.ruleset + full + TRACE;DEBUG + true + + + AnyCPU + MinimumRecommendedRules.ruleset + true + TRACE + pdbonly + true + true + + + + + + + + + + False + False + ..\..\packages\System.Collections.4.0.10-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.Collections.dll + + + False + False + ..\..\packages\System.Diagnostics.Debug.4.0.10-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.Diagnostics.Debug.dll + + + False + False + ..\..\packages\System.Diagnostics.Tools.4.0.0-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.Diagnostics.Tools.dll + + + True + ..\..\packages\System.Globalization.4.0.10-beta-22412\lib\portable-wpa80+win80+net45+aspnetcore50\System.Globalization.dll + + + False + False + ..\..\packages\System.IO.4.0.10-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.IO.dll + + + False + False + ..\..\packages\System.IO.FileSystem.4.0.0-beta-22412\lib\portable-wpa80+win80+net45+aspnetcore50\System.IO.FileSystem.dll + + + False + False + ..\..\packages\System.IO.FileSystem.Primitives.4.0.0-beta-22412\lib\portable-wpa80+win80+net45+aspnetcore50\System.IO.FileSystem.Primitives.dll + + + False + False + ..\..\packages\System.Reflection.4.0.10-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.Reflection.dll + + + False + False + ..\..\packages\System.Reflection.Primitives.4.0.0-beta-22412\lib\portable-wpa80+win80+net45+aspnetcore50\System.Reflection.Primitives.dll + + + False + False + ..\..\packages\System.Runtime.4.0.20-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.Runtime.dll + + + False + False + ..\..\packages\System.Runtime.Extensions.4.0.10-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.Runtime.Extensions.dll + + + False + False + ..\..\packages\System.Runtime.Handles.4.0.0-beta-22412\lib\portable-wpa80+win80+net45+aspnetcore50\System.Runtime.Handles.dll + + + False + False + ..\..\packages\System.Runtime.InteropServices.4.0.20-beta-22412\lib\portable-wpa80+win80+net45+aspnetcore50\System.Runtime.InteropServices.dll + + + False + False + ..\..\packages\System.Text.Encoding.4.0.10-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.Text.Encoding.dll + + + False + False + ..\..\packages\System.Threading.4.0.0-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.Threading.dll + + + False + False + ..\..\packages\System.Threading.Tasks.4.0.10-beta-22405\lib\portable-wpa80+win80+net45+aspnetcore50\System.Threading.Tasks.dll + + + + + + + \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/src/System/Diagnostics/FileVersionInfo.cs b/src/libraries/System.Diagnostics.FileVersionInfo/src/System/Diagnostics/FileVersionInfo.cs new file mode 100644 index 00000000000..e427486acd4 --- /dev/null +++ b/src/libraries/System.Diagnostics.FileVersionInfo/src/System/Diagnostics/FileVersionInfo.cs @@ -0,0 +1,553 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Text; +using System.Runtime.InteropServices; +using System; +using System.IO; +using System.Globalization; +using System.Runtime.Versioning; + +namespace System.Diagnostics +{ + /// + /// Provides version information for a physical file on disk. + /// + public sealed class FileVersionInfo + { + private string _fileName; + private string _companyName; + private string _fileDescription; + private string _fileVersion; + private string _internalName; + private string _legalCopyright; + private string _originalFilename; + private string _productName; + private string _productVersion; + private string _comments; + private string _legalTrademarks; + private string _privateBuild; + private string _specialBuild; + private string _language; + private uint _fileMajor; + private uint _fileMinor; + private uint _fileBuild; + private uint _filePrivate; + private uint _productMajor; + private uint _productMinor; + private uint _productBuild; + private uint _productPrivate; + private uint _fileFlags; + + private FileVersionInfo(string fileName) + { + _fileName = fileName; + } + + /// + /// Gets the comments associated with the file. + /// + public string Comments + { + get + { + return _comments; + } + } + + /// + /// Gets the name of the company that produced the file. + /// + public string CompanyName + { + get + { + return _companyName; + } + } + + /// + /// Gets the build number of the file. + /// + public int FileBuildPart + { + get + { + return (int)_fileBuild; + } + } + + /// + /// Gets the description of the file. + /// + public string FileDescription + { + get + { + return _fileDescription; + } + } + + /// + /// Gets the major part of the version number. + /// + public int FileMajorPart + { + get + { + return (int)_fileMajor; + } + } + + /// + /// Gets the minor part of the version number of the file. + /// + public int FileMinorPart + { + get + { + return (int)_fileMinor; + } + } + + /// + /// Gets the name of the file that this instance of System.Windows.Forms.FileVersionInfo describes. + /// + public string FileName + { + get + { + return _fileName; + } + } + + /// + /// Gets the file private part number. + /// + public int FilePrivatePart + { + get + { + return (int)_filePrivate; + } + } + + /// + /// Gets the file version number. + /// + public string FileVersion + { + get + { + return _fileVersion; + } + } + + /// + /// Gets the internal name of the file, if one exists. + /// + public string InternalName + { + get + { + return _internalName; + } + } + + /// + /// Gets a value that specifies whether the file contains debugging information + /// or is compiled with debugging features enabled. + /// + public bool IsDebug + { + get + { + return (_fileFlags & (uint)Interop.Constants.VS_FF_Debug) != 0; + } + } + + /// + /// Gets a value that specifies whether the file has been modified and is not identical to + /// the original shipping file of the same version number. + /// + public bool IsPatched + { + get + { + return (_fileFlags & (uint)Interop.Constants.VS_FF_Patched) != 0; + } + } + + /// + /// Gets a value that specifies whether the file was built using standard release procedures. + /// + public bool IsPrivateBuild + { + get + { + return (_fileFlags & (uint)Interop.Constants.VS_FF_PrivateBuild) != 0; + } + } + + /// + /// Gets a value that specifies whether the file + /// is a development version, rather than a commercially released product. + /// + public bool IsPreRelease + { + get + { + return (_fileFlags & (uint)Interop.Constants.VS_FF_Prerelease) != 0; + } + } + + /// + /// Gets a value that specifies whether the file is a special build. + /// + public bool IsSpecialBuild + { + get + { + return (_fileFlags & (uint)Interop.Constants.VS_FF_SpecialBuild) != 0; + } + } + + /// + /// Gets the default language string for the version info block. + /// + public string Language + { + get + { + return _language; + } + } + + /// + /// Gets all copyright notices that apply to the specified file. + /// + public string LegalCopyright + { + get + { + return _legalCopyright; + } + } + + /// + /// Gets the trademarks and registered trademarks that apply to the file. + /// + public string LegalTrademarks + { + get + { + return _legalTrademarks; + } + } + + /// + /// Gets the name the file was created with. + /// + public string OriginalFilename + { + get + { + return _originalFilename; + } + } + + /// + /// Gets information about a private version of the file. + /// + public string PrivateBuild + { + get + { + return _privateBuild; + } + } + + /// + /// Gets the build number of the product this file is associated with. + /// + public int ProductBuildPart + { + get + { + return (int)_productBuild; + } + } + + /// + /// Gets the major part of the version number for the product this file is associated with. + /// + public int ProductMajorPart + { + get + { + return (int)_productMajor; + } + } + + /// + /// Gets the minor part of the version number for the product the file is associated with. + /// + public int ProductMinorPart + { + get + { + return (int)_productMinor; + } + } + + /// + /// Gets the name of the product this file is distributed with. + /// + public string ProductName + { + get + { + return _productName; + } + } + + /// + /// Gets the private part number of the product this file is associated with. + /// + public int ProductPrivatePart + { + get + { + return (int)_productPrivate; + } + } + + /// + /// Gets the version of the product this file is distributed with. + /// + public string ProductVersion + { + get + { + return _productVersion; + } + } + + /// + /// Gets the special build information for the file. + /// + public string SpecialBuild + { + get + { + return _specialBuild; + } + } + + private static string ConvertTo8DigitHex(uint value) + { + string s = Convert.ToString(value, 16); + s = s.ToUpperInvariant(); + if (s.Length == 8) + { + return s; + } + else + { + StringBuilder b = new StringBuilder(8); + for (int l = s.Length; l < 8; l++) + { + b.Append("0"); + } + b.Append(s); + return b.ToString(); + } + } + + private static Interop.VS_FIXEDFILEINFO GetFixedFileInfo(IntPtr memPtr) + { + IntPtr memRef = IntPtr.Zero; + uint memLen; + + if (Interop.mincore.VerQueryValue(memPtr, "\\", out memRef, out memLen)) + { + Interop.VS_FIXEDFILEINFO fixedFileInfo = + (Interop.VS_FIXEDFILEINFO)Marshal.PtrToStructure(memRef); + return fixedFileInfo; + } + + return new Interop.VS_FIXEDFILEINFO(); + } + + private static string GetFileVersionLanguage(IntPtr memPtr) + { + uint langid = GetVarEntry(memPtr) >> 16; + + StringBuilder lang = new StringBuilder(256); + Interop.mincore.VerLanguageName(langid, lang, (uint)lang.Capacity); + return lang.ToString(); + } + + private static string GetFileVersionString(IntPtr memPtr, string name) + { + string data = ""; + + IntPtr memRef = IntPtr.Zero; + uint memLen; + + if (Interop.mincore.VerQueryValue(memPtr, name, out memRef, out memLen)) + { + if (memRef != IntPtr.Zero) + { + data = Marshal.PtrToStringUni(memRef); + } + } + return data; + } + + private static uint GetVarEntry(IntPtr memPtr) + { + IntPtr memRef = IntPtr.Zero; + uint memLen; + + if (Interop.mincore.VerQueryValue(memPtr, "\\VarFileInfo\\Translation", out memRef, out memLen)) + { + return (uint)((Marshal.ReadInt16(memRef) << 16) + Marshal.ReadInt16((IntPtr)((long)memRef + 2))); + } + + return 0x040904E4; + } + + // + // This function tries to find version informaiton for a specific codepage. + // Returns true when version information is found. + // + private bool GetVersionInfoForCodePage(IntPtr memIntPtr, string codepage) + { + string template = "\\\\StringFileInfo\\\\{0}\\\\{1}"; + + _companyName = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "CompanyName")); + _fileDescription = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "FileDescription")); + _fileVersion = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "FileVersion")); + _internalName = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "InternalName")); + _legalCopyright = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "LegalCopyright")); + _originalFilename = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "OriginalFilename")); + _productName = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "ProductName")); + _productVersion = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "ProductVersion")); + _comments = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "Comments")); + _legalTrademarks = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "LegalTrademarks")); + _privateBuild = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "PrivateBuild")); + _specialBuild = GetFileVersionString(memIntPtr, string.Format(CultureInfo.InvariantCulture, template, codepage, "SpecialBuild")); + + _language = GetFileVersionLanguage(memIntPtr); + + Interop.VS_FIXEDFILEINFO ffi = GetFixedFileInfo(memIntPtr); + _fileMajor = HIWORD(ffi.dwFileVersionMS); + _fileMinor = LOWORD(ffi.dwFileVersionMS); + _fileBuild = HIWORD(ffi.dwFileVersionLS); + _filePrivate = LOWORD(ffi.dwFileVersionLS); + _productMajor = HIWORD(ffi.dwProductVersionMS); + _productMinor = LOWORD(ffi.dwProductVersionMS); + _productBuild = HIWORD(ffi.dwProductVersionLS); + _productPrivate = LOWORD(ffi.dwProductVersionLS); + _fileFlags = ffi.dwFileFlags; + + // fileVersion is chosen based on best guess. Other fields can be used if appropriate. + return (_fileVersion != string.Empty); + } + + /// + /// Returns a System.Windows.Forms.FileVersionInfo representing the version information associated with the specified file. + /// + public unsafe static FileVersionInfo GetVersionInfo(string fileName) + { + // Check for the existence of the file. File.Exists returns false + // if Read permission is denied. + if (!File.Exists(fileName)) + { + throw new FileNotFoundException(fileName); + } + + uint handle; // This variable is not used, but we need an out variable. + uint infoSize = Interop.mincore.GetFileVersionInfoSizeEx( + (uint)Interop.Constants.FileVerGetLocalised, fileName, out handle); + FileVersionInfo versionInfo = new FileVersionInfo(fileName); + + if (infoSize != 0) + { + byte[] mem = new byte[infoSize]; + fixed (byte* memPtr = mem) + { + IntPtr memIntPtr = new IntPtr((void*)memPtr); + if (Interop.mincore.GetFileVersionInfoEx( + (uint)Interop.Constants.FileVerGetLocalised | (uint)Interop.Constants.FileVerGetNeutral, + fileName, + 0U, + infoSize, + memIntPtr)) + { + uint langid = GetVarEntry(memIntPtr); + if (!versionInfo.GetVersionInfoForCodePage(memIntPtr, ConvertTo8DigitHex(langid))) + { + // Some dlls might not contain correct codepage information. In this case we will fail during lookup. + // Explorer will take a few shots in dark by trying following ID: + // + // 040904B0 // US English + CP_UNICODE + // 040904E4 // US English + CP_USASCII + // 04090000 // US English + unknown codepage + // Explorer also randomly guess 041D04B0=Swedish+CP_UNICODE and 040704B0=German+CP_UNICODE) sometimes. + // We will try to simulate similiar behavior here. + uint[] ids = new uint[] { 0x040904B0, 0x040904E4, 0x04090000 }; + foreach (uint id in ids) + { + if (id != langid) + { + if (versionInfo.GetVersionInfoForCodePage(memIntPtr, ConvertTo8DigitHex(id))) + { + break; + } + } + } + } + } + } + } + + return versionInfo; + } + + private static uint HIWORD(uint dword) + { + return (dword >> 16) & 0xffff; + } + + private static uint LOWORD(uint dword) + { + return dword & 0xffff; + } + + /// + /// Returns a partial list of properties in System.Windows.Forms.FileVersionInfo + /// and their values. + /// + public override string ToString() + { + StringBuilder sb = new StringBuilder(128); + String nl = "\r\n"; + sb.Append("File: "); sb.Append(FileName); sb.Append(nl); + sb.Append("InternalName: "); sb.Append(InternalName); sb.Append(nl); + sb.Append("OriginalFilename: "); sb.Append(OriginalFilename); sb.Append(nl); + sb.Append("FileVersion: "); sb.Append(FileVersion); sb.Append(nl); + sb.Append("FileDescription: "); sb.Append(FileDescription); sb.Append(nl); + sb.Append("Product: "); sb.Append(ProductName); sb.Append(nl); + sb.Append("ProductVersion: "); sb.Append(ProductVersion); sb.Append(nl); + sb.Append("Debug: "); sb.Append(IsDebug.ToString()); sb.Append(nl); + sb.Append("Patched: "); sb.Append(IsPatched.ToString()); sb.Append(nl); + sb.Append("PreRelease: "); sb.Append(IsPreRelease.ToString()); sb.Append(nl); + sb.Append("PrivateBuild: "); sb.Append(IsPrivateBuild.ToString()); sb.Append(nl); + sb.Append("SpecialBuild: "); sb.Append(IsSpecialBuild.ToString()); sb.Append(nl); + sb.Append("Language: "); sb.Append(Language); sb.Append(nl); + return sb.ToString(); + } + } +} diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/src/packages.config b/src/libraries/System.Diagnostics.FileVersionInfo/src/packages.config new file mode 100644 index 00000000000..e1845c93c3d --- /dev/null +++ b/src/libraries/System.Diagnostics.FileVersionInfo/src/packages.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file -- GitLab