Skip to content

Commit 31cf84c

Browse files
Moves product version to code (#253)
1 parent ad8ba61 commit 31cf84c

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

msgraph-developer-proxy/ProxyEngine.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,10 @@ public class ProxyEngine {
2828
private static string _productVersion = string.Empty;
2929
public static string ProductVersion {
3030
get {
31-
if (_productVersion == string.Empty) {
32-
var assemblyPath = Process.GetCurrentProcess()?.MainModule?.FileName ?? typeof(ProxyEngine).Assembly.Location;
33-
var fileVersionInfo = FileVersionInfo.GetVersionInfo(assemblyPath);
34-
_productVersion = fileVersionInfo?.ProductVersion!;
35-
}
36-
37-
return _productVersion;
31+
// product version to display in the terminal and used for
32+
// new version notification. Added here because .net doesn't
33+
// stamp version on assemblies on non-Windows OSes
34+
return "0.7.0";
3835
}
3936
}
4037

msgraph-developer-proxy/UpdateNotification.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
using System.Diagnostics;
54
using System.Net.Http.Headers;
6-
using System.Reflection;
75
using System.Text.Json;
86
using System.Text.Json.Serialization;
97

0 commit comments

Comments
 (0)