Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorv-susu1 <v-susu@microsoft.com>2022-02-24 10:29:21 +0300
committerGitHub <noreply@github.com>2022-02-24 10:29:21 +0300
commit03ee19083d4587af6b301beb86b921f2025c8064 (patch)
tree3e7c72534f10773758a63db8ea41ad823ddf5257
parentecc38372e51f5ef79f965f143dcb762803c8e2e1 (diff)
Fix bug 542435 (#615)
* Fix bug 542435 * Update code style
-rw-r--r--mdoc/Mono.Documentation/frameworksbootstrapper.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdoc/Mono.Documentation/frameworksbootstrapper.cs b/mdoc/Mono.Documentation/frameworksbootstrapper.cs
index 724692c4..fc068c66 100644
--- a/mdoc/Mono.Documentation/frameworksbootstrapper.cs
+++ b/mdoc/Mono.Documentation/frameworksbootstrapper.cs
@@ -48,9 +48,11 @@ namespace Mono.Documentation
string dllPath = Path.Combine(sourcePath, fileNameWithoutExtension + ".dll");
if (File.Exists(dllPath))
{
- var version = FileVersionInfo.GetVersionInfo(dllPath).FileVersion;
- if (!string.IsNullOrEmpty(version))
+ var fileVersionInfo = FileVersionInfo.GetVersionInfo(dllPath);
+
+ if (fileVersionInfo != null)
{
+ var version = $"{fileVersionInfo.FileMajorPart}.{fileVersionInfo.FileMinorPart}.{fileVersionInfo.FileBuildPart}.{fileVersionInfo.FilePrivatePart}";
assemblyVersionMapping.Add(Path.GetFileName(xmlPath), new Version(version));
}
}