From 6b6baeced67d7312f37fb81f662a5829e139046b Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 12:55:07 -0500 Subject: [PATCH 01/26] feat: migrate project to .NET 9 and update dependencies - Updated target framework to net9.0-windows for multiple projects. - Replaced deprecated BinaryFormatter with System.Text.Json for serialization in ApplicationInstance. - Introduced InMemoryTokenStorage for temporary token caching during Azure DevOps SDK migration. - Updated various package references to their latest versions. - Removed unsupported references and configurations related to previous .NET versions. - Adjusted ToastNotificationManager to ensure compatibility with new namespace requirements. --- ...Microsoft.Tools.TeamMate.Foundation.csproj | 13 +- Source/Foundation/Native/Structs.cs | 8 +- .../Windows/Shell/ApplicationInstance.cs | 9 +- .../Foundation/Windows/Transfer/FileGroup.cs | 4 +- .../Windows/Transfer/FileGroupDataObject.cs | 1 - ...ools.TeamMate.TeamFoundation.WebApi.csproj | 8 +- Source/TeamFoundation.WebApi/app.config | 2 +- .../VstsClientCredentialCachingStorage.cs | 124 ------------- .../Services/VstsConnectionService.cs | 171 +++++++++++++++++- Source/TeamMate/Services/WindowService.cs | 3 +- Source/TeamMate/TeamMate.csproj | 21 +-- Source/TeamMate/app.config | 3 - ...osoft.Tools.TeamMate.WindowsRuntime.csproj | 21 +-- .../Notifications/ToastNotificationManager.cs | 10 +- 14 files changed, 199 insertions(+), 199 deletions(-) delete mode 100644 Source/TeamMate/Services/VstsClientCredentialCachingStorage.cs diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index 62c1bbd..229b8c4 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -1,12 +1,11 @@  - net48 + net9.0-windows true Library false true true - true AnyCPU;x86 @@ -35,13 +34,7 @@ 467;618 - - 3.5 - - - - 3.5 - + @@ -57,6 +50,6 @@ - + \ No newline at end of file diff --git a/Source/Foundation/Native/Structs.cs b/Source/Foundation/Native/Structs.cs index d28d131..ea3e042 100644 --- a/Source/Foundation/Native/Structs.cs +++ b/Source/Foundation/Native/Structs.cs @@ -8,6 +8,13 @@ namespace Microsoft.Tools.TeamMate.Foundation.Native { // Defines struct mappings for PInvoke functions. + [StructLayout(LayoutKind.Sequential)] + public struct FILETIME + { + public uint dwLowDateTime; + public uint dwHighDateTime; + } + [StructLayout(LayoutKind.Sequential)] public struct WINDOWINFO { @@ -273,7 +280,6 @@ public class PROCESS_INFORMATION this.Close(); } - [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] internal void Close() { if ((this.hProcess != IntPtr.Zero) && (this.hProcess != INVALID_HANDLE_VALUE)) diff --git a/Source/Foundation/Windows/Shell/ApplicationInstance.cs b/Source/Foundation/Windows/Shell/ApplicationInstance.cs index c9bb877..626c40f 100644 --- a/Source/Foundation/Windows/Shell/ApplicationInstance.cs +++ b/Source/Foundation/Windows/Shell/ApplicationInstance.cs @@ -5,7 +5,7 @@ using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; -using System.Runtime.Serialization.Formatters.Binary; +using System.Text.Json; using System.Security.AccessControl; using System.Security.Principal; using System.Threading; @@ -150,11 +150,9 @@ public bool Owned public void SendMessage(object o) { - BinaryFormatter formatter = new BinaryFormatter(); - using (FileStream fs = new FileStream(mailslotHandle, FileAccess.Write, 400, false)) { - formatter.Serialize(fs, o); + JsonSerializer.Serialize(fs, o); } eventWaitHandle.Set(); @@ -177,11 +175,10 @@ private object Receive() // Sometimes we get messages of size 0, these have to be "read" and discarded from the queue to check for future messages... if (messageSize > 0) { - BinaryFormatter formatter = new BinaryFormatter(); byte[] message = new byte[messageSize]; fs.Read(message, 0, messageSize); - return formatter.Deserialize(new MemoryStream(message)); + return JsonSerializer.Deserialize(new MemoryStream(message)); } else { diff --git a/Source/Foundation/Windows/Transfer/FileGroup.cs b/Source/Foundation/Windows/Transfer/FileGroup.cs index 9724e5a..095bd78 100644 --- a/Source/Foundation/Windows/Transfer/FileGroup.cs +++ b/Source/Foundation/Windows/Transfer/FileGroup.cs @@ -34,8 +34,8 @@ internal MemoryStream GetFileDescriptorStream() if (item.WriteTime != null) { Int64 fileWriteTimeUtc = item.WriteTime.Value.ToFileTimeUtc(); - fileDescriptor.ftLastWriteTime.dwHighDateTime = (int)(fileWriteTimeUtc >> 32); - fileDescriptor.ftLastWriteTime.dwLowDateTime = (int)(fileWriteTimeUtc & 0xFFFFFFFF); + fileDescriptor.ftLastWriteTime.dwHighDateTime = (uint)(fileWriteTimeUtc >> 32); + fileDescriptor.ftLastWriteTime.dwLowDateTime = (uint)(fileWriteTimeUtc & 0xFFFFFFFF); flags |= (uint)FileDescriptorFlags.FD_WRITESTIME; } diff --git a/Source/Foundation/Windows/Transfer/FileGroupDataObject.cs b/Source/Foundation/Windows/Transfer/FileGroupDataObject.cs index d2abb5f..26d80d0 100644 --- a/Source/Foundation/Windows/Transfer/FileGroupDataObject.cs +++ b/Source/Foundation/Windows/Transfer/FileGroupDataObject.cs @@ -57,7 +57,6 @@ public override object GetData(string format, bool autoConvert) return base.GetData(format, autoConvert); } - [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] void IDataObject.GetData(ref FORMATETC formatetc, out STGMEDIUM medium) { if (formatetc.cfFormat == (short)DataFormats.GetFormat(CustomDataFormats.FileContents).Id) diff --git a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj index 6e57974..d5cffd0 100644 --- a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj +++ b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj @@ -1,8 +1,8 @@  - net48 + net9.0-windows Library - win10-arm;win10-arm-aot;win10-arm64-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot;win;win-x64;win-x86 + win-x86;win-x64;win-arm64 false AnyCPU;x86 @@ -28,15 +28,13 @@ - 5.2.7 + 6.0.0 - 16.170.0 16.170.0 - \ No newline at end of file diff --git a/Source/TeamFoundation.WebApi/app.config b/Source/TeamFoundation.WebApi/app.config index c68ab51..769ba44 100644 --- a/Source/TeamFoundation.WebApi/app.config +++ b/Source/TeamFoundation.WebApi/app.config @@ -5,4 +5,4 @@ - + diff --git a/Source/TeamMate/Services/VstsClientCredentialCachingStorage.cs b/Source/TeamMate/Services/VstsClientCredentialCachingStorage.cs deleted file mode 100644 index 64d0768..0000000 --- a/Source/TeamMate/Services/VstsClientCredentialCachingStorage.cs +++ /dev/null @@ -1,124 +0,0 @@ -using Microsoft.VisualStudio.Services.Client; -using Microsoft.VisualStudio.Services.Common; -using Microsoft.VisualStudio.Services.Common.TokenStorage; -using System; -using System.Collections.Generic; -using System.Linq; -using IssuedToken = Microsoft.VisualStudio.Services.Common.IssuedToken; - -namespace Microsoft.Tools.TeamMate.Services -{ - class VstsClientCredentialCachingStorage : VssClientCredentialStorage - { - private const string TokenExpirationKey = "ExpirationDateTime"; - private double TokenLeaseInSeconds; - - public VstsClientCredentialCachingStorage(string storageKind = "VssApp", string storageNamespace = "VisualStudio", double tokenLeaseInSeconds = 86400) - : base(storageKind, storageNamespace) - { - this.TokenLeaseInSeconds = tokenLeaseInSeconds; - } - - public override void RemoveToken(Uri serverUrl, IssuedToken token) - { - this.RemoveToken(serverUrl, token, false); - } - - public void RemoveToken(Uri serverUrl, IssuedToken token, bool force) - { - // Bypassing this allows the token to be stored in local - // cache. Token is removed if lease is expired. - if (force || token != null && this.IsTokenExpired(token)) - { - base.RemoveToken(serverUrl, token); - } - } - - public override IssuedToken RetrieveToken(Uri serverUrl, VssCredentialsType credentialsType) - { - var token = base.RetrieveToken(serverUrl, credentialsType); - - if (token != null) - { - bool expireToken = this.IsTokenExpired(token); - if (expireToken) - { - base.RemoveToken(serverUrl, token); - token = null; - } - else - { - // if retrieving the token before it is expired, - // refresh the lease period. - this.RefreshLeaseAndStoreToken(serverUrl, token); - token = base.RetrieveToken(serverUrl, credentialsType); - } - } - - return token; - } - - public override void StoreToken(Uri serverUrl, IssuedToken token) - { - this.RefreshLeaseAndStoreToken(serverUrl, token); - } - - public void ClearAllTokens(Uri url = null) - { - IEnumerable tokens = this.TokenStorage.RetrieveAll(base.TokenKind).ToList(); - - if (url != default(Uri)) - { - tokens = tokens.Where(t => StringComparer.InvariantCultureIgnoreCase.Compare(t.Resource, url.ToString().TrimEnd('/')) == 0); - } - - foreach (var token in tokens) - { - this.TokenStorage.Remove(token); - } - } - - private void RefreshLeaseAndStoreToken(Uri serverUrl, IssuedToken token) - { - if (token.Properties == null) - { - token.Properties = new Dictionary(); - } - - token.Properties[TokenExpirationKey] = this.GetNewExpirationDateTime().ToString(); - - base.StoreToken(serverUrl, token); - } - - private DateTime GetNewExpirationDateTime() - { - var now = DateTime.Now; - - // Ensure we don't overflow the max DateTime value - var lease = Math.Min((DateTime.MaxValue - now.Add(TimeSpan.FromSeconds(1))).TotalSeconds, this.TokenLeaseInSeconds); - - // ensure we don't have negative leases - lease = Math.Max(lease, 0); - - return now.AddSeconds(lease); - } - - private bool IsTokenExpired(IssuedToken token) - { - bool expireToken = true; - - if (token != null && token.Properties.ContainsKey(TokenExpirationKey)) - { - try - { - DateTime expiration = Convert.ToDateTime(token.Properties[TokenExpirationKey]); - - expireToken = DateTime.Compare(DateTime.Now, expiration) >= 0; - } - catch { } - } - - return expireToken; - } - } -} diff --git a/Source/TeamMate/Services/VstsConnectionService.cs b/Source/TeamMate/Services/VstsConnectionService.cs index 1bf7a97..c3989ec 100644 --- a/Source/TeamMate/Services/VstsConnectionService.cs +++ b/Source/TeamMate/Services/VstsConnectionService.cs @@ -10,12 +10,17 @@ using Microsoft.TeamFoundation.SourceControl.WebApi; using Microsoft.VisualStudio.Services.Client; using Microsoft.VisualStudio.Services.WebApi; +using Microsoft.VisualStudio.Services.Common; +using Azure.Identity; +using Azure.Core; +using Microsoft.Identity.Client; using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.Linq; using System.Threading; using System.Threading.Tasks; +using System.IO; using ProjectHttpClient = Microsoft.TeamFoundation.Core.WebApi.ProjectHttpClient; using WorkItemField = Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemField; using WorkItemType = Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemType; @@ -25,6 +30,13 @@ namespace Microsoft.Tools.TeamMate.Services { public class VstsConnectionService { + // Cached MSAL public client application - reused across connections + private static IPublicClientApplication _msalApp; + private static readonly object _msalLock = new object(); + private const string ClientId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46"; // Azure CLI client ID + private const string Authority = "https://login.microsoftonline.com/common"; + private static readonly string[] Scopes = new[] { "499b84ac-1321-427f-aa17-267ca6975798/.default" }; + [Import] public SettingsService SettingsService { get; set; } @@ -45,9 +57,27 @@ public class VstsConnectionService { Assert.ParamIsNotNull(projectCollectionUri, "projectCollectionUri"); - var credentials = new VssClientCredentials(); - credentials.PromptType = VisualStudio.Services.Common.CredentialPromptType.PromptIfNeeded; - credentials.Storage = GetVssClientCredentialStorage(86400); + // Get or create the MSAL app + var app = GetOrCreateMsalApp(); + + AuthenticationResult authResult; + try + { + // Try to acquire token silently first (from cache) + var accounts = await app.GetAccountsAsync(); + authResult = await app.AcquireTokenSilent(Scopes, accounts.FirstOrDefault()) + .ExecuteAsync(cancellationToken); + } + catch (MsalUiRequiredException) + { + // Silent acquisition failed, need interactive login + authResult = await app.AcquireTokenInteractive(Scopes) + .WithUseEmbeddedWebView(false) // Use system browser + .ExecuteAsync(cancellationToken); + } + + // Use the token with VssAadCredential + var credentials = new VssAadCredential(new VssAadToken("Bearer", authResult.AccessToken)); var settings = new VssClientHttpRequestSettings(); settings.AllowAutoRedirect = true; @@ -60,9 +90,140 @@ public class VstsConnectionService return connection; } - private static VstsClientCredentialCachingStorage GetVssClientCredentialStorage(double tokenLeaseInSeconds) + + private static IPublicClientApplication GetOrCreateMsalApp() + { + lock (_msalLock) + { + if (_msalApp == null) + { + // Get the app data folder for token cache + var cacheDirectory = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Microsoft", "TeamMate", "MsalCache"); + + Directory.CreateDirectory(cacheDirectory); + var cacheFileName = Path.Combine(cacheDirectory, "msal.cache"); + + // Build the MSAL public client application with persistent cache + _msalApp = PublicClientApplicationBuilder.Create(ClientId) + .WithAuthority(Authority) + .WithRedirectUri("http://localhost") + .Build(); + + // Register the token cache serialization + RegisterTokenCache(_msalApp.UserTokenCache, cacheFileName); + } + + return _msalApp; + } + } + + private static void RegisterTokenCache(ITokenCache tokenCache, string cacheFilePath) + { + tokenCache.SetBeforeAccess(notificationArgs => + { + // Read cache from file + if (File.Exists(cacheFilePath)) + { + try + { + byte[] cacheData = File.ReadAllBytes(cacheFilePath); + notificationArgs.TokenCache.DeserializeMsalV3(cacheData); + } + catch + { + // Ignore cache read errors, will just re-authenticate + } + } + }); + + tokenCache.SetAfterAccess(notificationArgs => + { + // Write cache to file if it has changed + if (notificationArgs.HasStateChanged) + { + try + { + byte[] cacheData = notificationArgs.TokenCache.SerializeMsalV3(); + File.WriteAllBytes(cacheFilePath, cacheData); + } + catch + { + // Ignore cache write errors + } + } + }); + } + private static VssClientCredentialStorage GetVssClientCredentialStorage(double tokenLeaseInSeconds) + { + // TODO: Restore custom caching storage for .NET 9 - using in-memory storage for now + // The Azure DevOps SDK API has changed significantly and requires a new implementation + // For now, use in-memory storage which will work but won't persist across restarts + return new VssClientCredentialStorage("TeamMate", new InMemoryTokenStorage()); + } + + // Temporary in-memory token storage for .NET 9 migration + private class InMemoryTokenStorage : Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenStorage { - return new VstsClientCredentialCachingStorage("TeamMate", "TokenStorage", tokenLeaseInSeconds); + // Simple in-memory dictionary for tokens - not persisted + private readonly System.Collections.Concurrent.ConcurrentDictionary tokens = new(); + + protected override Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken AddToken( + Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey, string tokenValue) + { + string key = tokenKey.ToString(); + tokens[key] = tokenValue; + return null; // Return null - credential storage will handle token object + } + + protected override Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken RetrieveToken( + Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey) + { + return null; // Let SDK manage tokens + } + + protected override bool RemoveToken(Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey) + { + string key = tokenKey.ToString(); + return tokens.TryRemove(key, out _); + } + + public override System.Collections.Generic.IEnumerable RetrieveAll(string tokenType) + { + return System.Linq.Enumerable.Empty(); + } + + public override bool RemoveAll() + { + tokens.Clear(); + return true; + } + + public override string RetrieveTokenSecret(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token) + { + return null; + } + + public override bool SetTokenSecret(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token, string tokenValue) + { + return true; + } + + public override bool RemoveTokenSecret(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token) + { + return true; + } + + public override string GetProperty(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token, string propertyName) + { + return null; + } + + public override bool SetProperty(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token, string propertyName, string value) + { + return true; + } } public async Task ResolveProjectReferenceAsync(Uri projectCollectionUri, string projectName) diff --git a/Source/TeamMate/Services/WindowService.cs b/Source/TeamMate/Services/WindowService.cs index a17d201..c66f7b2 100644 --- a/Source/TeamMate/Services/WindowService.cs +++ b/Source/TeamMate/Services/WindowService.cs @@ -1,5 +1,4 @@ -using Microsoft.TeamFoundation.WorkItemTracking.Client; -using Microsoft.Tools.TeamMate.Foundation.Shell; +using Microsoft.Tools.TeamMate.Foundation.Shell; using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index a630677..729f4ec 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -1,6 +1,6 @@  - net48 + net9.0-windows10.0.19041.0 true Disk true @@ -18,11 +18,10 @@ true false Resources\Logo\TeamMate.ico - win10-arm;win10-arm-aot;win10-arm64-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot;win;win-x64;win-x86 + win-x86;win-x64;win-arm64 false true true - true AnyCPU;x86 @@ -63,18 +62,8 @@ - - 3.5 - - - - 3.5 - - - 3.0 - @@ -508,9 +497,11 @@ all - 5.3.3 + 5.5.0 - + + + diff --git a/Source/TeamMate/app.config b/Source/TeamMate/app.config index fa86e14..aa0714c 100644 --- a/Source/TeamMate/app.config +++ b/Source/TeamMate/app.config @@ -1,8 +1,5 @@ - - - diff --git a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj index 0434c76..27ef722 100644 --- a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj +++ b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj @@ -1,10 +1,8 @@  - net48 + net9.0-windows10.0.19041.0 Library - - 8.1 - win10-arm;win10-arm-aot;win10-arm64-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot;win;win-x64 + win-x86;win-x64;win-arm64 false AnyCPU;x86 @@ -30,25 +28,10 @@ bin\x86\Release\ 467;618 - - - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\System.Runtime.dll - - - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\System.Runtime.InteropServices.WindowsRuntime.dll - - - - - - - - - \ No newline at end of file diff --git a/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs b/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs index 485c5b6..04465b0 100644 --- a/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs +++ b/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs @@ -33,7 +33,7 @@ private ToastNotifier GetNotifier() { if (this.toastNotifier == null) { - this.toastNotifier = Windows.UI.Notifications.ToastNotificationManager.CreateToastNotifier(this.applicationId); + this.toastNotifier = global::Windows.UI.Notifications.ToastNotificationManager.CreateToastNotifier(this.applicationId); } return this.toastNotifier; @@ -53,7 +53,7 @@ private void Toast_Dismissed(ToastNotification sender, ToastDismissedEventArgs a this.ToastOccurred?.Invoke(this, new ToastNotificationManagerEventArgs { EventType = ToastNotificationEventType.Dismissed, - DismissReason = (ToastDismissalReason)args.Reason + DismissReason = (ToastDismissalReason)(int)args.Reason }); } @@ -93,8 +93,8 @@ public enum ToastNotificationEventType public enum ToastDismissalReason { - UserCanceled = Windows.UI.Notifications.ToastDismissalReason.UserCanceled, - ApplicationHidden = Windows.UI.Notifications.ToastDismissalReason.ApplicationHidden, - TimedOut = Windows.UI.Notifications.ToastDismissalReason.TimedOut + UserCanceled = 0, + ApplicationHidden = 1, + TimedOut = 2 } } \ No newline at end of file From 736576e45d86b854c4ee19150369650e95ee9ef9 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:14:48 -0500 Subject: [PATCH 02/26] fix: update NoWarn properties and suppress additional warnings - Added new warnings to NoWarn in Directory.Build.props and various .csproj files. - Updated PackageReference version for System.ServiceModel.Primitives in Foundation project. - Removed unused references in TeamMate.csproj. --- Source/Directory.Build.props | 6 ++++++ .../Microsoft.Tools.TeamMate.Foundation.csproj | 12 ++++++------ ...osoft.Tools.TeamMate.TeamFoundation.WebApi.csproj | 10 +++++----- Source/TeamMate/TeamMate.csproj | 12 +----------- .../Microsoft.Tools.TeamMate.WindowsRuntime.csproj | 2 +- 5 files changed, 19 insertions(+), 23 deletions(-) create mode 100644 Source/Directory.Build.props diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props new file mode 100644 index 0000000..1197561 --- /dev/null +++ b/Source/Directory.Build.props @@ -0,0 +1,6 @@ + + + + $(NoWarn);CA1416;CA2022;SYSLIB0012 + + diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index 229b8c4..6c450a4 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -9,32 +9,32 @@ AnyCPU;x86 - 467;618 + 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073;NU1603;CA2022 publish\ bin\x64\Debug\ true - 467;618 + 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073 x86 bin\x64\Release\ true - 467;618 + 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073 bin\x86\Debug\ true - 467;618 + 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073 bin\x86\Release\ true - 467;618 + 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073 - + diff --git a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj index d5cffd0..e3363a7 100644 --- a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj +++ b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj @@ -7,24 +7,24 @@ AnyCPU;x86 - 467;618 + 467;618;NU1701 publish\ bin\x64\Debug\ - 467;618 + 467;618;NU1701 bin\x64\Release\ - 467;618 + 467;618;NU1701 bin\x86\Debug\ - 467;618 + 467;618;NU1701 bin\x86\Release\ - 467;618 + 467;618;NU1701 diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index 729f4ec..dd1bb46 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -26,17 +26,15 @@ x86 - 467;618 + 467;618;NU1603;NU1701;CA1416;SYSLIB0012 publish\ None - ManagedMinimumRules.ruleset bin\x64\Debug\ 467;618 - ManagedMinimumRules.ruleset bin\x64\Release\ @@ -58,13 +56,6 @@ false - - - - - - - @@ -523,7 +514,6 @@ bin\x86\Debug\ 467;618 - ManagedMinimumRules.ruleset bin\x86\Release\ diff --git a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj index 27ef722..1ef7549 100644 --- a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj +++ b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj @@ -8,7 +8,7 @@ x86 - 467;618 + 467;618;NU1603;CA1416 publish\ None From 6f826a7ab1711b0e5b5ea6f4f662dd43b99fbb48 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:16:58 -0500 Subject: [PATCH 03/26] fix: update ExternalWebBrowser to use ProcessStartInfo for launching URLs Updated the Launch method to utilize ProcessStartInfo with UseShellExecute set to true, ensuring better handling of the browser launch process. --- Source/Foundation/Shell/ExternalWebBrowser.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Foundation/Shell/ExternalWebBrowser.cs b/Source/Foundation/Shell/ExternalWebBrowser.cs index 3e3dc2b..264bb79 100644 --- a/Source/Foundation/Shell/ExternalWebBrowser.cs +++ b/Source/Foundation/Shell/ExternalWebBrowser.cs @@ -38,7 +38,11 @@ public static void Launch(Uri uri) // TODO: When run in a loop, not all URLs might be launched. See // http://stackoverflow.com/questions/6208307/process-starturl-in-a-loop-not-launching-every-instance string browserUri = uri.AbsoluteUri; - Process.Start(browserUri); + var startInfo = new ProcessStartInfo(browserUri) + { + UseShellExecute = true + }; + Process.Start(startInfo); } } } From 46d6d6e09bb5cf3c34b6830a763bf0245dad61e5 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:19:54 -0500 Subject: [PATCH 04/26] fix: remove SYSLIB0012 from NoWarn properties in project files - Updated Directory.Build.props and TeamMate.csproj to remove SYSLIB0012 from the NoWarn list, ensuring cleaner build output. --- Source/Directory.Build.props | 2 +- Source/TeamMate/Model/TeamMateApplicationInfo.cs | 4 ++-- Source/TeamMate/TeamMate.csproj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props index 1197561..270bede 100644 --- a/Source/Directory.Build.props +++ b/Source/Directory.Build.props @@ -1,6 +1,6 @@ - $(NoWarn);CA1416;CA2022;SYSLIB0012 + $(NoWarn);CA1416;CA2022 diff --git a/Source/TeamMate/Model/TeamMateApplicationInfo.cs b/Source/TeamMate/Model/TeamMateApplicationInfo.cs index 5246034..0978fd0 100644 --- a/Source/TeamMate/Model/TeamMateApplicationInfo.cs +++ b/Source/TeamMate/Model/TeamMateApplicationInfo.cs @@ -222,7 +222,7 @@ public static string FullVersion } } - public static string DotNetVersion + public static string DotNetVersion { get { return RuntimeInformation.FrameworkDescription; } } @@ -278,7 +278,7 @@ public static string ExePath { get { - string exePath = new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath; + string exePath = Assembly.GetExecutingAssembly().Location; return exePath; } } diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index dd1bb46..68e7496 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -26,7 +26,7 @@ x86 - 467;618;NU1603;NU1701;CA1416;SYSLIB0012 + 467;618;NU1603;NU1701;CA1416 publish\ None From a8bb5d7c0793e7502dab1475519142065e13d276 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:26:21 -0500 Subject: [PATCH 05/26] fix: remove warning code 467 from NoWarn properties in project files Updated NoWarn properties in TeamMate.csproj and Microsoft.Tools.TeamMate.WindowsRuntime.csproj to remove warning code 467, streamlining the warning suppression for better clarity and maintenance. --- Source/TeamMate/TeamMate.csproj | 6 +++--- .../Microsoft.Tools.TeamMate.WindowsRuntime.csproj | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index 68e7496..b79316f 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -26,7 +26,7 @@ x86 - 467;618;NU1603;NU1701;CA1416 + 618;NU1603;NU1701;CA1416 publish\ None @@ -34,11 +34,11 @@ bin\x64\Debug\ - 467;618 + 618 bin\x64\Release\ - 467;618 + 618 $(MSBuildThisFileDirectory)\Properties\app_themes.manifest diff --git a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj index 1ef7549..cfeb76c 100644 --- a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj +++ b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj @@ -8,25 +8,25 @@ x86 - 467;618;NU1603;CA1416 + 618;NU1603;CA1416 publish\ None bin\x64\Debug\ - 467;618 + 618 bin\x64\Release\ - 467;618 + 618 bin\x86\Debug\ - 467;618 + 618 bin\x86\Release\ - 467;618 + 618 From a22642e6df376bbeccc9c5e1deeb938058128c40 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:28:02 -0500 Subject: [PATCH 06/26] fix: remove NU1603 from NoWarn properties in project files --- Source/TeamMate/TeamMate.csproj | 2 +- .../Microsoft.Tools.TeamMate.WindowsRuntime.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index b79316f..335cd05 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -26,7 +26,7 @@ x86 - 618;NU1603;NU1701;CA1416 + 618;NU1701;CA1416 publish\ None diff --git a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj index cfeb76c..506fb0d 100644 --- a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj +++ b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj @@ -8,7 +8,7 @@ x86 - 618;NU1603;CA1416 + 618;CA1416 publish\ None From c6d111bbeefdde0f538f62534f85a1f0b9fa6504 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:29:46 -0500 Subject: [PATCH 07/26] fix: remove warning code 618 from NoWarn properties in project files Removed warning code 618 from NoWarn properties in both TeamMate.csproj and Microsoft.Tools.TeamMate.WindowsRuntime.csproj to clean up the project configuration. --- Source/TeamMate/TeamMate.csproj | 4 +--- .../Microsoft.Tools.TeamMate.WindowsRuntime.csproj | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index 335cd05..3e32ea3 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -26,7 +26,7 @@ x86 - 618;NU1701;CA1416 + NU1701;CA1416 publish\ None @@ -34,11 +34,9 @@ bin\x64\Debug\ - 618 bin\x64\Release\ - 618 $(MSBuildThisFileDirectory)\Properties\app_themes.manifest diff --git a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj index 506fb0d..e04505a 100644 --- a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj +++ b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj @@ -8,25 +8,21 @@ x86 - 618;CA1416 + CA1416 publish\ None bin\x64\Debug\ - 618 bin\x64\Release\ - 618 bin\x86\Debug\ - 618 bin\x86\Release\ - 618 From a30533b2d73f37291babcad1de79c0ba999c6409 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:34:01 -0500 Subject: [PATCH 08/26] fix: clean up NoWarn properties in project files and improve file reading method - Removed CA2022 from NoWarn properties in Directory.Build.props and Microsoft.Tools.TeamMate.Foundation.csproj. - Updated ApplicationInstance.cs to use ReadExactly for reading messages from file stream. --- Source/Directory.Build.props | 2 +- Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj | 2 +- Source/Foundation/Windows/Shell/ApplicationInstance.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props index 270bede..5450f06 100644 --- a/Source/Directory.Build.props +++ b/Source/Directory.Build.props @@ -1,6 +1,6 @@ - $(NoWarn);CA1416;CA2022 + $(NoWarn);CA1416 diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index 6c450a4..70b61c2 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -9,7 +9,7 @@ AnyCPU;x86 - 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073;NU1603;CA2022 + 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073;NU1603 publish\ diff --git a/Source/Foundation/Windows/Shell/ApplicationInstance.cs b/Source/Foundation/Windows/Shell/ApplicationInstance.cs index 626c40f..bc80ba2 100644 --- a/Source/Foundation/Windows/Shell/ApplicationInstance.cs +++ b/Source/Foundation/Windows/Shell/ApplicationInstance.cs @@ -176,7 +176,7 @@ private object Receive() if (messageSize > 0) { byte[] message = new byte[messageSize]; - fs.Read(message, 0, messageSize); + fs.ReadExactly(message, 0, messageSize); return JsonSerializer.Deserialize(new MemoryStream(message)); } From a1d83f832873d36c575e4552997c372a23509ddc Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:34:05 -0500 Subject: [PATCH 09/26] fix: update HTML link encoding in DataObjectExtensions - Changed the URI encoding method in SetHtml to use WebUtility.HtmlEncode for absoluteUri to ensure proper HTML formatting. --- .../Microsoft.Tools.TeamMate.Foundation.csproj | 10 +++++----- .../Windows/Transfer/DataObjectExtensions.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index 70b61c2..b24eaee 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -9,29 +9,29 @@ AnyCPU;x86 - 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073;NU1603 + 467;618;CA1416;SYSLIB0051;CS0472;CS8073;NU1603 publish\ bin\x64\Debug\ true - 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073 + 467;618;CA1416;SYSLIB0051;CS0472;CS8073 x86 bin\x64\Release\ true - 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073 + 467;618;CA1416;SYSLIB0051;CS0472;CS8073 bin\x86\Debug\ true - 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073 + 467;618;CA1416;SYSLIB0051;CS0472;CS8073 bin\x86\Release\ true - 467;618;CA1416;SYSLIB0013;SYSLIB0051;CS0472;CS8073 + 467;618;CA1416;SYSLIB0051;CS0472;CS8073 diff --git a/Source/Foundation/Windows/Transfer/DataObjectExtensions.cs b/Source/Foundation/Windows/Transfer/DataObjectExtensions.cs index 76c3f2f..f9ad31c 100644 --- a/Source/Foundation/Windows/Transfer/DataObjectExtensions.cs +++ b/Source/Foundation/Windows/Transfer/DataObjectExtensions.cs @@ -82,7 +82,7 @@ public static void SetUri(this IDataObject dataObject, Uri uri, string descripti if(!dataObject.GetDataPresent(DataFormats.Html) && description != null) { - dataObject.SetHtml($"{WebUtility.HtmlEncode(description)}"); + dataObject.SetHtml($"{WebUtility.HtmlEncode(description)}"); } if (!dataObject.ContainsFileGroup()) From 82f6ed31abeb153629cec1c640f26c1bf4abdf90 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:36:30 -0500 Subject: [PATCH 10/26] fix: clean up NoWarn properties and improve icon handle checks - Removed unnecessary warning codes from NoWarn properties in project files. - Updated icon handle checks in InteropUtilities to use IntPtr.Zero instead of null for better clarity and consistency. --- .../Microsoft.Tools.TeamMate.Foundation.csproj | 10 +++++----- Source/Foundation/Windows/Controls/HintTextAdorner.cs | 2 +- Source/Foundation/Windows/Interop/InteropUtilities.cs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index b24eaee..9439893 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -9,29 +9,29 @@ AnyCPU;x86 - 467;618;CA1416;SYSLIB0051;CS0472;CS8073;NU1603 + 467;618;CA1416;SYSLIB0051;NU1603 publish\ bin\x64\Debug\ true - 467;618;CA1416;SYSLIB0051;CS0472;CS8073 + 467;618;CA1416;SYSLIB0051 x86 bin\x64\Release\ true - 467;618;CA1416;SYSLIB0051;CS0472;CS8073 + 467;618;CA1416;SYSLIB0051 bin\x86\Debug\ true - 467;618;CA1416;SYSLIB0051;CS0472;CS8073 + 467;618;CA1416;SYSLIB0051 bin\x86\Release\ true - 467;618;CA1416;SYSLIB0051;CS0472;CS8073 + 467;618;CA1416;SYSLIB0051 diff --git a/Source/Foundation/Windows/Controls/HintTextAdorner.cs b/Source/Foundation/Windows/Controls/HintTextAdorner.cs index 896a206..817425d 100644 --- a/Source/Foundation/Windows/Controls/HintTextAdorner.cs +++ b/Source/Foundation/Windows/Controls/HintTextAdorner.cs @@ -189,7 +189,7 @@ protected override void OnRender(DrawingContext drawingContext) // Draw the hint text on top of the control FontStyle fontStyle = HintTextFontStyle; - if (fontStyle == null) + if (fontStyle == FontStyles.Normal) { fontStyle = control.FontStyle; } diff --git a/Source/Foundation/Windows/Interop/InteropUtilities.cs b/Source/Foundation/Windows/Interop/InteropUtilities.cs index 2615bc1..258b136 100644 --- a/Source/Foundation/Windows/Interop/InteropUtilities.cs +++ b/Source/Foundation/Windows/Interop/InteropUtilities.cs @@ -150,7 +150,7 @@ public static IntPtr GetWindowIcon(IntPtr hwnd, WindowIconType type) case WindowIconType.SmallOrAny: iconHandle = GetSmallWindowIcon(hwnd); - if (iconHandle == null) + if (iconHandle == IntPtr.Zero) { iconHandle = GetLargeWindowIcon(hwnd); } @@ -158,7 +158,7 @@ public static IntPtr GetWindowIcon(IntPtr hwnd, WindowIconType type) case WindowIconType.LargeOrAny: iconHandle = GetLargeWindowIcon(hwnd); - if (iconHandle == null) + if (iconHandle == IntPtr.Zero) { iconHandle = GetSmallWindowIcon(hwnd); } From f57975ab45b5173afa019c8a480056f431290628 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:38:46 -0500 Subject: [PATCH 11/26] fix: clean up NoWarn properties and suppress SYSLIB0051 warning in HttpUtility --- .../Microsoft.Tools.TeamMate.Foundation.csproj | 10 +++++----- Source/Foundation/Web/HttpUtility.cs | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index 9439893..7d0ba29 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -9,29 +9,29 @@ AnyCPU;x86 - 467;618;CA1416;SYSLIB0051;NU1603 + 467;618;CA1416;NU1603 publish\ bin\x64\Debug\ true - 467;618;CA1416;SYSLIB0051 + 467;618;CA1416 x86 bin\x64\Release\ true - 467;618;CA1416;SYSLIB0051 + 467;618;CA1416 bin\x86\Debug\ true - 467;618;CA1416;SYSLIB0051 + 467;618;CA1416 bin\x86\Release\ true - 467;618;CA1416;SYSLIB0051 + 467;618;CA1416 diff --git a/Source/Foundation/Web/HttpUtility.cs b/Source/Foundation/Web/HttpUtility.cs index 37af75a..228b5a3 100644 --- a/Source/Foundation/Web/HttpUtility.cs +++ b/Source/Foundation/Web/HttpUtility.cs @@ -748,10 +748,12 @@ internal HttpValueCollection(int capacity) { } +#pragma warning disable SYSLIB0051 // Type or member is obsolete protected HttpValueCollection(SerializationInfo info, StreamingContext context) : base(info, context) { } +#pragma warning restore SYSLIB0051 internal void MakeReadOnly() { From 43f71a169486968f0b6848826a3c8b24e6e9ad23 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:44:57 -0500 Subject: [PATCH 12/26] fix: clean up NoWarn properties in project files - Removed warning codes 467 and 618 from NoWarn properties in multiple project files. - Updated FormattedText instantiation to include DPI information in HintTextAdorner and UI classes. - Improved file handling in ApplicationInstance by using SafeFileHandle. --- .../Microsoft.Tools.TeamMate.Foundation.csproj | 10 +++++----- Source/Foundation/Windows/Controls/HintTextAdorner.cs | 3 ++- Source/Foundation/Windows/Shell/ApplicationInstance.cs | 4 ++-- Source/Foundation/Windows/UI.cs | 3 ++- ...crosoft.Tools.TeamMate.TeamFoundation.WebApi.csproj | 10 +++++----- Source/TeamMate/TeamMate.csproj | 2 -- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index 7d0ba29..15badb0 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -9,29 +9,29 @@ AnyCPU;x86 - 467;618;CA1416;NU1603 + CA1416;NU1603 publish\ bin\x64\Debug\ true - 467;618;CA1416 + CA1416 x86 bin\x64\Release\ true - 467;618;CA1416 + CA1416 bin\x86\Debug\ true - 467;618;CA1416 + CA1416 bin\x86\Release\ true - 467;618;CA1416 + CA1416 diff --git a/Source/Foundation/Windows/Controls/HintTextAdorner.cs b/Source/Foundation/Windows/Controls/HintTextAdorner.cs index 817425d..db084c6 100644 --- a/Source/Foundation/Windows/Controls/HintTextAdorner.cs +++ b/Source/Foundation/Windows/Controls/HintTextAdorner.cs @@ -194,9 +194,10 @@ protected override void OnRender(DrawingContext drawingContext) fontStyle = control.FontStyle; } + var dpiInfo = VisualTreeHelper.GetDpi(control); FormattedText text = new FormattedText(hintText, uiCulture, control.FlowDirection, new Typeface(control.FontFamily, fontStyle, control.FontWeight, control.FontStretch), - control.FontSize, renderBrush); + control.FontSize, renderBrush, dpiInfo.PixelsPerDip); text.TextAlignment = GetTextAlignment(); text.MaxTextHeight = Math.Max(control.ActualHeight, 1.0); diff --git a/Source/Foundation/Windows/Shell/ApplicationInstance.cs b/Source/Foundation/Windows/Shell/ApplicationInstance.cs index bc80ba2..85b9c75 100644 --- a/Source/Foundation/Windows/Shell/ApplicationInstance.cs +++ b/Source/Foundation/Windows/Shell/ApplicationInstance.cs @@ -169,8 +169,8 @@ private object Receive() while (numberOfMessages > 0) { - // KLUDGE: Using deprecated API to prevent slot handle from being closed! - using (FileStream fs = new FileStream(mailslotHandle.DangerousGetHandle(), FileAccess.Read, false)) + // Using SafeFileHandle to prevent slot handle from being closed + using (FileStream fs = new FileStream(new SafeFileHandle(mailslotHandle.DangerousGetHandle(), ownsHandle: false), FileAccess.Read)) { // Sometimes we get messages of size 0, these have to be "read" and discarded from the queue to check for future messages... if (messageSize > 0) diff --git a/Source/Foundation/Windows/UI.cs b/Source/Foundation/Windows/UI.cs index 0a0cfbc..8a955af 100644 --- a/Source/Foundation/Windows/UI.cs +++ b/Source/Foundation/Windows/UI.cs @@ -513,9 +513,10 @@ private static void InvalidateToolTip(TextBlock textBlock) private static bool IsTextTrimmed(TextBlock textBlock) { Typeface typeface = new Typeface(textBlock.FontFamily, textBlock.FontStyle, textBlock.FontWeight, textBlock.FontStretch); + var dpiInfo = VisualTreeHelper.GetDpi(textBlock); FormattedText formattedText = new FormattedText(textBlock.Text, Thread.CurrentThread.CurrentCulture, - textBlock.FlowDirection, typeface, textBlock.FontSize, textBlock.Foreground); + textBlock.FlowDirection, typeface, textBlock.FontSize, textBlock.Foreground, dpiInfo.PixelsPerDip); return formattedText.Width > textBlock.ActualWidth; } diff --git a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj index e3363a7..76e463e 100644 --- a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj +++ b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj @@ -7,24 +7,24 @@ AnyCPU;x86 - 467;618;NU1701 + NU1701 publish\ bin\x64\Debug\ - 467;618;NU1701 + NU1701 bin\x64\Release\ - 467;618;NU1701 + NU1701 bin\x86\Debug\ - 467;618;NU1701 + NU1701 bin\x86\Release\ - 467;618;NU1701 + NU1701 diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index 3e32ea3..518f040 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -511,11 +511,9 @@ bin\x86\Debug\ - 467;618 bin\x86\Release\ - 467;618 From c1edacca84edca470a6636e27981c7c2e1c6b7e3 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 13:47:23 -0500 Subject: [PATCH 13/26] fix: remove obsolete serialization constructor from HttpValueCollection --- Source/Foundation/Web/HttpUtility.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Source/Foundation/Web/HttpUtility.cs b/Source/Foundation/Web/HttpUtility.cs index 228b5a3..7fbd8b8 100644 --- a/Source/Foundation/Web/HttpUtility.cs +++ b/Source/Foundation/Web/HttpUtility.cs @@ -726,7 +726,6 @@ internal String GetString() // *** Source: ndp/fx/src/xsp/system/web/httpvaluecollection.cs - [Serializable()] internal class HttpValueCollection : NameValueCollection { internal HttpValueCollection() @@ -748,13 +747,6 @@ internal HttpValueCollection(int capacity) { } -#pragma warning disable SYSLIB0051 // Type or member is obsolete - protected HttpValueCollection(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } -#pragma warning restore SYSLIB0051 - internal void MakeReadOnly() { IsReadOnly = true; From 60ae38df76f918094c387303e467a0460996de70 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 14:22:12 -0500 Subject: [PATCH 14/26] fix: clean up NoWarn properties and add platform support attributes - Removed obsolete CA1416 warning suppression from project files. - Added SupportedOSPlatform attributes to AssemblyInfo.cs files for better platform targeting. --- Source/Directory.Build.props | 4 ---- Source/Foundation/Chaos/ChaosMonkey.cs | 2 ++ Source/Foundation/Chaos/ChaosScenario.cs | 2 ++ .../Microsoft.Tools.TeamMate.Foundation.csproj | 8 ++------ Source/Foundation/Properties/AssemblyInfo.cs | 4 ++++ Source/Foundation/Threading/SingleTaskRunner.cs | 2 ++ Source/Foundation/Threading/TaskContext.cs | 2 ++ .../Foundation/Windows/Controls/Data/ListFieldInfo.cs | 2 ++ Source/Foundation/Windows/Input/CommandDictionary.cs | 2 ++ Source/Foundation/Windows/MVVM/ViewCatalog.cs | 2 ++ Source/Foundation/Windows/Shell/ApplicationInstance.cs | 2 ++ .../Foundation/Windows/Transfer/CustomDataFormats.cs | 4 +++- Source/Foundation/Windows/WindowStateInfo.cs | 4 +++- Source/TeamMate/App.xaml.cs | 4 +++- Source/TeamMate/Controls/BowtieIcon.cs | 4 +++- Source/TeamMate/Controls/DropDownSelector.xaml.cs | 4 +++- Source/TeamMate/Controls/MsnIcon.cs | 4 +++- Source/TeamMate/Controls/NavigationFrame.xaml.cs | 4 +++- Source/TeamMate/Controls/OverlayTextIcon.xaml.cs | 4 +++- Source/TeamMate/Controls/QueryPickerControl.xaml.cs | 4 +++- Source/TeamMate/Controls/TeamMemberView.xaml.cs | 4 +++- Source/TeamMate/Controls/TileCollectionView.xaml.cs | 4 +++- Source/TeamMate/Controls/TileView.xaml.cs | 4 +++- Source/TeamMate/Controls/WorkItemRowView.xaml.cs | 4 +++- .../TeamMate/Converters/PullRequestStatusConverter.cs | 4 +++- Source/TeamMate/Converters/TeamMateConverters.cs | 4 +++- Source/TeamMate/Model/Actions/ActionSerializer.cs | 6 ++++-- Source/TeamMate/Model/Application.cs | 4 +++- Source/TeamMate/Model/ApplicationHistory.cs | 4 +++- Source/TeamMate/Model/ConditionalFormattingRule.cs | 4 +++- Source/TeamMate/Model/ConnectionInfo.cs | 4 +++- Source/TeamMate/Model/Counter.cs | 4 +++- Source/TeamMate/Model/DefaultWorkItemInfo.cs | 4 +++- Source/TeamMate/Model/ItemCountSummary.cs | 5 ++++- Source/TeamMate/Model/ProjectContext.cs | 4 +++- Source/TeamMate/Model/ProjectContextSerializer.cs | 4 +++- Source/TeamMate/Model/ProjectInfo.cs | 4 +++- Source/TeamMate/Model/ProjectReference.cs | 4 +++- Source/TeamMate/Model/PullRequestReference.cs | 5 ++++- Source/TeamMate/Model/Session.cs | 4 +++- Source/TeamMate/Model/Settings/ApplicationSettings.cs | 7 +++++-- Source/TeamMate/Model/Settings/DeveloperSettings.cs | 5 ++++- Source/TeamMate/Model/Settings/SettingsBase.cs | 4 +++- Source/TeamMate/Model/Settings/SettingsSerializer.cs | 2 ++ Source/TeamMate/Model/Settings/VolatileSettings.cs | 4 +++- Source/TeamMate/Model/TeamMateApplicationInfo.cs | 4 +++- Source/TeamMate/Model/TileInfo.cs | 4 +++- Source/TeamMate/Model/TrackingInfo.cs | 4 +++- Source/TeamMate/Model/WorkItemQueryReference.cs | 4 +++- Source/TeamMate/Model/WorkItemReference.cs | 5 ++++- Source/TeamMate/Model/WorkItemTypeInfo.cs | 4 +++- Source/TeamMate/Model/WorkItemTypeReference.cs | 6 ++++-- Source/TeamMate/Pages/DeveloperOptionsPage.xaml.cs | 4 +++- Source/TeamMate/Pages/HomePage.xaml.cs | 6 ++++-- Source/TeamMate/Pages/NewWorkItemPage.xaml.cs | 4 +++- Source/TeamMate/Pages/ProjectsPage.xaml.cs | 4 +++- Source/TeamMate/Pages/PullRequestsPage.xaml.cs | 4 +++- Source/TeamMate/Pages/SearchPage.xaml.cs | 4 +++- Source/TeamMate/Pages/SettingsPage.xaml.cs | 4 +++- Source/TeamMate/Pages/WorkItemsPage.xaml.cs | 4 +++- Source/TeamMate/Properties/AssemblyInfo.cs | 4 ++++ Source/TeamMate/Resources/SampleData.cs | 4 +++- Source/TeamMate/Resources/TeamMateCommands.cs | 2 ++ Source/TeamMate/Resources/TeamMateResources.cs | 4 +++- Source/TeamMate/Services/ApplicationService.cs | 4 +++- Source/TeamMate/Services/AsyncWriterService.cs | 4 +++- Source/TeamMate/Services/BackgroundTaskService.cs | 4 +++- Source/TeamMate/Services/CollaborationService.cs | 4 +++- Source/TeamMate/Services/CommandLineService.cs | 4 +++- Source/TeamMate/Services/ConfigurationService.cs | 4 +++- Source/TeamMate/Services/ExternalWebBrowserService.cs | 4 +++- Source/TeamMate/Services/FileDialogService.cs | 4 +++- Source/TeamMate/Services/GlobalCommandService.cs | 4 +++- Source/TeamMate/Services/HistoryService.cs | 4 +++- Source/TeamMate/Services/MessageBoxService.cs | 4 +++- Source/TeamMate/Services/ProjectDataService.cs | 4 +++- Source/TeamMate/Services/SearchService.cs | 5 ++++- Source/TeamMate/Services/SessionService.cs | 4 +++- Source/TeamMate/Services/SettingsService.cs | 6 ++++-- Source/TeamMate/Services/StatusService.cs | 4 +++- Source/TeamMate/Services/ToastNotificationService.cs | 5 ++++- Source/TeamMate/Services/TracingService.cs | 4 +++- Source/TeamMate/Services/TrackingService.cs | 10 +++++++++- Source/TeamMate/Services/UIService.cs | 4 +++- Source/TeamMate/Services/UpgradeService.cs | 4 +++- Source/TeamMate/Services/ViewService.cs | 2 ++ Source/TeamMate/Services/VstsConnectionService.cs | 4 +++- Source/TeamMate/Services/WindowService.cs | 4 +++- Source/TeamMate/TeamMate.csproj | 2 +- Source/TeamMate/Utilities/ChaosScenarios.cs | 2 ++ Source/TeamMate/Utilities/ClipboardFileExporter.cs | 2 ++ Source/TeamMate/Utilities/CommandLineArgs.cs | 4 +++- Source/TeamMate/Utilities/CustomToastManager.cs | 4 +++- Source/TeamMate/Utilities/DataObjectFactory.cs | 4 +++- Source/TeamMate/Utilities/FileUtilities.cs | 4 +++- Source/TeamMate/Utilities/Formatter.cs | 4 +++- Source/TeamMate/Utilities/ScheduledAction.cs | 4 +++- Source/TeamMate/Utilities/SearchExpression.cs | 4 +++- Source/TeamMate/Utilities/SearchTextHighlighter.cs | 4 +++- Source/TeamMate/Utilities/WinFormsUtilities.cs | 4 +++- Source/TeamMate/Utilities/WindowStateTracker.cs | 2 ++ Source/TeamMate/Utilities/WindowsToastManager.cs | 4 +++- Source/TeamMate/Utilities/WorkItemHtmlFormatter.cs | 4 +++- Source/TeamMate/Utilities/WorkItemHtmlGenerator.cs | 4 +++- Source/TeamMate/Utilities/WorkItemTextGenerator.cs | 4 +++- Source/TeamMate/ViewModels/ChaosMonkeyViewModel.cs | 4 +++- Source/TeamMate/ViewModels/CustomDialogViewModel.cs | 4 +++- .../ViewModels/DeveloperOptionsPageViewModel.cs | 4 +++- .../TeamMate/ViewModels/FlaggedWorkItemsViewModel.cs | 4 +++- Source/TeamMate/ViewModels/HomePageViewModel.cs | 4 +++- Source/TeamMate/ViewModels/MainWindowViewModel.cs | 4 +++- Source/TeamMate/ViewModels/NavigationViewModel.cs | 4 +++- Source/TeamMate/ViewModels/NewWorkItemPageViewModel.cs | 4 +++- Source/TeamMate/ViewModels/OverviewWindowViewModel.cs | 4 +++- Source/TeamMate/ViewModels/PageViewModelBase.cs | 4 +++- .../ViewModels/ProjectPickerDialogViewModel.cs | 4 +++- Source/TeamMate/ViewModels/ProjectsPageViewModel.cs | 4 +++- Source/TeamMate/ViewModels/PullRequestPageViewModel.cs | 4 +++- .../TeamMate/ViewModels/PullRequestPickerViewModel.cs | 4 +++- .../ViewModels/PullRequestQueryTileViewModel.cs | 4 +++- .../TeamMate/ViewModels/PullRequestQueryViewModel.cs | 4 +++- Source/TeamMate/ViewModels/PullRequestRowViewModel.cs | 4 +++- .../TeamMate/ViewModels/QueryHierarchyItemViewModel.cs | 4 +++- Source/TeamMate/ViewModels/QueryViewModelBase.cs | 4 +++- Source/TeamMate/ViewModels/SearchPageViewModel.cs | 4 +++- Source/TeamMate/ViewModels/SettingsPageViewModel.cs | 4 +++- Source/TeamMate/ViewModels/TileCollectionViewModel.cs | 4 +++- Source/TeamMate/ViewModels/TileViewModel.cs | 4 +++- Source/TeamMate/ViewModels/ToastViewModel.cs | 4 +++- Source/TeamMate/ViewModels/TrackableViewModelBase.cs | 4 +++- .../ViewModels/WorkItemAddTagsDialogViewModel.cs | 4 +++- .../TeamMate/ViewModels/WorkItemQueryTileViewModel.cs | 6 ++++-- Source/TeamMate/ViewModels/WorkItemQueryViewModel.cs | 4 +++- Source/TeamMate/ViewModels/WorkItemRowViewModel.cs | 4 +++- Source/TeamMate/ViewModels/WorkItemsPageViewModel.cs | 4 +++- Source/TeamMate/Windows/CustomDialog.xaml.cs | 4 +++- Source/TeamMate/Windows/CustomToastWindow.xaml.cs | 4 +++- Source/TeamMate/Windows/MainWindow.xaml.cs | 4 +++- Source/TeamMate/Windows/OverviewWindow.xaml.cs | 4 +++- Source/TeamMate/Windows/ProjectPickerDialog.xaml.cs | 4 +++- .../Windows/PullRequestQueryEditorDialog.xaml.cs | 4 +++- Source/TeamMate/Windows/QuickSearchWindow.xaml.cs | 5 ++++- Source/TeamMate/Windows/WorkItemAddTagsDialog.xaml.cs | 4 +++- .../TeamMate/Windows/WorkItemQueryPickerDialog.xaml.cs | 4 +++- .../Microsoft.Tools.TeamMate.WindowsRuntime.csproj | 1 - Source/WindowsRuntime/Properties/AssemblyInfo.cs | 4 ++++ 146 files changed, 438 insertions(+), 143 deletions(-) diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props index 5450f06..8c119d5 100644 --- a/Source/Directory.Build.props +++ b/Source/Directory.Build.props @@ -1,6 +1,2 @@ - - - $(NoWarn);CA1416 - diff --git a/Source/Foundation/Chaos/ChaosMonkey.cs b/Source/Foundation/Chaos/ChaosMonkey.cs index 57c479e..bc7c15b 100644 --- a/Source/Foundation/Chaos/ChaosMonkey.cs +++ b/Source/Foundation/Chaos/ChaosMonkey.cs @@ -1,9 +1,11 @@ using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using System; +using System.Runtime.Versioning; using System.Threading.Tasks; namespace Microsoft.Tools.TeamMate.Foundation.Chaos { + [SupportedOSPlatform("windows10.0.19041.0")] public static class ChaosMonkey { [ThreadStatic] diff --git a/Source/Foundation/Chaos/ChaosScenario.cs b/Source/Foundation/Chaos/ChaosScenario.cs index 569edd7..705c4bc 100644 --- a/Source/Foundation/Chaos/ChaosScenario.cs +++ b/Source/Foundation/Chaos/ChaosScenario.cs @@ -3,12 +3,14 @@ using System.ComponentModel; using System.Linq; using System.Reflection; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Foundation.Chaos { /// /// Defines a chaos scenario and its metadata for use by the Chaos moneky. /// + [SupportedOSPlatform("windows10.0.19041.0")] public class ChaosScenario : INotifyPropertyChanged { public const double NeverFail = 0.0; diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index 15badb0..6e64ad7 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -1,6 +1,6 @@  - net9.0-windows + net9.0-windows10.0.19041.0 true Library false @@ -9,29 +9,25 @@ AnyCPU;x86 - CA1416;NU1603 + NU1603 publish\ bin\x64\Debug\ true - CA1416 x86 bin\x64\Release\ true - CA1416 bin\x86\Debug\ true - CA1416 bin\x86\Release\ true - CA1416 diff --git a/Source/Foundation/Properties/AssemblyInfo.cs b/Source/Foundation/Properties/AssemblyInfo.cs index c713b86..ca2e1a2 100644 --- a/Source/Foundation/Properties/AssemblyInfo.cs +++ b/Source/Foundation/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Windows; // General Information about an assembly is controlled through the following @@ -8,6 +9,9 @@ [assembly: AssemblyTitle("Foundation")] [assembly: AssemblyDescription("")] +// Platform support +[assembly: SupportedOSPlatform("windows10.0.19041.0")] + // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. diff --git a/Source/Foundation/Threading/SingleTaskRunner.cs b/Source/Foundation/Threading/SingleTaskRunner.cs index 916b84a..c7089e6 100644 --- a/Source/Foundation/Threading/SingleTaskRunner.cs +++ b/Source/Foundation/Threading/SingleTaskRunner.cs @@ -1,5 +1,6 @@ using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using System; +using System.Runtime.Versioning; using System.Threading.Tasks; namespace Microsoft.Tools.TeamMate.Foundation.Threading @@ -8,6 +9,7 @@ namespace Microsoft.Tools.TeamMate.Foundation.Threading /// A utility class to only execute a task if a previous instance of the same task /// was not already running. /// + [SupportedOSPlatform("windows10.0.19041.0")] public class SingleTaskRunner { private object syncLock = new object(); diff --git a/Source/Foundation/Threading/TaskContext.cs b/Source/Foundation/Threading/TaskContext.cs index 70883b4..0175b17 100644 --- a/Source/Foundation/Threading/TaskContext.cs +++ b/Source/Foundation/Threading/TaskContext.cs @@ -1,6 +1,7 @@ using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using System; using System.Diagnostics; +using System.Runtime.Versioning; using System.Threading; namespace Microsoft.Tools.TeamMate.Foundation.Threading @@ -8,6 +9,7 @@ namespace Microsoft.Tools.TeamMate.Foundation.Threading /// /// A default implementation of a task context interface. /// + [SupportedOSPlatform("windows10.0.19041.0")] public class TaskContext : ObservableObjectBase, ITaskContext, IDisposable { private const double CompletedProgress = 1.0; diff --git a/Source/Foundation/Windows/Controls/Data/ListFieldInfo.cs b/Source/Foundation/Windows/Controls/Data/ListFieldInfo.cs index 6d8901d..56f9fb0 100644 --- a/Source/Foundation/Windows/Controls/Data/ListFieldInfo.cs +++ b/Source/Foundation/Windows/Controls/Data/ListFieldInfo.cs @@ -1,6 +1,7 @@ using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using System; using System.ComponentModel; +using System.Runtime.Versioning; using System.Windows.Data; namespace Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data @@ -8,6 +9,7 @@ namespace Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data /// /// Represents a field displayed in a list view. /// + [SupportedOSPlatform("windows10.0.19041.0")] public class ListFieldInfo : ObservableObjectBase, ISelectableItem { private string name; diff --git a/Source/Foundation/Windows/Input/CommandDictionary.cs b/Source/Foundation/Windows/Input/CommandDictionary.cs index b807f5b..dab3625 100644 --- a/Source/Foundation/Windows/Input/CommandDictionary.cs +++ b/Source/Foundation/Windows/Input/CommandDictionary.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; using System.Runtime.CompilerServices; +using System.Runtime.Versioning; using System.Windows; using System.Windows.Input; namespace Microsoft.Tools.TeamMate.Foundation.Windows.Input { + [SupportedOSPlatform("windows10.0.19041.0")] public class CommandDictionary { private IDictionary commands = new Dictionary(); diff --git a/Source/Foundation/Windows/MVVM/ViewCatalog.cs b/Source/Foundation/Windows/MVVM/ViewCatalog.cs index 14bd690..c6cf186 100644 --- a/Source/Foundation/Windows/MVVM/ViewCatalog.cs +++ b/Source/Foundation/Windows/MVVM/ViewCatalog.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using System.Runtime.Versioning; using System.Windows; namespace Microsoft.Tools.TeamMate.Foundation.Windows.MVVM { + [SupportedOSPlatform("windows10.0.19041.0")] public class ViewCatalog { private IDictionary viewMap = new Dictionary(); diff --git a/Source/Foundation/Windows/Shell/ApplicationInstance.cs b/Source/Foundation/Windows/Shell/ApplicationInstance.cs index 85b9c75..f852c56 100644 --- a/Source/Foundation/Windows/Shell/ApplicationInstance.cs +++ b/Source/Foundation/Windows/Shell/ApplicationInstance.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Text.Json; using System.Security.AccessControl; using System.Security.Principal; @@ -12,6 +13,7 @@ namespace Microsoft.Tools.TeamMate.Foundation.Windows.Shell { + [SupportedOSPlatform("windows10.0.19041.0")] public class ApplicationInstance : IDisposable { /// diff --git a/Source/Foundation/Windows/Transfer/CustomDataFormats.cs b/Source/Foundation/Windows/Transfer/CustomDataFormats.cs index a98c7c4..4a60113 100644 --- a/Source/Foundation/Windows/Transfer/CustomDataFormats.cs +++ b/Source/Foundation/Windows/Transfer/CustomDataFormats.cs @@ -1,6 +1,8 @@ - +using System.Runtime.Versioning; + namespace Microsoft.Tools.TeamMate.Foundation.Windows.Transfer { + [SupportedOSPlatform("windows10.0.19041.0")] public static class CustomDataFormats { public const string FileGroupDescriptorW = "FileGroupDescriptorW"; diff --git a/Source/Foundation/Windows/WindowStateInfo.cs b/Source/Foundation/Windows/WindowStateInfo.cs index 5ae7cac..ecf517c 100644 --- a/Source/Foundation/Windows/WindowStateInfo.cs +++ b/Source/Foundation/Windows/WindowStateInfo.cs @@ -1,7 +1,9 @@ -using System.Windows; +using System.Runtime.Versioning; +using System.Windows; namespace Microsoft.Tools.TeamMate.Foundation.Windows { + [SupportedOSPlatform("windows10.0.19041.0")] public class WindowStateInfo { public Rect RestoreBounds { get; private set; } diff --git a/Source/TeamMate/App.xaml.cs b/Source/TeamMate/App.xaml.cs index e94448a..b6fd456 100644 --- a/Source/TeamMate/App.xaml.cs +++ b/Source/TeamMate/App.xaml.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using System; using System.Windows; using TeamMateApplication = Microsoft.Tools.TeamMate.Model.Application; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate { /// /// Interaction logic for App.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class App : System.Windows.Application { public TeamMateApplication Application { get; private set; } diff --git a/Source/TeamMate/Controls/BowtieIcon.cs b/Source/TeamMate/Controls/BowtieIcon.cs index 755ba6d..f43c17e 100644 --- a/Source/TeamMate/Controls/BowtieIcon.cs +++ b/Source/TeamMate/Controls/BowtieIcon.cs @@ -1,8 +1,10 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; +using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; using System.Windows; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { + [SupportedOSPlatform("windows10.0.19041.0")] public class BowtieIcon : FontIcon { public static readonly DependencyProperty BowtieProperty = DependencyProperty.Register( diff --git a/Source/TeamMate/Controls/DropDownSelector.xaml.cs b/Source/TeamMate/Controls/DropDownSelector.xaml.cs index c9ae65d..a5959ea 100644 --- a/Source/TeamMate/Controls/DropDownSelector.xaml.cs +++ b/Source/TeamMate/Controls/DropDownSelector.xaml.cs @@ -1,15 +1,17 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data; +using Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data; using Microsoft.Tools.TeamMate.Foundation.Windows.Media; using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { /// /// Interaction logic for DropDownSelector.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class DropDownSelector : UserControl { public DropDownSelector() diff --git a/Source/TeamMate/Controls/MsnIcon.cs b/Source/TeamMate/Controls/MsnIcon.cs index 6f90494..f31497d 100644 --- a/Source/TeamMate/Controls/MsnIcon.cs +++ b/Source/TeamMate/Controls/MsnIcon.cs @@ -1,8 +1,10 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; +using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; using System.Windows; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { + [SupportedOSPlatform("windows10.0.19041.0")] public class MsnIcon : FontIcon { public static readonly DependencyProperty MsnProperty = DependencyProperty.Register( diff --git a/Source/TeamMate/Controls/NavigationFrame.xaml.cs b/Source/TeamMate/Controls/NavigationFrame.xaml.cs index 7c15ca6..2577bd3 100644 --- a/Source/TeamMate/Controls/NavigationFrame.xaml.cs +++ b/Source/TeamMate/Controls/NavigationFrame.xaml.cs @@ -1,14 +1,16 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; +using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; using Microsoft.Tools.TeamMate.Services; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { /// /// Interaction logic for NavigationFrame.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class NavigationFrame : UserControl { public NavigationFrame() diff --git a/Source/TeamMate/Controls/OverlayTextIcon.xaml.cs b/Source/TeamMate/Controls/OverlayTextIcon.xaml.cs index 3724918..920f3f5 100644 --- a/Source/TeamMate/Controls/OverlayTextIcon.xaml.cs +++ b/Source/TeamMate/Controls/OverlayTextIcon.xaml.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.Media.Imaging; +using Microsoft.Tools.TeamMate.Foundation.Windows.Media.Imaging; using System.Windows; using System.Windows.Controls; using System.Windows.Media.Imaging; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { /// /// Interaction logic for OverlayTextIcon.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class OverlayTextIcon : UserControl { public OverlayTextIcon() diff --git a/Source/TeamMate/Controls/QueryPickerControl.xaml.cs b/Source/TeamMate/Controls/QueryPickerControl.xaml.cs index 22c1d7b..f175c55 100644 --- a/Source/TeamMate/Controls/QueryPickerControl.xaml.cs +++ b/Source/TeamMate/Controls/QueryPickerControl.xaml.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; using Microsoft.Tools.TeamMate.ViewModels; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; @@ -6,12 +6,14 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { /// /// Interaction logic for QueryPickerControl.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class QueryPickerControl : UserControl { public static readonly DependencyProperty HasSelectedQueryProperty = DependencyProperty.Register( diff --git a/Source/TeamMate/Controls/TeamMemberView.xaml.cs b/Source/TeamMate/Controls/TeamMemberView.xaml.cs index 653329e..7f82766 100644 --- a/Source/TeamMate/Controls/TeamMemberView.xaml.cs +++ b/Source/TeamMate/Controls/TeamMemberView.xaml.cs @@ -1,15 +1,17 @@ -using Microsoft.Tools.TeamMate.Foundation.Shell; +using Microsoft.Tools.TeamMate.Foundation.Shell; using System; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { /// /// Interaction logic for TeamMemberView.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class TeamMemberView : UserControl { public TeamMemberView() diff --git a/Source/TeamMate/Controls/TileCollectionView.xaml.cs b/Source/TeamMate/Controls/TileCollectionView.xaml.cs index 8325985..1d8b9ae 100644 --- a/Source/TeamMate/Controls/TileCollectionView.xaml.cs +++ b/Source/TeamMate/Controls/TileCollectionView.xaml.cs @@ -1,15 +1,17 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { /// /// Interaction logic for TileCollectionView.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class TileCollectionView : UserControl { static TileCollectionView() diff --git a/Source/TeamMate/Controls/TileView.xaml.cs b/Source/TeamMate/Controls/TileView.xaml.cs index 23e9077..27a508c 100644 --- a/Source/TeamMate/Controls/TileView.xaml.cs +++ b/Source/TeamMate/Controls/TileView.xaml.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows.Controls; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { /// /// Interaction logic for TileView.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class TileView : UserControl { private bool buttonPressed; diff --git a/Source/TeamMate/Controls/WorkItemRowView.xaml.cs b/Source/TeamMate/Controls/WorkItemRowView.xaml.cs index 07d3424..800c676 100644 --- a/Source/TeamMate/Controls/WorkItemRowView.xaml.cs +++ b/Source/TeamMate/Controls/WorkItemRowView.xaml.cs @@ -1,12 +1,14 @@ -using Microsoft.Tools.TeamMate.ViewModels; +using Microsoft.Tools.TeamMate.ViewModels; using System.Linq; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Controls { /// /// Interaction logic for WorkItemRowView.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class WorkItemRowView : UserControl { private const int MaxTagsToDisplay = 3; diff --git a/Source/TeamMate/Converters/PullRequestStatusConverter.cs b/Source/TeamMate/Converters/PullRequestStatusConverter.cs index a0407e2..433d1db 100644 --- a/Source/TeamMate/Converters/PullRequestStatusConverter.cs +++ b/Source/TeamMate/Converters/PullRequestStatusConverter.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Resources; using Microsoft.Tools.TeamMate.ViewModels; using System; @@ -8,9 +8,11 @@ using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Converters { + [SupportedOSPlatform("windows10.0.19041.0")] public class PullRequestStatusConverter : OneWayConverterBase { public enum PullRequestStatus diff --git a/Source/TeamMate/Converters/TeamMateConverters.cs b/Source/TeamMate/Converters/TeamMateConverters.cs index 36224c3..086585b 100644 --- a/Source/TeamMate/Converters/TeamMateConverters.cs +++ b/Source/TeamMate/Converters/TeamMateConverters.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Controls; +using Microsoft.Tools.TeamMate.Controls; using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; @@ -9,9 +9,11 @@ using System.Windows.Controls; using System.Windows.Data; using System.Windows.Media; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Converters { + [SupportedOSPlatform("windows10.0.19041.0")] public static class TeamMateConverters { private static readonly Brush DefaultWorkItemBrush = BrushFromHex("#474747"); diff --git a/Source/TeamMate/Model/Actions/ActionSerializer.cs b/Source/TeamMate/Model/Actions/ActionSerializer.cs index ae8bcd1..0cd4463 100644 --- a/Source/TeamMate/Model/Actions/ActionSerializer.cs +++ b/Source/TeamMate/Model/Actions/ActionSerializer.cs @@ -1,11 +1,13 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Xml; using System; using System.Linq; using System.Xml.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model.Actions { + [SupportedOSPlatform("windows10.0.19041.0")] public class ActionSerializer { public TeamMateAction ReadAction(string filename) @@ -99,4 +101,4 @@ private static class Schema public static readonly string DeleteOnSave = "DeleteOnSave"; } } -} \ No newline at end of file +} diff --git a/Source/TeamMate/Model/Application.cs b/Source/TeamMate/Model/Application.cs index 8ba772d..cf7d385 100644 --- a/Source/TeamMate/Model/Application.cs +++ b/Source/TeamMate/Model/Application.cs @@ -1,10 +1,12 @@ -using Microsoft.Tools.TeamMate.Services; +using Microsoft.Tools.TeamMate.Services; using Microsoft.Tools.TeamMate.ViewModels; using SimpleInjector; using System.Threading.Tasks; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class Application { private Container container; diff --git a/Source/TeamMate/Model/ApplicationHistory.cs b/Source/TeamMate/Model/ApplicationHistory.cs index 1af37f4..d3d8a8a 100644 --- a/Source/TeamMate/Model/ApplicationHistory.cs +++ b/Source/TeamMate/Model/ApplicationHistory.cs @@ -1,10 +1,12 @@ -using Microsoft.Tools.TeamMate.Foundation.ComponentModel; +using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using Microsoft.Tools.TeamMate.Foundation.Xml; using System; using System.Xml.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class ApplicationHistory : ObservableObjectBase { private DateTime? lastRun; diff --git a/Source/TeamMate/Model/ConditionalFormattingRule.cs b/Source/TeamMate/Model/ConditionalFormattingRule.cs index 1bd7f3f..4366cf3 100644 --- a/Source/TeamMate/Model/ConditionalFormattingRule.cs +++ b/Source/TeamMate/Model/ConditionalFormattingRule.cs @@ -1,8 +1,10 @@ -using Microsoft.Tools.TeamMate.Foundation.ComponentModel; +using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class ConditionalFormattingRule : ObservableObjectBase { private bool isOneOrMoreItems; diff --git a/Source/TeamMate/Model/ConnectionInfo.cs b/Source/TeamMate/Model/ConnectionInfo.cs index b9b06bc..0e92206 100644 --- a/Source/TeamMate/Model/ConnectionInfo.cs +++ b/Source/TeamMate/Model/ConnectionInfo.cs @@ -1,8 +1,10 @@ -using Microsoft.Tools.TeamMate.Foundation.ComponentModel; +using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class ConnectionInfo : ObservableObjectBase { private ProjectInfo project; diff --git a/Source/TeamMate/Model/Counter.cs b/Source/TeamMate/Model/Counter.cs index 29f978d..9d21c78 100644 --- a/Source/TeamMate/Model/Counter.cs +++ b/Source/TeamMate/Model/Counter.cs @@ -1,8 +1,10 @@ -using Microsoft.Tools.TeamMate.Foundation.ComponentModel; +using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class Counter : ObservableObjectBase { private int count; diff --git a/Source/TeamMate/Model/DefaultWorkItemInfo.cs b/Source/TeamMate/Model/DefaultWorkItemInfo.cs index cc38755..aae933a 100644 --- a/Source/TeamMate/Model/DefaultWorkItemInfo.cs +++ b/Source/TeamMate/Model/DefaultWorkItemInfo.cs @@ -1,7 +1,9 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class DefaultWorkItemInfo { public DefaultWorkItemInfo(WorkItemTypeReference workItemType) diff --git a/Source/TeamMate/Model/ItemCountSummary.cs b/Source/TeamMate/Model/ItemCountSummary.cs index 5846962..c23284e 100644 --- a/Source/TeamMate/Model/ItemCountSummary.cs +++ b/Source/TeamMate/Model/ItemCountSummary.cs @@ -1,5 +1,8 @@ -namespace Microsoft.Tools.TeamMate.Model +using System.Runtime.Versioning; + +namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class ItemCountSummary { public ItemCountSummary() diff --git a/Source/TeamMate/Model/ProjectContext.cs b/Source/TeamMate/Model/ProjectContext.cs index 872d1d3..8d5cffb 100644 --- a/Source/TeamMate/Model/ProjectContext.cs +++ b/Source/TeamMate/Model/ProjectContext.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.ComponentModel; +using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model.Settings; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi; @@ -10,9 +10,11 @@ using System.Collections.ObjectModel; using System.Threading.Tasks; using Microsoft.VisualStudio.Services.Graph.Client; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class ProjectContext : ObservableObjectBase { private TrackingInfo trackingInfo = new TrackingInfo(); diff --git a/Source/TeamMate/Model/ProjectContextSerializer.cs b/Source/TeamMate/Model/ProjectContextSerializer.cs index 09b7496..5429d72 100644 --- a/Source/TeamMate/Model/ProjectContextSerializer.cs +++ b/Source/TeamMate/Model/ProjectContextSerializer.cs @@ -1,4 +1,4 @@ -using Microsoft.TeamFoundation.SourceControl.WebApi; +using Microsoft.TeamFoundation.SourceControl.WebApi; using Microsoft.Tools.TeamMate.Foundation.Collections; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Xml; @@ -7,9 +7,11 @@ using System.Collections.Generic; using System.Linq; using System.Xml.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] class ProjectContextSerializer { public ICollection ReadTiles(string filename) diff --git a/Source/TeamMate/Model/ProjectInfo.cs b/Source/TeamMate/Model/ProjectInfo.cs index 37ddaca..576a284 100644 --- a/Source/TeamMate/Model/ProjectInfo.cs +++ b/Source/TeamMate/Model/ProjectInfo.cs @@ -1,9 +1,11 @@ -using Microsoft.Tools.TeamMate.Foundation.ComponentModel; +using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class ProjectInfo : ObservableObjectBase { private string projectName; diff --git a/Source/TeamMate/Model/ProjectReference.cs b/Source/TeamMate/Model/ProjectReference.cs index 7218401..81acf71 100644 --- a/Source/TeamMate/Model/ProjectReference.cs +++ b/Source/TeamMate/Model/ProjectReference.cs @@ -1,10 +1,12 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.VisualStudio.Services.Common; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class ProjectReference { public Uri ProjectUri { get; private set; } diff --git a/Source/TeamMate/Model/PullRequestReference.cs b/Source/TeamMate/Model/PullRequestReference.cs index 8efe23b..478ff00 100644 --- a/Source/TeamMate/Model/PullRequestReference.cs +++ b/Source/TeamMate/Model/PullRequestReference.cs @@ -1,10 +1,12 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using System; using Microsoft.TeamFoundation.SourceControl.WebApi; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { [Serializable] + [SupportedOSPlatform("windows10.0.19041.0")] public class PullRequestReference { public PullRequestReference(Guid projectId, int id) @@ -55,6 +57,7 @@ public static bool TryParseId(string text, out int id) public static class PullRequestReferenceExtensions { + [SupportedOSPlatform("windows10.0.19041.0")] public static PullRequestReference GetReference(this GitPullRequest pullRequest) { Guid projectId = pullRequest.Repository.Id; diff --git a/Source/TeamMate/Model/Session.cs b/Source/TeamMate/Model/Session.cs index 444b2ba..19b1651 100644 --- a/Source/TeamMate/Model/Session.cs +++ b/Source/TeamMate/Model/Session.cs @@ -1,9 +1,11 @@ -using Microsoft.Tools.TeamMate.Foundation.ComponentModel; +using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using System; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class Session : ObservableObjectBase { private ConnectionInfo connection = new ConnectionInfo(); diff --git a/Source/TeamMate/Model/Settings/ApplicationSettings.cs b/Source/TeamMate/Model/Settings/ApplicationSettings.cs index 9c90a6f..a5ace2f 100644 --- a/Source/TeamMate/Model/Settings/ApplicationSettings.cs +++ b/Source/TeamMate/Model/Settings/ApplicationSettings.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Resources; using System; using System.Collections.Generic; @@ -6,9 +6,11 @@ using System.Collections.Specialized; using System.Linq; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model.Settings { + [SupportedOSPlatform("windows10.0.19041.0")] public class ApplicationSettings : SettingsBase { private KeyGesture quickSearchGesture; @@ -188,6 +190,7 @@ private void HandleProjectsChanged(object sender, NotifyCollectionChangedEventAr } } + [SupportedOSPlatform("windows10.0.19041.0")] public class ProjectsRemovedEventArgs : EventArgs { public ProjectsRemovedEventArgs(ProjectInfo[] projects) @@ -198,4 +201,4 @@ public ProjectsRemovedEventArgs(ProjectInfo[] projects) public ProjectInfo[] RemovedProjects { get; private set; } } -} \ No newline at end of file +} diff --git a/Source/TeamMate/Model/Settings/DeveloperSettings.cs b/Source/TeamMate/Model/Settings/DeveloperSettings.cs index ffc35f1..1c5f821 100644 --- a/Source/TeamMate/Model/Settings/DeveloperSettings.cs +++ b/Source/TeamMate/Model/Settings/DeveloperSettings.cs @@ -1,5 +1,8 @@ -namespace Microsoft.Tools.TeamMate.Model.Settings +using System.Runtime.Versioning; + +namespace Microsoft.Tools.TeamMate.Model.Settings { + [SupportedOSPlatform("windows10.0.19041.0")] public class DeveloperSettings : SettingsBase { private bool debugAllNotifications; diff --git a/Source/TeamMate/Model/Settings/SettingsBase.cs b/Source/TeamMate/Model/Settings/SettingsBase.cs index a3f7c6a..bb96c71 100644 --- a/Source/TeamMate/Model/Settings/SettingsBase.cs +++ b/Source/TeamMate/Model/Settings/SettingsBase.cs @@ -1,9 +1,11 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model.Settings { + [SupportedOSPlatform("windows10.0.19041.0")] public abstract class SettingsBase : ObservableObjectBase { private bool updatesOccurredWhileDeferring; diff --git a/Source/TeamMate/Model/Settings/SettingsSerializer.cs b/Source/TeamMate/Model/Settings/SettingsSerializer.cs index 8c5c0f8..acf1846 100644 --- a/Source/TeamMate/Model/Settings/SettingsSerializer.cs +++ b/Source/TeamMate/Model/Settings/SettingsSerializer.cs @@ -6,12 +6,14 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Runtime.Versioning; using System.Windows; using System.Windows.Input; using System.Xml.Linq; namespace Microsoft.Tools.TeamMate.Model.Settings { + [SupportedOSPlatform("windows10.0.19041.0")] class SettingsSerializer { public ApplicationSettings ReadSettings(string filename) diff --git a/Source/TeamMate/Model/Settings/VolatileSettings.cs b/Source/TeamMate/Model/Settings/VolatileSettings.cs index 146b8f0..bc8aea2 100644 --- a/Source/TeamMate/Model/Settings/VolatileSettings.cs +++ b/Source/TeamMate/Model/Settings/VolatileSettings.cs @@ -1,10 +1,12 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows; using System.Collections.Generic; using System.Windows; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model.Settings { + [SupportedOSPlatform("windows10.0.19041.0")] public class VolatileSettings : SettingsBase { private ProjectInfo lastUsedProject; diff --git a/Source/TeamMate/Model/TeamMateApplicationInfo.cs b/Source/TeamMate/Model/TeamMateApplicationInfo.cs index 0978fd0..8a609a8 100644 --- a/Source/TeamMate/Model/TeamMateApplicationInfo.cs +++ b/Source/TeamMate/Model/TeamMateApplicationInfo.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.IO; using Microsoft.Tools.TeamMate.Foundation.Reflection; using Microsoft.Tools.TeamMate.Foundation.Xml; @@ -9,9 +9,11 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Xml.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public static class TeamMateApplicationInfo { public const string TeamMateFileExtension = ".tmx"; diff --git a/Source/TeamMate/Model/TileInfo.cs b/Source/TeamMate/Model/TileInfo.cs index 43a4eba..1e85d78 100644 --- a/Source/TeamMate/Model/TileInfo.cs +++ b/Source/TeamMate/Model/TileInfo.cs @@ -1,10 +1,12 @@ -using Microsoft.Tools.TeamMate.Foundation.ComponentModel; +using Microsoft.Tools.TeamMate.Foundation.ComponentModel; using Microsoft.Tools.TeamMate.Foundation.Reflection; using System; using System.ComponentModel; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class TileInfo : ObservableObjectBase { // TODO: Should we make this smarter, with property events, etc...? diff --git a/Source/TeamMate/Model/TrackingInfo.cs b/Source/TeamMate/Model/TrackingInfo.cs index 6a9a207..c0b8b05 100644 --- a/Source/TeamMate/Model/TrackingInfo.cs +++ b/Source/TeamMate/Model/TrackingInfo.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Foundation.Collections; +using Microsoft.Tools.TeamMate.Foundation.Collections; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using WorkItem = Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class TrackingInfo { private const int MaxItems = 20; diff --git a/Source/TeamMate/Model/WorkItemQueryReference.cs b/Source/TeamMate/Model/WorkItemQueryReference.cs index 51fd11a..309774c 100644 --- a/Source/TeamMate/Model/WorkItemQueryReference.cs +++ b/Source/TeamMate/Model/WorkItemQueryReference.cs @@ -1,9 +1,11 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemQueryReference { public Uri ProjectCollectionUri { get; private set; } diff --git a/Source/TeamMate/Model/WorkItemReference.cs b/Source/TeamMate/Model/WorkItemReference.cs index 4e106d1..015e678 100644 --- a/Source/TeamMate/Model/WorkItemReference.cs +++ b/Source/TeamMate/Model/WorkItemReference.cs @@ -1,12 +1,14 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi.WorkItemTracking; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { [Serializable] + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemReference { public WorkItemReference(Uri projectCollectionUri, int id) @@ -55,6 +57,7 @@ public static bool TryParseId(string text, out int id) public static class WorkItemReferenceExtensions { + [SupportedOSPlatform("windows10.0.19041.0")] public static WorkItemReference GetReference(this WorkItem workItem) { Uri projectCollectionUri = workItem.GetProjectCollectionUrl(); diff --git a/Source/TeamMate/Model/WorkItemTypeInfo.cs b/Source/TeamMate/Model/WorkItemTypeInfo.cs index 9d4fb26..4218d32 100644 --- a/Source/TeamMate/Model/WorkItemTypeInfo.cs +++ b/Source/TeamMate/Model/WorkItemTypeInfo.cs @@ -1,11 +1,13 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi.WorkItemTracking; using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemTypeInfo { public WorkItemTypeInfo(WorkItemTypeReference reference) diff --git a/Source/TeamMate/Model/WorkItemTypeReference.cs b/Source/TeamMate/Model/WorkItemTypeReference.cs index ea081bb..dc27095 100644 --- a/Source/TeamMate/Model/WorkItemTypeReference.cs +++ b/Source/TeamMate/Model/WorkItemTypeReference.cs @@ -1,8 +1,10 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Model { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemTypeReference { public WorkItemTypeReference(string name, ProjectReference project) @@ -43,4 +45,4 @@ public override string ToString() return String.Format("{0}, {1}", Name, Project); } } -} \ No newline at end of file +} diff --git a/Source/TeamMate/Pages/DeveloperOptionsPage.xaml.cs b/Source/TeamMate/Pages/DeveloperOptionsPage.xaml.cs index 7881e63..e35321e 100644 --- a/Source/TeamMate/Pages/DeveloperOptionsPage.xaml.cs +++ b/Source/TeamMate/Pages/DeveloperOptionsPage.xaml.cs @@ -1,6 +1,7 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Pages { @@ -8,6 +9,7 @@ namespace Microsoft.Tools.TeamMate.Pages /// Interaction logic for DeveloperOptionsPage.xaml /// [View(typeof(DeveloperOptionsPageViewModel))] + [SupportedOSPlatform("windows10.0.19041.0")] public partial class DeveloperOptionsPage : UserControl { public DeveloperOptionsPage() diff --git a/Source/TeamMate/Pages/HomePage.xaml.cs b/Source/TeamMate/Pages/HomePage.xaml.cs index c25907b..7e38ff6 100644 --- a/Source/TeamMate/Pages/HomePage.xaml.cs +++ b/Source/TeamMate/Pages/HomePage.xaml.cs @@ -1,6 +1,7 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Pages { @@ -8,6 +9,7 @@ namespace Microsoft.Tools.TeamMate.Pages /// Interaction logic for HomePage.xaml /// [View(typeof(HomePageViewModel))] + [SupportedOSPlatform("windows10.0.19041.0")] public partial class HomePage : UserControl { public HomePage() @@ -16,4 +18,4 @@ public HomePage() View.Initialize(this); } } -} \ No newline at end of file +} diff --git a/Source/TeamMate/Pages/NewWorkItemPage.xaml.cs b/Source/TeamMate/Pages/NewWorkItemPage.xaml.cs index db8ba08..9aed721 100644 --- a/Source/TeamMate/Pages/NewWorkItemPage.xaml.cs +++ b/Source/TeamMate/Pages/NewWorkItemPage.xaml.cs @@ -1,8 +1,9 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Pages { @@ -10,6 +11,7 @@ namespace Microsoft.Tools.TeamMate.Pages /// Interaction logic for NewWorkItemPage.xaml /// [View(typeof(NewWorkItemPageViewModel))] + [SupportedOSPlatform("windows10.0.19041.0")] public partial class NewWorkItemPage : UserControl { public NewWorkItemPage() diff --git a/Source/TeamMate/Pages/ProjectsPage.xaml.cs b/Source/TeamMate/Pages/ProjectsPage.xaml.cs index 1d7cc63..ae18684 100644 --- a/Source/TeamMate/Pages/ProjectsPage.xaml.cs +++ b/Source/TeamMate/Pages/ProjectsPage.xaml.cs @@ -1,8 +1,9 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Pages { @@ -10,6 +11,7 @@ namespace Microsoft.Tools.TeamMate.Pages /// Interaction logic for ProjectsPage.xaml /// [View(typeof(ProjectsPageViewModel))] + [SupportedOSPlatform("windows10.0.19041.0")] public partial class ProjectsPage : UserControl { public ProjectsPage() diff --git a/Source/TeamMate/Pages/PullRequestsPage.xaml.cs b/Source/TeamMate/Pages/PullRequestsPage.xaml.cs index 65edc88..22517ab 100644 --- a/Source/TeamMate/Pages/PullRequestsPage.xaml.cs +++ b/Source/TeamMate/Pages/PullRequestsPage.xaml.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Utilities; @@ -6,6 +6,7 @@ using System.Linq; using System.Windows; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Pages { @@ -13,6 +14,7 @@ namespace Microsoft.Tools.TeamMate.Pages /// Interaction logic for PullRequestsPage.xaml /// [View(typeof(PullRequestPageViewModel))] + [SupportedOSPlatform("windows10.0.19041.0")] public partial class PullRequestsPage : UserControl, IResultsContainer { public PullRequestsPage() diff --git a/Source/TeamMate/Pages/SearchPage.xaml.cs b/Source/TeamMate/Pages/SearchPage.xaml.cs index 46fe88c..65984b9 100644 --- a/Source/TeamMate/Pages/SearchPage.xaml.cs +++ b/Source/TeamMate/Pages/SearchPage.xaml.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data; using Microsoft.Tools.TeamMate.Foundation.Windows.Media; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; @@ -10,6 +10,7 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Pages { @@ -17,6 +18,7 @@ namespace Microsoft.Tools.TeamMate.Pages /// Interaction logic for SearchPage.xaml /// [View(typeof(SearchPageViewModel))] + [SupportedOSPlatform("windows10.0.19041.0")] public partial class SearchPage : UserControl, IResultsContainer { private ContextMenu placeholderItemContextMenu; diff --git a/Source/TeamMate/Pages/SettingsPage.xaml.cs b/Source/TeamMate/Pages/SettingsPage.xaml.cs index 79011b1..beb70da 100644 --- a/Source/TeamMate/Pages/SettingsPage.xaml.cs +++ b/Source/TeamMate/Pages/SettingsPage.xaml.cs @@ -1,6 +1,7 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Pages { @@ -8,6 +9,7 @@ namespace Microsoft.Tools.TeamMate.Pages /// Interaction logic for SettingsPage.xaml /// [View(typeof(SettingsPageViewModel))] + [SupportedOSPlatform("windows10.0.19041.0")] public partial class SettingsPage : UserControl { public SettingsPage() diff --git a/Source/TeamMate/Pages/WorkItemsPage.xaml.cs b/Source/TeamMate/Pages/WorkItemsPage.xaml.cs index 8a05263..e76d030 100644 --- a/Source/TeamMate/Pages/WorkItemsPage.xaml.cs +++ b/Source/TeamMate/Pages/WorkItemsPage.xaml.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Utilities; @@ -6,6 +6,7 @@ using System.Linq; using System.Windows; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Pages { @@ -13,6 +14,7 @@ namespace Microsoft.Tools.TeamMate.Pages /// Interaction logic for WorkItemsPage.xaml /// [View(typeof(WorkItemsPageViewModel))] + [SupportedOSPlatform("windows10.0.19041.0")] public partial class WorkItemsPage : UserControl, IResultsContainer { public WorkItemsPage() diff --git a/Source/TeamMate/Properties/AssemblyInfo.cs b/Source/TeamMate/Properties/AssemblyInfo.cs index bf07581..be89029 100644 --- a/Source/TeamMate/Properties/AssemblyInfo.cs +++ b/Source/TeamMate/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Windows; // General Information about an assembly is controlled through the following @@ -8,6 +9,9 @@ [assembly: AssemblyTitle("TeamMate")] [assembly: AssemblyDescription("")] +// Platform support +[assembly: SupportedOSPlatform("windows10.0.19041.0")] + // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. diff --git a/Source/TeamMate/Resources/SampleData.cs b/Source/TeamMate/Resources/SampleData.cs index aaef58a..2dc42e7 100644 --- a/Source/TeamMate/Resources/SampleData.cs +++ b/Source/TeamMate/Resources/SampleData.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Foundation.Threading; +using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.ViewModels; using System; using System.Collections.Generic; using System.Windows.Data; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Resources { + [SupportedOSPlatform("windows10.0.19041.0")] public static class SampleData { public static readonly Uri SampleCollectionUri = new Uri("https://sample.visualstudio.com/DefaultCollection"); diff --git a/Source/TeamMate/Resources/TeamMateCommands.cs b/Source/TeamMate/Resources/TeamMateCommands.cs index cc2c9a3..c5b2994 100644 --- a/Source/TeamMate/Resources/TeamMateCommands.cs +++ b/Source/TeamMate/Resources/TeamMateCommands.cs @@ -1,9 +1,11 @@ using Microsoft.Tools.TeamMate.Foundation.Windows.Input; +using System.Runtime.Versioning; using System.Windows.Input; // TODO: Consider moving this to another namespace, seems annoying here... namespace Microsoft.Tools.TeamMate.Resources { + [SupportedOSPlatform("windows10.0.19041.0")] public static class TeamMateCommands { private static readonly CommandDictionary commands = new CommandDictionary(); diff --git a/Source/TeamMate/Resources/TeamMateResources.cs b/Source/TeamMate/Resources/TeamMateResources.cs index 111f70f..a33036f 100644 --- a/Source/TeamMate/Resources/TeamMateResources.cs +++ b/Source/TeamMate/Resources/TeamMateResources.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Interop; using System; using System.IO; @@ -6,9 +6,11 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using Icon = System.Drawing.Icon; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Resources { + [SupportedOSPlatform("windows10.0.19041.0")] public static class TeamMateResources { private static readonly Uri NotificationSoundUri = new Uri("pack://application:,,,/Resources/Audio/Notification.wav"); diff --git a/Source/TeamMate/Services/ApplicationService.cs b/Source/TeamMate/Services/ApplicationService.cs index f4833f3..2604c09 100644 --- a/Source/TeamMate/Services/ApplicationService.cs +++ b/Source/TeamMate/Services/ApplicationService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Chaos; +using Microsoft.Tools.TeamMate.Foundation.Chaos; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows.Shell; using Microsoft.Tools.TeamMate.Model; @@ -8,9 +8,11 @@ using System.Linq; using System.Threading.Tasks; using SplashScreen = Microsoft.Tools.TeamMate.Windows.SplashScreen; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class ApplicationService { private static readonly TimeSpan MinimumSplashScreenDisplayTime = TimeSpan.FromSeconds(1); diff --git a/Source/TeamMate/Services/AsyncWriterService.cs b/Source/TeamMate/Services/AsyncWriterService.cs index c999184..926f809 100644 --- a/Source/TeamMate/Services/AsyncWriterService.cs +++ b/Source/TeamMate/Services/AsyncWriterService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.IO; using System; using System.Collections.Generic; @@ -6,9 +6,11 @@ using System.Linq; using System.Timers; using System.Xml.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class AsyncWriterService : IDisposable { private static readonly TimeSpan AsyncSaveDelay = TimeSpan.FromSeconds(1); diff --git a/Source/TeamMate/Services/BackgroundTaskService.cs b/Source/TeamMate/Services/BackgroundTaskService.cs index 649c28e..5525fb1 100644 --- a/Source/TeamMate/Services/BackgroundTaskService.cs +++ b/Source/TeamMate/Services/BackgroundTaskService.cs @@ -1,11 +1,13 @@ -using Microsoft.Tools.TeamMate.Foundation.Shell; +using Microsoft.Tools.TeamMate.Foundation.Shell; using Microsoft.Tools.TeamMate.Utilities; using System; using System.Collections.Generic; using System.ComponentModel.Composition; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class BackgroundTaskService : IDisposable { private List scheduledActions = new List(); diff --git a/Source/TeamMate/Services/CollaborationService.cs b/Source/TeamMate/Services/CollaborationService.cs index 0726b6b..cfbcab6 100644 --- a/Source/TeamMate/Services/CollaborationService.cs +++ b/Source/TeamMate/Services/CollaborationService.cs @@ -1,4 +1,4 @@ -using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; +using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Model; @@ -7,9 +7,11 @@ using System.Collections.Generic; using System.ComponentModel.Composition; using System.Threading.Tasks; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class CollaborationService { public static readonly string[] FieldsReferringToPeopleInPriorityOrder = { diff --git a/Source/TeamMate/Services/CommandLineService.cs b/Source/TeamMate/Services/CommandLineService.cs index 2efce1f..3554ff8 100644 --- a/Source/TeamMate/Services/CommandLineService.cs +++ b/Source/TeamMate/Services/CommandLineService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Web; using Microsoft.Tools.TeamMate.Model; @@ -11,9 +11,11 @@ using System.IO; using System.Linq; using System.Threading.Tasks; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class CommandLineService { private const string Create = "create"; diff --git a/Source/TeamMate/Services/ConfigurationService.cs b/Source/TeamMate/Services/ConfigurationService.cs index cd69478..9f02e86 100644 --- a/Source/TeamMate/Services/ConfigurationService.cs +++ b/Source/TeamMate/Services/ConfigurationService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Shell; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Model.Settings; @@ -7,9 +7,11 @@ using System.ComponentModel.Composition; using System.IO; using System.Threading.Tasks; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class ConfigurationService { public void Initialize() diff --git a/Source/TeamMate/Services/ExternalWebBrowserService.cs b/Source/TeamMate/Services/ExternalWebBrowserService.cs index c50858b..fbf956d 100644 --- a/Source/TeamMate/Services/ExternalWebBrowserService.cs +++ b/Source/TeamMate/Services/ExternalWebBrowserService.cs @@ -1,8 +1,10 @@ -using Microsoft.Tools.TeamMate.Foundation.Shell; +using Microsoft.Tools.TeamMate.Foundation.Shell; using Microsoft.Tools.TeamMate.Model; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class ExternalWebBrowserService { public void OpenGitHubProjectUrl() diff --git a/Source/TeamMate/Services/FileDialogService.cs b/Source/TeamMate/Services/FileDialogService.cs index a459a62..6122e89 100644 --- a/Source/TeamMate/Services/FileDialogService.cs +++ b/Source/TeamMate/Services/FileDialogService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using System.Windows; @@ -6,9 +6,11 @@ using FileDialog = System.Windows.Forms.FileDialog; using OpenFileDialog = System.Windows.Forms.OpenFileDialog; using SaveFileDialog = System.Windows.Forms.SaveFileDialog; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class FileDialogService { public FileDialogResult ShowFileDialog(FileDialogOptions options) diff --git a/Source/TeamMate/Services/GlobalCommandService.cs b/Source/TeamMate/Services/GlobalCommandService.cs index a29680f..972d5c8 100644 --- a/Source/TeamMate/Services/GlobalCommandService.cs +++ b/Source/TeamMate/Services/GlobalCommandService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Model.Actions; using Microsoft.Tools.TeamMate.Windows; @@ -6,9 +6,11 @@ using System.Linq; using System.Windows; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class GlobalCommandService : ICommandProvider { [Import] diff --git a/Source/TeamMate/Services/HistoryService.cs b/Source/TeamMate/Services/HistoryService.cs index d6fe82c..f73df25 100644 --- a/Source/TeamMate/Services/HistoryService.cs +++ b/Source/TeamMate/Services/HistoryService.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model; using System; using System.ComponentModel; using System.ComponentModel.Composition; using System.IO; using System.Xml.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class HistoryService { private ApplicationHistory history; diff --git a/Source/TeamMate/Services/MessageBoxService.cs b/Source/TeamMate/Services/MessageBoxService.cs index 2feb2f7..077fa39 100644 --- a/Source/TeamMate/Services/MessageBoxService.cs +++ b/Source/TeamMate/Services/MessageBoxService.cs @@ -1,10 +1,12 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using System; using System.Windows; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class MessageBoxService { public MessageBoxResult Show(string messageBoxText, diff --git a/Source/TeamMate/Services/ProjectDataService.cs b/Source/TeamMate/Services/ProjectDataService.cs index c8998c3..1bd238f 100644 --- a/Source/TeamMate/Services/ProjectDataService.cs +++ b/Source/TeamMate/Services/ProjectDataService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Collections; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.IO; @@ -11,9 +11,11 @@ using System.IO; using System.Linq; using System.Xml.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class ProjectDataService { private const string ProjectsFolder = "Projects"; diff --git a/Source/TeamMate/Services/SearchService.cs b/Source/TeamMate/Services/SearchService.cs index 4f462d2..07989b3 100644 --- a/Source/TeamMate/Services/SearchService.cs +++ b/Source/TeamMate/Services/SearchService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Chaos; +using Microsoft.Tools.TeamMate.Foundation.Chaos; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi.WorkItemTracking; using Microsoft.Tools.TeamMate.Utilities; using Microsoft.Tools.TeamMate.ViewModels; @@ -9,9 +9,11 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class SearchService { private const int MaxItemsFromAdo = 250; @@ -127,6 +129,7 @@ public SearchResult(object result, SearchResultSource source) public SearchResultSource Source { get; set; } } + [SupportedOSPlatform("windows10.0.19041.0")] public class SearchResultSource : IComparable { private QueryViewModelBase source; diff --git a/Source/TeamMate/Services/SessionService.cs b/Source/TeamMate/Services/SessionService.cs index 43c2d2c..947a4a7 100644 --- a/Source/TeamMate/Services/SessionService.cs +++ b/Source/TeamMate/Services/SessionService.cs @@ -1,7 +1,9 @@ -using Microsoft.Tools.TeamMate.Model; +using Microsoft.Tools.TeamMate.Model; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class SessionService { public Session Session { get; set; } = new Session(); diff --git a/Source/TeamMate/Services/SettingsService.cs b/Source/TeamMate/Services/SettingsService.cs index 2cb43db..6f90a32 100644 --- a/Source/TeamMate/Services/SettingsService.cs +++ b/Source/TeamMate/Services/SettingsService.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Model.Settings; using System; using System.ComponentModel.Composition; using System.IO; using System.Xml.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class SettingsService { private const string SettingsFolder = "Settings"; @@ -161,4 +163,4 @@ private void FlushVolatileSettings() this.AsyncWriterService.Save(doc, VolatileSettingsFile); } } -} \ No newline at end of file +} diff --git a/Source/TeamMate/Services/StatusService.cs b/Source/TeamMate/Services/StatusService.cs index 598b10e..6743f15 100644 --- a/Source/TeamMate/Services/StatusService.cs +++ b/Source/TeamMate/Services/StatusService.cs @@ -1,7 +1,9 @@ -using System; +using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class StatusService { public IDisposable BusyIndicator() diff --git a/Source/TeamMate/Services/ToastNotificationService.cs b/Source/TeamMate/Services/ToastNotificationService.cs index 1ca9f78..45f9a70 100644 --- a/Source/TeamMate/Services/ToastNotificationService.cs +++ b/Source/TeamMate/Services/ToastNotificationService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi.WorkItemTracking; @@ -12,9 +12,11 @@ using System.Diagnostics; using System.Linq; using WorkItem = Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class ToastNotificationService : IDisposable { public static readonly string[] RequiredWorkItemFields = { @@ -332,6 +334,7 @@ private class ToastPullRequestInfo } } + [SupportedOSPlatform("windows10.0.19041.0")] public class NotificationScope { private Dictionary currentScope = new Dictionary(); diff --git a/Source/TeamMate/Services/TracingService.cs b/Source/TeamMate/Services/TracingService.cs index 7fddd79..0620a9e 100644 --- a/Source/TeamMate/Services/TracingService.cs +++ b/Source/TeamMate/Services/TracingService.cs @@ -1,9 +1,11 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Utilities; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class TracingService { private TraceLogFile traceLogFile; diff --git a/Source/TeamMate/Services/TrackingService.cs b/Source/TeamMate/Services/TrackingService.cs index d3cd9a5..3e78b7f 100644 --- a/Source/TeamMate/Services/TrackingService.cs +++ b/Source/TeamMate/Services/TrackingService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model; using System; using System.Collections.Generic; @@ -7,9 +7,11 @@ using System.Linq; using System.Windows; using WorkItem = Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class TrackingService { private static readonly TimeSpan CollectionInterval = TimeSpan.FromMinutes(1); @@ -45,6 +47,7 @@ private TrackingInfo TrackingInfo } // This method should only be called from TrackingToken + [SupportedOSPlatform("windows10.0.19041.0")] internal void CommitMarkAsRead(object key, int revision) { var trackingInfo = TrackingInfo; @@ -55,6 +58,7 @@ internal void CommitMarkAsRead(object key, int revision) } // This method should only be called from TrackingToken + [SupportedOSPlatform("windows10.0.19041.0")] internal void CommitMarkAsUnread(object key) { var trackingInfo = TrackingInfo; @@ -65,6 +69,7 @@ internal void CommitMarkAsUnread(object key) } // This method should only be called from TrackingToken + [SupportedOSPlatform("windows10.0.19041.0")] internal void CommitSetFlagged(object key, bool isFlagged, object flaggedItem) { Assert.ParamIsNotNull(key, "key"); @@ -254,6 +259,7 @@ public void InitializeIsFlagged(bool isFlagged) this.IsFlagged = isFlagged; } + [SupportedOSPlatform("windows10.0.19041.0")] public void SetFlag(bool isFlagged, object flaggedItem) { if (this.IsFlagged != isFlagged) @@ -274,6 +280,7 @@ public bool IsRead(int revision) return this.LastReadRevision != null && this.LastReadRevision.Value >= revision; } + [SupportedOSPlatform("windows10.0.19041.0")] public void MarkAsRead(int revision) { if (this.LastReadRevision == null || this.LastReadRevision.Value < revision) @@ -286,6 +293,7 @@ public void MarkAsRead(int revision) } } + [SupportedOSPlatform("windows10.0.19041.0")] public void MarkAsUnread() { if (this.LastReadRevision != null) diff --git a/Source/TeamMate/Services/UIService.cs b/Source/TeamMate/Services/UIService.cs index 27327b9..76b8269 100644 --- a/Source/TeamMate/Services/UIService.cs +++ b/Source/TeamMate/Services/UIService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Controls; +using Microsoft.Tools.TeamMate.Controls; using Microsoft.Tools.TeamMate.Exceptions; using Microsoft.Tools.TeamMate.Foundation.Collections; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; @@ -19,9 +19,11 @@ using System.Windows.Threading; using NotifyIcon = System.Windows.Forms.NotifyIcon; using ToolStripMenuItem = System.Windows.Forms.ToolStripMenuItem; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class UIService : IDisposable { private const int MaxJumpListItems = 5; diff --git a/Source/TeamMate/Services/UpgradeService.cs b/Source/TeamMate/Services/UpgradeService.cs index 2a9f5de..78d8aa2 100644 --- a/Source/TeamMate/Services/UpgradeService.cs +++ b/Source/TeamMate/Services/UpgradeService.cs @@ -1,11 +1,13 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model; using System; using System.ComponentModel.Composition; using System.Windows; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class UpgradeService { [Import] diff --git a/Source/TeamMate/Services/ViewService.cs b/Source/TeamMate/Services/ViewService.cs index 9e0122a..b2033e3 100644 --- a/Source/TeamMate/Services/ViewService.cs +++ b/Source/TeamMate/Services/ViewService.cs @@ -1,8 +1,10 @@ using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using System.Runtime.Versioning; using System.Windows; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class ViewService { private ViewCatalog viewCatalog = new ViewCatalog(); diff --git a/Source/TeamMate/Services/VstsConnectionService.cs b/Source/TeamMate/Services/VstsConnectionService.cs index c3989ec..cb42fd8 100644 --- a/Source/TeamMate/Services/VstsConnectionService.cs +++ b/Source/TeamMate/Services/VstsConnectionService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Chaos; +using Microsoft.Tools.TeamMate.Foundation.Chaos; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Model.Settings; @@ -25,9 +25,11 @@ using WorkItemField = Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemField; using WorkItemType = Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemType; using Microsoft.VisualStudio.Services.Graph.Client; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class VstsConnectionService { // Cached MSAL public client application - reused across connections diff --git a/Source/TeamMate/Services/WindowService.cs b/Source/TeamMate/Services/WindowService.cs index c66f7b2..cfcc9dc 100644 --- a/Source/TeamMate/Services/WindowService.cs +++ b/Source/TeamMate/Services/WindowService.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Shell; +using Microsoft.Tools.TeamMate.Foundation.Shell; using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; @@ -15,9 +15,11 @@ using System.Linq; using System.Windows; using WindowsForms = System.Windows.Forms; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Services { + [SupportedOSPlatform("windows10.0.19041.0")] public class WindowService { private QuickSearchWindow quickSearchWindow; diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index 518f040..262799a 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -26,7 +26,7 @@ x86 - NU1701;CA1416 + NU1701 publish\ None diff --git a/Source/TeamMate/Utilities/ChaosScenarios.cs b/Source/TeamMate/Utilities/ChaosScenarios.cs index 70056d8..d8db948 100644 --- a/Source/TeamMate/Utilities/ChaosScenarios.cs +++ b/Source/TeamMate/Utilities/ChaosScenarios.cs @@ -1,7 +1,9 @@ using Microsoft.Tools.TeamMate.Foundation.Chaos; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public static class ChaosScenarios { public static readonly ChaosScenario ConnectToVsts = new ChaosScenario("ConnectToVsts"); diff --git a/Source/TeamMate/Utilities/ClipboardFileExporter.cs b/Source/TeamMate/Utilities/ClipboardFileExporter.cs index 0890918..e9fbc8c 100644 --- a/Source/TeamMate/Utilities/ClipboardFileExporter.cs +++ b/Source/TeamMate/Utilities/ClipboardFileExporter.cs @@ -7,12 +7,14 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Runtime.Versioning; using System.Text; using System.Windows; using System.Windows.Media.Imaging; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class ClipboardFileExporter { // We support files, groups of files, images, and text. diff --git a/Source/TeamMate/Utilities/CommandLineArgs.cs b/Source/TeamMate/Utilities/CommandLineArgs.cs index 2f0d6b7..6e6315c 100644 --- a/Source/TeamMate/Utilities/CommandLineArgs.cs +++ b/Source/TeamMate/Utilities/CommandLineArgs.cs @@ -1,11 +1,13 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class CommandLineArgs { private string[] args; diff --git a/Source/TeamMate/Utilities/CustomToastManager.cs b/Source/TeamMate/Utilities/CustomToastManager.cs index 77e9ea5..9e1170e 100644 --- a/Source/TeamMate/Utilities/CustomToastManager.cs +++ b/Source/TeamMate/Utilities/CustomToastManager.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Resources; using Microsoft.Tools.TeamMate.Services; using Microsoft.Tools.TeamMate.ViewModels; @@ -10,9 +10,11 @@ using System.Media; using System.Windows; using System.Windows.Threading; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class CustomToastManager : IToastManager { private SoundPlayer notificationSound; diff --git a/Source/TeamMate/Utilities/DataObjectFactory.cs b/Source/TeamMate/Utilities/DataObjectFactory.cs index 6e4d2e9..c513de0 100644 --- a/Source/TeamMate/Utilities/DataObjectFactory.cs +++ b/Source/TeamMate/Utilities/DataObjectFactory.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows.Transfer; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi; @@ -10,10 +10,12 @@ using System.Windows; using IDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; using WorkItem = Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public static class DataObjectFactory { public static IDataObject CreateDraggableItem(WorkItem workItem, HyperlinkFactory factory) diff --git a/Source/TeamMate/Utilities/FileUtilities.cs b/Source/TeamMate/Utilities/FileUtilities.cs index 750b3e7..b6719b8 100644 --- a/Source/TeamMate/Utilities/FileUtilities.cs +++ b/Source/TeamMate/Utilities/FileUtilities.cs @@ -1,12 +1,14 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.IO; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public static class FileUtilities { private static string GetTimeBasedFilename() diff --git a/Source/TeamMate/Utilities/Formatter.cs b/Source/TeamMate/Utilities/Formatter.cs index 8384226..1b217ba 100644 --- a/Source/TeamMate/Utilities/Formatter.cs +++ b/Source/TeamMate/Utilities/Formatter.cs @@ -1,8 +1,10 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using System; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public static class Formatter { public const string NotYetAssigned = "Not Yet Assigned"; diff --git a/Source/TeamMate/Utilities/ScheduledAction.cs b/Source/TeamMate/Utilities/ScheduledAction.cs index be84c59..f3c6ea2 100644 --- a/Source/TeamMate/Utilities/ScheduledAction.cs +++ b/Source/TeamMate/Utilities/ScheduledAction.cs @@ -1,10 +1,12 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using System; using System.Threading.Tasks; using System.Timers; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class ScheduledAction : IDisposable { private static TimeSpan UpdateSchedulingBuffer = TimeSpan.FromSeconds(10); diff --git a/Source/TeamMate/Utilities/SearchExpression.cs b/Source/TeamMate/Utilities/SearchExpression.cs index 0534b70..379c08f 100644 --- a/Source/TeamMate/Utilities/SearchExpression.cs +++ b/Source/TeamMate/Utilities/SearchExpression.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi.WorkItemTracking; using Microsoft.Tools.TeamMate.ViewModels; using System; @@ -6,9 +6,11 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class SearchExpression { private SearchExpression() diff --git a/Source/TeamMate/Utilities/SearchTextHighlighter.cs b/Source/TeamMate/Utilities/SearchTextHighlighter.cs index 5fd6e1e..7ea4543 100644 --- a/Source/TeamMate/Utilities/SearchTextHighlighter.cs +++ b/Source/TeamMate/Utilities/SearchTextHighlighter.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.Documents; +using Microsoft.Tools.TeamMate.Foundation.Windows.Documents; using Microsoft.Tools.TeamMate.Foundation.Windows.Media; using System.Collections.Generic; using System.Linq; @@ -7,9 +7,11 @@ using System.Windows.Controls; using System.Windows.Documents; using ListView = Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data.ListView; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public static class SearchTextHighlighter { diff --git a/Source/TeamMate/Utilities/WinFormsUtilities.cs b/Source/TeamMate/Utilities/WinFormsUtilities.cs index 5c5f892..75ae942 100644 --- a/Source/TeamMate/Utilities/WinFormsUtilities.cs +++ b/Source/TeamMate/Utilities/WinFormsUtilities.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Reflection; using Microsoft.Tools.TeamMate.Foundation.Windows.Input; using Microsoft.Tools.TeamMate.Foundation.Windows.Interop; @@ -7,9 +7,11 @@ using System.Windows.Forms; using System.Windows.Input; using System.Windows.Media.Imaging; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public static class WinFormsUtilities { public static ToolStripMenuItem CreateMenuItem(ICommand command, Action action = null) diff --git a/Source/TeamMate/Utilities/WindowStateTracker.cs b/Source/TeamMate/Utilities/WindowStateTracker.cs index f878ee7..56c25ab 100644 --- a/Source/TeamMate/Utilities/WindowStateTracker.cs +++ b/Source/TeamMate/Utilities/WindowStateTracker.cs @@ -3,10 +3,12 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Runtime.Versioning; using System.Windows; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class WindowStateTracker { private Dictionary states = new Dictionary(); diff --git a/Source/TeamMate/Utilities/WindowsToastManager.cs b/Source/TeamMate/Utilities/WindowsToastManager.cs index 0052c46..e150c01 100644 --- a/Source/TeamMate/Utilities/WindowsToastManager.cs +++ b/Source/TeamMate/Utilities/WindowsToastManager.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Shell; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.WindowsRuntime.UI.Notifications; using System; using System.IO; using System.Xml.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class WindowsToastManager : IToastManager { public event EventHandler ToastActivated; diff --git a/Source/TeamMate/Utilities/WorkItemHtmlFormatter.cs b/Source/TeamMate/Utilities/WorkItemHtmlFormatter.cs index c92af56..8ffaa13 100644 --- a/Source/TeamMate/Utilities/WorkItemHtmlFormatter.cs +++ b/Source/TeamMate/Utilities/WorkItemHtmlFormatter.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Xml; using Microsoft.Tools.TeamMate.Model; @@ -13,9 +13,11 @@ using System.Xml; using System.Xml.Linq; using System.Xml.Xsl; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemHtmlFormatter { private static readonly FieldInfo[] WellKnownTextFields = { diff --git a/Source/TeamMate/Utilities/WorkItemHtmlGenerator.cs b/Source/TeamMate/Utilities/WorkItemHtmlGenerator.cs index 541d077..c78a713 100644 --- a/Source/TeamMate/Utilities/WorkItemHtmlGenerator.cs +++ b/Source/TeamMate/Utilities/WorkItemHtmlGenerator.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.IO; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi; @@ -9,9 +9,11 @@ using System.IO; using System.Linq; using System.Text; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemHtmlGenerator { private IDictionary workItemFieldsByName; diff --git a/Source/TeamMate/Utilities/WorkItemTextGenerator.cs b/Source/TeamMate/Utilities/WorkItemTextGenerator.cs index 70718a8..458596e 100644 --- a/Source/TeamMate/Utilities/WorkItemTextGenerator.cs +++ b/Source/TeamMate/Utilities/WorkItemTextGenerator.cs @@ -1,4 +1,4 @@ -using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; +using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model; @@ -7,9 +7,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Utilities { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemTextGenerator { private static IEnumerable GetHistoryUpdatesInReverseOrder(ICollection updates) diff --git a/Source/TeamMate/ViewModels/ChaosMonkeyViewModel.cs b/Source/TeamMate/ViewModels/ChaosMonkeyViewModel.cs index 1759153..6cee5e0 100644 --- a/Source/TeamMate/ViewModels/ChaosMonkeyViewModel.cs +++ b/Source/TeamMate/ViewModels/ChaosMonkeyViewModel.cs @@ -1,11 +1,13 @@ -using Microsoft.Tools.TeamMate.Foundation.Chaos; +using Microsoft.Tools.TeamMate.Foundation.Chaos; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Utilities; using System.Collections.Generic; using System.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class ChaosMonkeyViewModel : ViewModelBase { private ICollection scenarios; diff --git a/Source/TeamMate/ViewModels/CustomDialogViewModel.cs b/Source/TeamMate/ViewModels/CustomDialogViewModel.cs index 6438b3c..8ac8bf8 100644 --- a/Source/TeamMate/ViewModels/CustomDialogViewModel.cs +++ b/Source/TeamMate/ViewModels/CustomDialogViewModel.cs @@ -1,9 +1,11 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using System.Collections.Generic; using System.Windows.Media; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class CustomDialogViewModel : ViewModelBase { private string title; diff --git a/Source/TeamMate/ViewModels/DeveloperOptionsPageViewModel.cs b/Source/TeamMate/ViewModels/DeveloperOptionsPageViewModel.cs index fc06ac4..33aad47 100644 --- a/Source/TeamMate/ViewModels/DeveloperOptionsPageViewModel.cs +++ b/Source/TeamMate/ViewModels/DeveloperOptionsPageViewModel.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Exceptions; +using Microsoft.Tools.TeamMate.Exceptions; using Microsoft.Tools.TeamMate.Foundation.Windows.Input; using Microsoft.Tools.TeamMate.Model.Settings; using Microsoft.Tools.TeamMate.Services; using System; using System.ComponentModel.Composition; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class DeveloperOptionsPageViewModel : PageViewModelBase { public DeveloperOptionsPageViewModel() diff --git a/Source/TeamMate/ViewModels/FlaggedWorkItemsViewModel.cs b/Source/TeamMate/ViewModels/FlaggedWorkItemsViewModel.cs index cc7968b..a256a16 100644 --- a/Source/TeamMate/ViewModels/FlaggedWorkItemsViewModel.cs +++ b/Source/TeamMate/ViewModels/FlaggedWorkItemsViewModel.cs @@ -1,11 +1,13 @@ -using Microsoft.Tools.TeamMate.Model; +using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Services; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi.WorkItemTracking; using System.Diagnostics; using System.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class FlaggedWorkItemsViewModel : WorkItemQueryViewModel { public FlaggedWorkItemsViewModel() diff --git a/Source/TeamMate/ViewModels/HomePageViewModel.cs b/Source/TeamMate/ViewModels/HomePageViewModel.cs index 651c7da..f8291b3 100644 --- a/Source/TeamMate/ViewModels/HomePageViewModel.cs +++ b/Source/TeamMate/ViewModels/HomePageViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; @@ -6,9 +6,11 @@ using Microsoft.Tools.TeamMate.Services; using System.ComponentModel.Composition; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class HomePageViewModel : PageViewModelBase, ICommandProvider, IGlobalCommandProvider { private Session session; diff --git a/Source/TeamMate/ViewModels/MainWindowViewModel.cs b/Source/TeamMate/ViewModels/MainWindowViewModel.cs index e20574a..c824529 100644 --- a/Source/TeamMate/ViewModels/MainWindowViewModel.cs +++ b/Source/TeamMate/ViewModels/MainWindowViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Input; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; @@ -11,9 +11,11 @@ using System.ComponentModel; using System.ComponentModel.Composition; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class MainWindowViewModel : ViewModelBase, ICommandProvider { private bool isSettingsVisible; diff --git a/Source/TeamMate/ViewModels/NavigationViewModel.cs b/Source/TeamMate/ViewModels/NavigationViewModel.cs index a1d1624..102729e 100644 --- a/Source/TeamMate/ViewModels/NavigationViewModel.cs +++ b/Source/TeamMate/ViewModels/NavigationViewModel.cs @@ -1,12 +1,14 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Resources; using System.Collections.Generic; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class NavigationViewModel : ViewModelBase, ICommandProvider { private IList navigationStack = new List(); diff --git a/Source/TeamMate/ViewModels/NewWorkItemPageViewModel.cs b/Source/TeamMate/ViewModels/NewWorkItemPageViewModel.cs index e092e06..519bca3 100644 --- a/Source/TeamMate/ViewModels/NewWorkItemPageViewModel.cs +++ b/Source/TeamMate/ViewModels/NewWorkItemPageViewModel.cs @@ -1,11 +1,13 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Services; using System.Collections.Generic; using System.ComponentModel.Composition; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class NewWorkItemPageViewModel : PageViewModelBase { public NewWorkItemPageViewModel() diff --git a/Source/TeamMate/ViewModels/OverviewWindowViewModel.cs b/Source/TeamMate/ViewModels/OverviewWindowViewModel.cs index 4982214..4ed6b60 100644 --- a/Source/TeamMate/ViewModels/OverviewWindowViewModel.cs +++ b/Source/TeamMate/ViewModels/OverviewWindowViewModel.cs @@ -1,12 +1,14 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.Input; +using Microsoft.Tools.TeamMate.Foundation.Windows.Input; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Services; using System.ComponentModel.Composition; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class OverviewWindowViewModel : ViewModelBase { private ItemCountSummary itemCountSummary; diff --git a/Source/TeamMate/ViewModels/PageViewModelBase.cs b/Source/TeamMate/ViewModels/PageViewModelBase.cs index b7c2611..2ec10fb 100644 --- a/Source/TeamMate/ViewModels/PageViewModelBase.cs +++ b/Source/TeamMate/ViewModels/PageViewModelBase.cs @@ -1,7 +1,9 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class PageViewModelBase : ViewModelBase { private string title; diff --git a/Source/TeamMate/ViewModels/ProjectPickerDialogViewModel.cs b/Source/TeamMate/ViewModels/ProjectPickerDialogViewModel.cs index 1da5d91..568f14a 100644 --- a/Source/TeamMate/ViewModels/ProjectPickerDialogViewModel.cs +++ b/Source/TeamMate/ViewModels/ProjectPickerDialogViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Chaos; +using Microsoft.Tools.TeamMate.Foundation.Chaos; using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Foundation.Windows.Input; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; @@ -15,9 +15,11 @@ using System.Text.RegularExpressions; using System.Threading; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class ProjectPickerDialogViewModel : ViewModelBase { private CancellationTokenSource previousCancellationTokenSource = new CancellationTokenSource(); diff --git a/Source/TeamMate/ViewModels/ProjectsPageViewModel.cs b/Source/TeamMate/ViewModels/ProjectsPageViewModel.cs index e7879fe..556212c 100644 --- a/Source/TeamMate/ViewModels/ProjectsPageViewModel.cs +++ b/Source/TeamMate/ViewModels/ProjectsPageViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Resources; @@ -8,9 +8,11 @@ using System.ComponentModel.Composition; using System.Linq; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class ProjectsPageViewModel : PageViewModelBase, IGlobalCommandProvider { public ProjectsPageViewModel() diff --git a/Source/TeamMate/ViewModels/PullRequestPageViewModel.cs b/Source/TeamMate/ViewModels/PullRequestPageViewModel.cs index de6575d..fc1632c 100644 --- a/Source/TeamMate/ViewModels/PullRequestPageViewModel.cs +++ b/Source/TeamMate/ViewModels/PullRequestPageViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Foundation.Windows.Transfer; @@ -14,9 +14,11 @@ using System.Windows; using System.Windows.Data; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class PullRequestPageViewModel : PageViewModelBase, ICommandProvider, IFilterable, IGlobalCommandProvider { private PullRequestQueryViewModel query; diff --git a/Source/TeamMate/ViewModels/PullRequestPickerViewModel.cs b/Source/TeamMate/ViewModels/PullRequestPickerViewModel.cs index b86d938..60143ad 100644 --- a/Source/TeamMate/ViewModels/PullRequestPickerViewModel.cs +++ b/Source/TeamMate/ViewModels/PullRequestPickerViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Threading; +using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Foundation.Validation; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; @@ -10,9 +10,11 @@ using System.Linq; using System.Threading.Tasks; using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class PullRequestPickerViewModel : ValidatableViewModelBase { private string name; diff --git a/Source/TeamMate/ViewModels/PullRequestQueryTileViewModel.cs b/Source/TeamMate/ViewModels/PullRequestQueryTileViewModel.cs index d3bfc79..f3963f8 100644 --- a/Source/TeamMate/ViewModels/PullRequestQueryTileViewModel.cs +++ b/Source/TeamMate/ViewModels/PullRequestQueryTileViewModel.cs @@ -1,9 +1,11 @@ -using Microsoft.Tools.TeamMate.Model; +using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Services; using System.ComponentModel.Composition; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class PullRequestQueryTileViewModel : TileViewModel { public PullRequestQueryViewModel QueryModel diff --git a/Source/TeamMate/ViewModels/PullRequestQueryViewModel.cs b/Source/TeamMate/ViewModels/PullRequestQueryViewModel.cs index d4c93f8..15e5bb7 100644 --- a/Source/TeamMate/ViewModels/PullRequestQueryViewModel.cs +++ b/Source/TeamMate/ViewModels/PullRequestQueryViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Chaos; +using Microsoft.Tools.TeamMate.Foundation.Chaos; using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi.PullRequests; @@ -11,9 +11,11 @@ using System.Threading.Tasks; using Microsoft.TeamFoundation.SourceControl.WebApi; using Microsoft.TeamFoundation.Build.WebApi; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class PullRequestQueryViewModel : QueryViewModelBase { private PullRequestQueryInfo queryInfo; diff --git a/Source/TeamMate/ViewModels/PullRequestRowViewModel.cs b/Source/TeamMate/ViewModels/PullRequestRowViewModel.cs index dde607d..7ed6503 100644 --- a/Source/TeamMate/ViewModels/PullRequestRowViewModel.cs +++ b/Source/TeamMate/ViewModels/PullRequestRowViewModel.cs @@ -1,12 +1,14 @@ -using Microsoft.TeamFoundation.SourceControl.WebApi; +using Microsoft.TeamFoundation.SourceControl.WebApi; using Microsoft.Tools.TeamMate.Foundation.Shell; using Microsoft.Tools.TeamMate.Utilities; using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class PullRequestRowViewModel : TrackableViewModelBase { private GitPullRequest reference; diff --git a/Source/TeamMate/ViewModels/QueryHierarchyItemViewModel.cs b/Source/TeamMate/ViewModels/QueryHierarchyItemViewModel.cs index 13d2e5b..e3270b0 100644 --- a/Source/TeamMate/ViewModels/QueryHierarchyItemViewModel.cs +++ b/Source/TeamMate/ViewModels/QueryHierarchyItemViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Chaos; +using Microsoft.Tools.TeamMate.Foundation.Chaos; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls; using Microsoft.Tools.TeamMate.Utilities; using Microsoft.TeamFoundation.WorkItemTracking.WebApi; @@ -6,9 +6,11 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class QueryHierarchyItemViewModel : TreeItemViewModelBase { private WorkItemTrackingHttpClient client; diff --git a/Source/TeamMate/ViewModels/QueryViewModelBase.cs b/Source/TeamMate/ViewModels/QueryViewModelBase.cs index d72675a..cb9da4f 100644 --- a/Source/TeamMate/ViewModels/QueryViewModelBase.cs +++ b/Source/TeamMate/ViewModels/QueryViewModelBase.cs @@ -1,12 +1,14 @@ -using Microsoft.Tools.TeamMate.Foundation.Threading; +using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Services; using System; using System.Threading.Tasks; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public abstract class QueryViewModelBase : ViewModelBase { private string name; diff --git a/Source/TeamMate/ViewModels/SearchPageViewModel.cs b/Source/TeamMate/ViewModels/SearchPageViewModel.cs index ddb9eae..35bb7ec 100644 --- a/Source/TeamMate/ViewModels/SearchPageViewModel.cs +++ b/Source/TeamMate/ViewModels/SearchPageViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data; @@ -19,9 +19,11 @@ using System.Windows; using System.Windows.Data; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class SearchPageViewModel : PageViewModelBase, ICommandProvider { // TODO: Nasty nasty duplication here! There's duplication with the PullRequestPageViewModel and diff --git a/Source/TeamMate/ViewModels/SettingsPageViewModel.cs b/Source/TeamMate/ViewModels/SettingsPageViewModel.cs index b697210..51dcd9b 100644 --- a/Source/TeamMate/ViewModels/SettingsPageViewModel.cs +++ b/Source/TeamMate/ViewModels/SettingsPageViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.Input; +using Microsoft.Tools.TeamMate.Foundation.Windows.Input; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Model.Settings; using Microsoft.Tools.TeamMate.Services; @@ -9,9 +9,11 @@ using System.IO; using System.Windows; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class SettingsPageViewModel : PageViewModelBase { private static readonly IList> RefreshIntervals = new Tuple[] { diff --git a/Source/TeamMate/ViewModels/TileCollectionViewModel.cs b/Source/TeamMate/ViewModels/TileCollectionViewModel.cs index 5ea0295..a266251 100644 --- a/Source/TeamMate/ViewModels/TileCollectionViewModel.cs +++ b/Source/TeamMate/ViewModels/TileCollectionViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Collections; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; @@ -11,9 +11,11 @@ using System.ComponentModel.Composition; using System.Linq; using System.Threading.Tasks; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class TileCollectionViewModel : ViewModelBase { private ItemCountSummary itemCountSummary = new ItemCountSummary(); diff --git a/Source/TeamMate/ViewModels/TileViewModel.cs b/Source/TeamMate/ViewModels/TileViewModel.cs index 8284666..426dbca 100644 --- a/Source/TeamMate/ViewModels/TileViewModel.cs +++ b/Source/TeamMate/ViewModels/TileViewModel.cs @@ -1,12 +1,14 @@ -using Microsoft.Tools.TeamMate.Foundation.Threading; +using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Services; using System; using System.Threading.Tasks; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public abstract class TileViewModel : ViewModelBase { private TileInfo tileInfo; diff --git a/Source/TeamMate/ViewModels/ToastViewModel.cs b/Source/TeamMate/ViewModels/ToastViewModel.cs index cb93067..db601d7 100644 --- a/Source/TeamMate/ViewModels/ToastViewModel.cs +++ b/Source/TeamMate/ViewModels/ToastViewModel.cs @@ -1,9 +1,11 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; +using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using System; using System.Windows.Media; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class ToastViewModel : ViewModelBase { private ImageSource photo; diff --git a/Source/TeamMate/ViewModels/TrackableViewModelBase.cs b/Source/TeamMate/ViewModels/TrackableViewModelBase.cs index df56ee5..8e81c5d 100644 --- a/Source/TeamMate/ViewModels/TrackableViewModelBase.cs +++ b/Source/TeamMate/ViewModels/TrackableViewModelBase.cs @@ -1,12 +1,14 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.Services; using Microsoft.Tools.TeamMate.Utilities; using System; using System.ComponentModel.Composition; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public abstract class TrackableViewModelBase : ViewModelBase { private bool isFlagged; diff --git a/Source/TeamMate/ViewModels/WorkItemAddTagsDialogViewModel.cs b/Source/TeamMate/ViewModels/WorkItemAddTagsDialogViewModel.cs index 12fc721..a7ba2bf 100644 --- a/Source/TeamMate/ViewModels/WorkItemAddTagsDialogViewModel.cs +++ b/Source/TeamMate/ViewModels/WorkItemAddTagsDialogViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Collections; +using Microsoft.Tools.TeamMate.Foundation.Collections; using Microsoft.Tools.TeamMate.Foundation.Windows.Input; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi.WorkItemTracking; @@ -7,9 +7,11 @@ using System.Collections.ObjectModel; using System.Linq; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemAddTagsDialogViewModel : ViewModelBase { private string title; diff --git a/Source/TeamMate/ViewModels/WorkItemQueryTileViewModel.cs b/Source/TeamMate/ViewModels/WorkItemQueryTileViewModel.cs index 7287c79..bbf3b5f 100644 --- a/Source/TeamMate/ViewModels/WorkItemQueryTileViewModel.cs +++ b/Source/TeamMate/ViewModels/WorkItemQueryTileViewModel.cs @@ -1,10 +1,12 @@ -using Microsoft.Tools.TeamMate.Model; +using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Services; using System; using System.ComponentModel.Composition; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemQueryTileViewModel : TileViewModel { public WorkItemQueryViewModel WorkItemQuery @@ -78,4 +80,4 @@ private void UpdateTileNameFromQueryName() } } } -} \ No newline at end of file +} diff --git a/Source/TeamMate/ViewModels/WorkItemQueryViewModel.cs b/Source/TeamMate/ViewModels/WorkItemQueryViewModel.cs index 00aaf31..5b2fefe 100644 --- a/Source/TeamMate/ViewModels/WorkItemQueryViewModel.cs +++ b/Source/TeamMate/ViewModels/WorkItemQueryViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation; +using Microsoft.Tools.TeamMate.Foundation; using Microsoft.Tools.TeamMate.Foundation.Chaos; using Microsoft.Tools.TeamMate.Foundation.Shell; using Microsoft.Tools.TeamMate.Foundation.Threading; @@ -17,9 +17,11 @@ using System.Linq; using System.Threading.Tasks; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemQueryViewModel : QueryViewModelBase, ICommandProvider { private ICollection workItems; diff --git a/Source/TeamMate/ViewModels/WorkItemRowViewModel.cs b/Source/TeamMate/ViewModels/WorkItemRowViewModel.cs index e6acedc..357f97e 100644 --- a/Source/TeamMate/ViewModels/WorkItemRowViewModel.cs +++ b/Source/TeamMate/ViewModels/WorkItemRowViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Model; +using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Services; using Microsoft.Tools.TeamMate.TeamFoundation.WebApi.WorkItemTracking; using Microsoft.Tools.TeamMate.Utilities; @@ -9,9 +9,11 @@ using System.Linq; using System.Text; using WorkItemReference = Microsoft.Tools.TeamMate.Model.WorkItemReference; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemRowViewModel : TrackableViewModelBase { public static readonly string[] RequiredWorkItemFields = { diff --git a/Source/TeamMate/ViewModels/WorkItemsPageViewModel.cs b/Source/TeamMate/ViewModels/WorkItemsPageViewModel.cs index e9d5df3..6b49a28 100644 --- a/Source/TeamMate/ViewModels/WorkItemsPageViewModel.cs +++ b/Source/TeamMate/ViewModels/WorkItemsPageViewModel.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Converters; +using Microsoft.Tools.TeamMate.Converters; using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Controls.Data; @@ -20,9 +20,11 @@ using System.Windows; using System.Windows.Data; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.ViewModels { + [SupportedOSPlatform("windows10.0.19041.0")] public class WorkItemsPageViewModel : PageViewModelBase, ICommandProvider, IFilterable, IGlobalCommandProvider { private WorkItemQueryViewModel query; diff --git a/Source/TeamMate/Windows/CustomDialog.xaml.cs b/Source/TeamMate/Windows/CustomDialog.xaml.cs index 2883767..7e40ace 100644 --- a/Source/TeamMate/Windows/CustomDialog.xaml.cs +++ b/Source/TeamMate/Windows/CustomDialog.xaml.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Foundation.Windows; +using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Windows { /// /// Interaction logic for CustomDialog.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class CustomDialog : Window { public CustomDialog() diff --git a/Source/TeamMate/Windows/CustomToastWindow.xaml.cs b/Source/TeamMate/Windows/CustomToastWindow.xaml.cs index de77883..7dd9589 100644 --- a/Source/TeamMate/Windows/CustomToastWindow.xaml.cs +++ b/Source/TeamMate/Windows/CustomToastWindow.xaml.cs @@ -1,14 +1,16 @@ -using Microsoft.Tools.TeamMate.ViewModels; +using Microsoft.Tools.TeamMate.ViewModels; using System; using System.Windows; using System.Windows.Input; using System.Windows.Media.Animation; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Windows { /// /// Interaction logic for LegacyToastWindow.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class CustomToastWindow : Window { public CustomToastWindow() diff --git a/Source/TeamMate/Windows/MainWindow.xaml.cs b/Source/TeamMate/Windows/MainWindow.xaml.cs index e83d5e6..3d075ec 100644 --- a/Source/TeamMate/Windows/MainWindow.xaml.cs +++ b/Source/TeamMate/Windows/MainWindow.xaml.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Controls; +using Microsoft.Tools.TeamMate.Controls; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Foundation.Windows.Input; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; @@ -13,12 +13,14 @@ using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Windows { /// /// Interaction logic for MainWindow.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class MainWindow { private const int FilterApplyDelayInMs = 400; diff --git a/Source/TeamMate/Windows/OverviewWindow.xaml.cs b/Source/TeamMate/Windows/OverviewWindow.xaml.cs index 647ae72..f012858 100644 --- a/Source/TeamMate/Windows/OverviewWindow.xaml.cs +++ b/Source/TeamMate/Windows/OverviewWindow.xaml.cs @@ -1,16 +1,18 @@ -using Microsoft.Tools.TeamMate.Foundation.Native; +using Microsoft.Tools.TeamMate.Foundation.Native; using Microsoft.Tools.TeamMate.Foundation.Windows.DragAndDrop; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.ViewModels; using System.Windows; using System.Windows.Input; using System.Windows.Interop; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Windows { /// /// Interaction logic for OverviewWindow.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class OverviewWindow : Window { private Point? mouseLeftButtonDownPoint; diff --git a/Source/TeamMate/Windows/ProjectPickerDialog.xaml.cs b/Source/TeamMate/Windows/ProjectPickerDialog.xaml.cs index 43ddbcb..606a46c 100644 --- a/Source/TeamMate/Windows/ProjectPickerDialog.xaml.cs +++ b/Source/TeamMate/Windows/ProjectPickerDialog.xaml.cs @@ -1,14 +1,16 @@ -using Microsoft.Tools.TeamMate.ViewModels; +using Microsoft.Tools.TeamMate.ViewModels; using Microsoft.TeamFoundation.Core.WebApi; using System.Linq; using System.Windows; using System.Windows.Input; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Windows { /// /// Interaction logic for ProjectPickerDialog.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class ProjectPickerDialog : Window { public ProjectPickerDialog() diff --git a/Source/TeamMate/Windows/PullRequestQueryEditorDialog.xaml.cs b/Source/TeamMate/Windows/PullRequestQueryEditorDialog.xaml.cs index 0668c47..93a1295 100644 --- a/Source/TeamMate/Windows/PullRequestQueryEditorDialog.xaml.cs +++ b/Source/TeamMate/Windows/PullRequestQueryEditorDialog.xaml.cs @@ -1,4 +1,4 @@ -using Microsoft.Tools.TeamMate.Foundation.Threading; +using Microsoft.Tools.TeamMate.Foundation.Threading; using Microsoft.Tools.TeamMate.Foundation.Windows.MVVM; using Microsoft.Tools.TeamMate.ViewModels; using System; @@ -6,12 +6,14 @@ using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Windows { /// /// Interaction logic for PullRequestQueryEditorDialog.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class PullRequestQueryEditorDialog : Window { public PullRequestQueryEditorDialog() diff --git a/Source/TeamMate/Windows/QuickSearchWindow.xaml.cs b/Source/TeamMate/Windows/QuickSearchWindow.xaml.cs index c35b272..023d121 100644 --- a/Source/TeamMate/Windows/QuickSearchWindow.xaml.cs +++ b/Source/TeamMate/Windows/QuickSearchWindow.xaml.cs @@ -1,16 +1,18 @@ -using Microsoft.Tools.TeamMate.Foundation.Diagnostics; +using Microsoft.Tools.TeamMate.Foundation.Diagnostics; using Microsoft.Tools.TeamMate.Foundation.Windows; using Microsoft.Tools.TeamMate.Model; using Microsoft.Tools.TeamMate.Utilities; using System; using System.Windows; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Windows { /// /// Interaction logic for QuickSearchWindow.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class QuickSearchWindow : Window { public event QuickSearchTriggeredEventHandler SearchTriggered; @@ -137,6 +139,7 @@ private static bool IsTextWorkItemId(string inputText) public delegate void QuickSearchTriggeredEventHandler(object sender, QuickSearchTriggeredEventArgs e); + [SupportedOSPlatform("windows10.0.19041.0")] public class QuickSearchTriggeredEventArgs : EventArgs { public QuickSearchTriggeredEventArgs(string searchText) diff --git a/Source/TeamMate/Windows/WorkItemAddTagsDialog.xaml.cs b/Source/TeamMate/Windows/WorkItemAddTagsDialog.xaml.cs index 2668670..0f32934 100644 --- a/Source/TeamMate/Windows/WorkItemAddTagsDialog.xaml.cs +++ b/Source/TeamMate/Windows/WorkItemAddTagsDialog.xaml.cs @@ -1,12 +1,14 @@ -using Microsoft.Tools.TeamMate.ViewModels; +using Microsoft.Tools.TeamMate.ViewModels; using System.Windows; using System.Windows.Controls; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Windows { /// /// Interaction logic for WorkItemAddTagsDialog.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class WorkItemAddTagsDialog : Window { public WorkItemAddTagsDialog() diff --git a/Source/TeamMate/Windows/WorkItemQueryPickerDialog.xaml.cs b/Source/TeamMate/Windows/WorkItemQueryPickerDialog.xaml.cs index 22a7420..b5f187a 100644 --- a/Source/TeamMate/Windows/WorkItemQueryPickerDialog.xaml.cs +++ b/Source/TeamMate/Windows/WorkItemQueryPickerDialog.xaml.cs @@ -1,13 +1,15 @@ -using Microsoft.Tools.TeamMate.Controls; +using Microsoft.Tools.TeamMate.Controls; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using System; using System.Windows; +using System.Runtime.Versioning; namespace Microsoft.Tools.TeamMate.Windows { /// /// Interaction logic for WorkItemQueryPickerDialog.xaml /// + [SupportedOSPlatform("windows10.0.19041.0")] public partial class WorkItemQueryPickerDialog : Window { public WorkItemQueryPickerDialog() diff --git a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj index e04505a..37782cb 100644 --- a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj +++ b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj @@ -8,7 +8,6 @@ x86 - CA1416 publish\ None diff --git a/Source/WindowsRuntime/Properties/AssemblyInfo.cs b/Source/WindowsRuntime/Properties/AssemblyInfo.cs index d92771a..471eed2 100644 --- a/Source/WindowsRuntime/Properties/AssemblyInfo.cs +++ b/Source/WindowsRuntime/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Runtime.Versioning; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -7,6 +8,9 @@ [assembly: AssemblyTitle("Microsoft.Tools.TeamMate.WindowsRuntime")] [assembly: AssemblyDescription("")] +// Platform support +[assembly: SupportedOSPlatform("windows10.0.19041.0")] + // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. From 92d1e4f7e13d29a75b4f9595f834093d3f6edde2 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 14:31:46 -0500 Subject: [PATCH 15/26] fix: clean up NoWarn properties and suppress NU1701 warning for Azure DevOps SDK dependencies --- .../Foundation/Microsoft.Tools.TeamMate.Foundation.csproj | 1 - .../Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj | 8 +------- Source/TeamMate/TeamMate.csproj | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index 6e64ad7..28ffd23 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -9,7 +9,6 @@ AnyCPU;x86 - NU1603 publish\ diff --git a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj index 76e463e..1409fce 100644 --- a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj +++ b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj @@ -7,29 +7,23 @@ AnyCPU;x86 + NU1701 publish\ bin\x64\Debug\ - NU1701 bin\x64\Release\ - NU1701 bin\x86\Debug\ - NU1701 bin\x86\Release\ - NU1701 - - 6.0.0 - 16.170.0 diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index 262799a..8f4a433 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -26,6 +26,7 @@ x86 + NU1701 publish\ None From 50afc835ca496fab8f56317a37bf6e205f1df88d Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 14:46:55 -0500 Subject: [PATCH 16/26] fix: update target framework from .NET 9 to .NET 10 in project files --- .../Microsoft.Tools.TeamMate.Foundation.csproj | 2 +- .../Windows/Transfer/FileGroupDataObject.cs | 14 -------------- ...oft.Tools.TeamMate.TeamFoundation.WebApi.csproj | 9 +++++++-- Source/TeamMate/TeamMate.csproj | 9 +++++++-- .../Microsoft.Tools.TeamMate.WindowsRuntime.csproj | 2 +- 5 files changed, 16 insertions(+), 20 deletions(-) diff --git a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj index 28ffd23..2e25de3 100644 --- a/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj +++ b/Source/Foundation/Microsoft.Tools.TeamMate.Foundation.csproj @@ -1,6 +1,6 @@  - net9.0-windows10.0.19041.0 + net10.0-windows10.0.19041.0 true Library false diff --git a/Source/Foundation/Windows/Transfer/FileGroupDataObject.cs b/Source/Foundation/Windows/Transfer/FileGroupDataObject.cs index 26d80d0..fcbad6a 100644 --- a/Source/Foundation/Windows/Transfer/FileGroupDataObject.cs +++ b/Source/Foundation/Windows/Transfer/FileGroupDataObject.cs @@ -43,20 +43,6 @@ public override bool GetDataPresent(string format, bool autoConvert) return GetFormats(autoConvert).Contains(format); } - public override object GetData(string format, bool autoConvert) - { - if (format == CustomDataFormats.FileGroupDescriptorW) - { - return GetFileDescriptorStream(); - } - else if (format == CustomDataFormats.FileContents) - { - return GetFileContents(); - } - - return base.GetData(format, autoConvert); - } - void IDataObject.GetData(ref FORMATETC formatetc, out STGMEDIUM medium) { if (formatetc.cfFormat == (short)DataFormats.GetFormat(CustomDataFormats.FileContents).Id) diff --git a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj index 1409fce..a670c81 100644 --- a/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj +++ b/Source/TeamFoundation.WebApi/Microsoft.Tools.TeamMate.TeamFoundation.WebApi.csproj @@ -1,13 +1,13 @@  - net9.0-windows + net10.0-windows Library win-x86;win-x64;win-arm64 false AnyCPU;x86 - + NU1701 publish\ @@ -30,5 +30,10 @@ 16.170.0 + + + + + \ No newline at end of file diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index 8f4a433..2458d39 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -1,6 +1,6 @@  - net9.0-windows10.0.19041.0 + net10.0-windows10.0.19041.0 true Disk true @@ -26,7 +26,7 @@ x86 - + NU1701 publish\ None @@ -492,6 +492,11 @@ + + + + + diff --git a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj index 37782cb..570354f 100644 --- a/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj +++ b/Source/WindowsRuntime/Microsoft.Tools.TeamMate.WindowsRuntime.csproj @@ -1,6 +1,6 @@  - net9.0-windows10.0.19041.0 + net10.0-windows10.0.19041.0 Library win-x86;win-x64;win-arm64 false From c942fc0902da90ba88bd5fbb6b958e59cfc5c727 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 15:07:40 -0500 Subject: [PATCH 17/26] fix: update project files to use WiX Toolset v5.0.2 and .NET 10 - Changed project file to use WiX Toolset SDK version 5.0.2. - Updated Product.wxs to align with WiX v4 schema and improved directory structure. - Added RuntimeIdentifier and SelfContained properties to TeamMate.csproj for better deployment configuration. --- Source/Setup/Microsoft.Tools.TeamMate.wixproj | 60 +------ Source/Setup/Product.wxs | 169 ++++++++++++------ Source/TeamMate/TeamMate.csproj | 2 + 3 files changed, 125 insertions(+), 106 deletions(-) diff --git a/Source/Setup/Microsoft.Tools.TeamMate.wixproj b/Source/Setup/Microsoft.Tools.TeamMate.wixproj index f87d420..07c8acc 100644 --- a/Source/Setup/Microsoft.Tools.TeamMate.wixproj +++ b/Source/Setup/Microsoft.Tools.TeamMate.wixproj @@ -1,75 +1,33 @@ - - + - Debug - x86 - 3.10 - d8f90795-e254-441c-b231-d4611e574915 - 2.0 Microsoft.Tools.TeamMate Package - - - bin\$(Configuration)\ - obj\$(Configuration)\ - Debug - ICE38 - - - bin\$(Configuration)\ - obj\$(Configuration)\ + x86 + ICE38 - - - + Foundation - {1967369e-0368-4888-b743-b16abae28b1f} True - True - Binaries;Content;Satellites - INSTALLFOLDER WebApi - {888e7687-95f8-4049-94df-9dd3398b5592} True - - - Binaries;Content;Satellites - INSTALLFOLDER TeamMate - {01fcf244-d4b2-43dd-bb77-9d4946868299} True - - - Binaries;Content;Satellites - INSTALLFOLDER WindowsRuntime - {5bb3a276-4460-4c5f-b842-42e4618dd034} True - True - Binaries;Content;Satellites - INSTALLFOLDER - - - - - - + + + + + \ No newline at end of file diff --git a/Source/Setup/Product.wxs b/Source/Setup/Product.wxs index 6de3edf..b5a0e83 100644 --- a/Source/Setup/Product.wxs +++ b/Source/Setup/Product.wxs @@ -1,9 +1,17 @@ - + - - - + + @@ -16,66 +24,117 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + - - + + + + + + + + + - - + + + - - + + + + + + + + + + + + + + + + - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/Source/TeamMate/TeamMate.csproj b/Source/TeamMate/TeamMate.csproj index 2458d39..16a9c98 100644 --- a/Source/TeamMate/TeamMate.csproj +++ b/Source/TeamMate/TeamMate.csproj @@ -1,6 +1,8 @@  net10.0-windows10.0.19041.0 + win-x86 + false true Disk true From ef6d1ea397489a9868af52f02c3ecdcd2f904d30 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 15:10:42 -0500 Subject: [PATCH 18/26] fix: update CI/CD workflows to use latest actions and .NET 10 - Upgraded actions/checkout from v2 to v4 in both CI and CD workflows. - Updated GitVersion setup and execution actions to v1.1.1. - Changed .NET version in setup from 5.0.x to 10.0.x. - Replaced MSBuild commands with dotnet build for consistency across workflows. --- .github/workflows/CD.yml | 29 ++++++++++++----------------- .github/workflows/CI.yml | 23 +++++++++++++---------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index d42b413..c39793f 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -21,23 +21,23 @@ jobs: contents: write steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Get the version id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + run: echo "VERSION=${GITHUB_REF/refs\/tags\/\/}" >> $GITHUB_OUTPUT shell: bash - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.7 + uses: gittools/actions/gitversion/setup@v1.1.1 with: - versionSpec: '5.x' + versionSpec: '6.x' - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.7 + uses: gittools/actions/gitversion/execute@v1.1.1 with: useConfigFile: true @@ -76,26 +76,21 @@ jobs: echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}" echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}" - - name: Setup .NET - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v4 with: - dotnet-version: 5.0.x + dotnet-version: '10.0.x' - - name: Setup MSBuild.exe - uses: microsoft/Setup-MSBuild@v1.0.2 - - - name: Install WiX - run: nuget install WiX -Version 3.11.2 + - name: Install WiX Toolset + run: dotnet tool install --global wix --version 5.0.2 - name: Build Project - run: msbuild /restore:true /p:Configuration=${{ matrix.Configuration }} /p:Platform=${{ matrix.TargetPlatform }} TeamMate.csproj + run: dotnet build --configuration ${{ matrix.Configuration }} working-directory: ./Source/TeamMate - shell: cmd - name: Create MSI - run: msbuild /restore:true /p:Configuration=${{ matrix.Configuration }} /p:Platform=${{ matrix.TargetPlatform }} + run: dotnet build --configuration ${{ matrix.Configuration }} working-directory: ./Source/Setup - shell: cmd - name: Release uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c116bc7..64ac311 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,26 +1,30 @@ name: CI on: [pull_request] +permissions: + contents: read jobs: build: - name: MSBuild + name: Build # runs-on: self-hosted runs-on: windows-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup MSBuild.exe - uses: microsoft/Setup-MSBuild@v1.0.2 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.x' - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.7 + uses: gittools/actions/gitversion/setup@v1.1.1 with: - versionSpec: '5.x' + versionSpec: '6.x' - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.7 + uses: gittools/actions/gitversion/execute@v1.1.1 with: useConfigFile: true @@ -59,7 +63,6 @@ jobs: echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}" echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}" - - name: MSBuild - run: msbuild -restore:true TeamMate.csproj + - name: Build + run: dotnet build --configuration Debug working-directory: ./Source/TeamMate - shell: cmd From 2e547a650e4f5b97b214a310e21adea140a1dd1d Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 15:24:28 -0500 Subject: [PATCH 19/26] fix: update GitVersion actions to v3.0.0 in CI/CD workflows - Updated the GitVersion setup and execute actions from v1.1.1 to v3.0.0 in both CI.yml and CD.yml. - Ensured compatibility with the latest version specifications for improved functionality. --- .github/workflows/CD.yml | 4 ++-- .github/workflows/CI.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index c39793f..65b0242 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -31,13 +31,13 @@ jobs: shell: bash - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v1.1.1 + uses: gittools/actions/gitversion/setup@v3.0.0 with: versionSpec: '6.x' - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v1.1.1 + uses: gittools/actions/gitversion/execute@v3.0.0 with: useConfigFile: true diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 64ac311..eb2e3f5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,13 +18,13 @@ jobs: dotnet-version: '10.0.x' - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v1.1.1 + uses: gittools/actions/gitversion/setup@v3.0.0 with: versionSpec: '6.x' - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v1.1.1 + uses: gittools/actions/gitversion/execute@v3.0.0 with: useConfigFile: true From 85a979825a025fc1843e2d3d017ae3a5fb2f66a2 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 15:31:40 -0500 Subject: [PATCH 20/26] fix: update GitVersion actions to v4.2.0 and adjust next-version in GitVersion.yml --- .github/workflows/CD.yml | 6 +++--- .github/workflows/CI.yml | 6 +++--- GitVersion.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 65b0242..66ed624 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -31,13 +31,13 @@ jobs: shell: bash - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v3.0.0 + uses: gittools/actions/gitversion/setup@v4.2.0 with: - versionSpec: '6.x' + versionSpec: '6.4.x' - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v3.0.0 + uses: gittools/actions/gitversion/execute@v4.2.0 with: useConfigFile: true diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index eb2e3f5..a501069 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,13 +18,13 @@ jobs: dotnet-version: '10.0.x' - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v3.0.0 + uses: gittools/actions/gitversion/setup@v4.2.0 with: - versionSpec: '6.x' + versionSpec: '6.4.x' - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v3.0.0 + uses: gittools/actions/gitversion/execute@v4.2.0 with: useConfigFile: true diff --git a/GitVersion.yml b/GitVersion.yml index 8ab254f..0ce3b63 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,4 +1,4 @@ -next-version: 0.1.12.0 +next-version: 0.1.12 mode: ContinuousDeployment branches: {} ignore: From 56c031fee298a0fff565e76596d1de936164f349 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz Date: Tue, 18 Nov 2025 15:40:16 -0500 Subject: [PATCH 21/26] fix: update HintTextFontStyle to nullable and improve hint text rendering logic - Changed HintTextFontStyle property to nullable type for better handling of font styles. - Simplified hint text rendering logic to use null-coalescing operator for default font style. - Updated HTML encoding in DataObjectExtensions to use Uri.EscapeDataString for better URI handling. - Enhanced exception handling in VstsConnectionService for cache read/write operations. - Added GetTokenKeyString method for consistent token key handling. - Minor formatting adjustments in WorkItemQueryTileViewModel and ToastNotificationManager. --- .../Windows/Controls/HintTextAdorner.cs | 8 ++------ .../Windows/Shell/ApplicationInstance.cs | 5 ++++- .../Windows/Transfer/DataObjectExtensions.cs | 2 +- Source/TeamMate/Services/VstsConnectionService.cs | 15 +++++++++++---- .../ViewModels/WorkItemQueryTileViewModel.cs | 1 + .../UI/Notifications/ToastNotificationManager.cs | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Source/Foundation/Windows/Controls/HintTextAdorner.cs b/Source/Foundation/Windows/Controls/HintTextAdorner.cs index db084c6..d341a87 100644 --- a/Source/Foundation/Windows/Controls/HintTextAdorner.cs +++ b/Source/Foundation/Windows/Controls/HintTextAdorner.cs @@ -165,7 +165,7 @@ public String HintText /// /// Get/Set the hint text font style /// - public FontStyle HintTextFontStyle { get; set; } + public FontStyle? HintTextFontStyle { get; set; } /// /// Overridden to render the hint text when appropriate. @@ -188,11 +188,7 @@ protected override void OnRender(DrawingContext drawingContext) renderBrush.Opacity = 0.6; // Draw the hint text on top of the control - FontStyle fontStyle = HintTextFontStyle; - if (fontStyle == FontStyles.Normal) - { - fontStyle = control.FontStyle; - } + FontStyle fontStyle = HintTextFontStyle ?? control.FontStyle; var dpiInfo = VisualTreeHelper.GetDpi(control); FormattedText text = new FormattedText(hintText, uiCulture, control.FlowDirection, diff --git a/Source/Foundation/Windows/Shell/ApplicationInstance.cs b/Source/Foundation/Windows/Shell/ApplicationInstance.cs index f852c56..26a868a 100644 --- a/Source/Foundation/Windows/Shell/ApplicationInstance.cs +++ b/Source/Foundation/Windows/Shell/ApplicationInstance.cs @@ -180,7 +180,10 @@ private object Receive() byte[] message = new byte[messageSize]; fs.ReadExactly(message, 0, messageSize); - return JsonSerializer.Deserialize(new MemoryStream(message)); + using (var ms = new MemoryStream(message)) + { + return JsonSerializer.Deserialize(ms); + } } else { diff --git a/Source/Foundation/Windows/Transfer/DataObjectExtensions.cs b/Source/Foundation/Windows/Transfer/DataObjectExtensions.cs index f9ad31c..2aecbf9 100644 --- a/Source/Foundation/Windows/Transfer/DataObjectExtensions.cs +++ b/Source/Foundation/Windows/Transfer/DataObjectExtensions.cs @@ -82,7 +82,7 @@ public static void SetUri(this IDataObject dataObject, Uri uri, string descripti if(!dataObject.GetDataPresent(DataFormats.Html) && description != null) { - dataObject.SetHtml($"{WebUtility.HtmlEncode(description)}"); + dataObject.SetHtml($"{WebUtility.HtmlEncode(description)}"); } if (!dataObject.ContainsFileGroup()) diff --git a/Source/TeamMate/Services/VstsConnectionService.cs b/Source/TeamMate/Services/VstsConnectionService.cs index cb42fd8..451be08 100644 --- a/Source/TeamMate/Services/VstsConnectionService.cs +++ b/Source/TeamMate/Services/VstsConnectionService.cs @@ -133,7 +133,7 @@ private static void RegisterTokenCache(ITokenCache tokenCache, string cacheFileP byte[] cacheData = File.ReadAllBytes(cacheFilePath); notificationArgs.TokenCache.DeserializeMsalV3(cacheData); } - catch + catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException || ex is System.Security.SecurityException) { // Ignore cache read errors, will just re-authenticate } @@ -150,7 +150,7 @@ private static void RegisterTokenCache(ITokenCache tokenCache, string cacheFileP byte[] cacheData = notificationArgs.TokenCache.SerializeMsalV3(); File.WriteAllBytes(cacheFilePath, cacheData); } - catch + catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException || ex is System.Security.SecurityException) { // Ignore cache write errors } @@ -171,10 +171,17 @@ private class InMemoryTokenStorage : Microsoft.VisualStudio.Services.Common.Toke // Simple in-memory dictionary for tokens - not persisted private readonly System.Collections.Concurrent.ConcurrentDictionary tokens = new(); + private static string GetTokenKeyString(Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey) + { + // Create a unique key from token key's hash code + // VssTokenKey is a value type, so its hash code is based on its content + return tokenKey.GetHashCode().ToString(); + } + protected override Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken AddToken( Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey, string tokenValue) { - string key = tokenKey.ToString(); + string key = GetTokenKeyString(tokenKey); tokens[key] = tokenValue; return null; // Return null - credential storage will handle token object } @@ -187,7 +194,7 @@ protected override Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken protected override bool RemoveToken(Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey) { - string key = tokenKey.ToString(); + string key = GetTokenKeyString(tokenKey); return tokens.TryRemove(key, out _); } diff --git a/Source/TeamMate/ViewModels/WorkItemQueryTileViewModel.cs b/Source/TeamMate/ViewModels/WorkItemQueryTileViewModel.cs index bbf3b5f..8bf3b07 100644 --- a/Source/TeamMate/ViewModels/WorkItemQueryTileViewModel.cs +++ b/Source/TeamMate/ViewModels/WorkItemQueryTileViewModel.cs @@ -80,4 +80,5 @@ private void UpdateTileNameFromQueryName() } } } + } diff --git a/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs b/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs index 04465b0..4743adf 100644 --- a/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs +++ b/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs @@ -53,7 +53,7 @@ private void Toast_Dismissed(ToastNotification sender, ToastDismissedEventArgs a this.ToastOccurred?.Invoke(this, new ToastNotificationManagerEventArgs { EventType = ToastNotificationEventType.Dismissed, - DismissReason = (ToastDismissalReason)(int)args.Reason + DismissReason = (ToastDismissalReason)args.Reason }); } From a11b3b65bc8040daabbb44c9046c9a93005f8049 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz <43656407+supermem613@users.noreply.github.com> Date: Tue, 18 Nov 2025 17:33:56 -0500 Subject: [PATCH 22/26] fix: add summary documentation for ToastDismissalReason enum --- .../UI/Notifications/ToastNotificationManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs b/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs index 4743adf..92a5d76 100644 --- a/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs +++ b/Source/WindowsRuntime/UI/Notifications/ToastNotificationManager.cs @@ -91,6 +91,12 @@ public enum ToastNotificationEventType Failed } + /// + /// Mirrors Windows.UI.Notifications.ToastDismissalReason values. + /// These values are hardcoded to match the Windows API as of Nov 2025. + /// If the Windows API changes, update these values accordingly. + /// Consider adding runtime validation to ensure values stay in sync. + /// public enum ToastDismissalReason { UserCanceled = 0, From 5658e24f199c52694d201af5f76e8e5fef812b09 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz <43656407+supermem613@users.noreply.github.com> Date: Tue, 18 Nov 2025 17:34:43 -0500 Subject: [PATCH 23/26] fix: improve polymorphic serialization in ApplicationInstance Updated the serialization logic in ApplicationInstance to use the object's type for preserving type information during polymorphic serialization. --- Source/Foundation/Windows/Shell/ApplicationInstance.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Foundation/Windows/Shell/ApplicationInstance.cs b/Source/Foundation/Windows/Shell/ApplicationInstance.cs index 26a868a..11bfcf0 100644 --- a/Source/Foundation/Windows/Shell/ApplicationInstance.cs +++ b/Source/Foundation/Windows/Shell/ApplicationInstance.cs @@ -154,7 +154,8 @@ public void SendMessage(object o) { using (FileStream fs = new FileStream(mailslotHandle, FileAccess.Write, 400, false)) { - JsonSerializer.Serialize(fs, o); + // Use o.GetType() to preserve type information for polymorphic serialization + JsonSerializer.Serialize(fs, o, o.GetType()); } eventWaitHandle.Set(); From a0e3a7600081628186e913db850b293188c7db84 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz <43656407+supermem613@users.noreply.github.com> Date: Tue, 18 Nov 2025 17:43:43 -0500 Subject: [PATCH 24/26] fix: enhance message serialization with envelope for type metadata Added a MessageEnvelope class to wrap messages with type metadata for proper deserialization. Updated the serialization and deserialization logic to utilize the envelope, ensuring the correct type is preserved and validated during message handling. --- .../Windows/Shell/ApplicationInstance.cs | 51 +++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/Source/Foundation/Windows/Shell/ApplicationInstance.cs b/Source/Foundation/Windows/Shell/ApplicationInstance.cs index 11bfcf0..e08ae66 100644 --- a/Source/Foundation/Windows/Shell/ApplicationInstance.cs +++ b/Source/Foundation/Windows/Shell/ApplicationInstance.cs @@ -13,6 +13,21 @@ namespace Microsoft.Tools.TeamMate.Foundation.Windows.Shell { + /// + /// Envelope to wrap messages with type metadata for proper deserialization. + /// + internal class MessageEnvelope + { + /// + /// Magic marker to identify valid message envelopes. + /// + public const int MagicMarker = 0x544D4154; // "TMAT" in hex + + public int Magic { get; set; } + public string TypeName { get; set; } + public string PayloadJson { get; set; } + } + [SupportedOSPlatform("windows10.0.19041.0")] public class ApplicationInstance : IDisposable { @@ -154,8 +169,14 @@ public void SendMessage(object o) { using (FileStream fs = new FileStream(mailslotHandle, FileAccess.Write, 400, false)) { - // Use o.GetType() to preserve type information for polymorphic serialization - JsonSerializer.Serialize(fs, o, o.GetType()); + // Wrap message with type metadata to ensure proper deserialization + var envelope = new MessageEnvelope + { + Magic = MessageEnvelope.MagicMarker, + TypeName = o.GetType().AssemblyQualifiedName, + PayloadJson = JsonSerializer.Serialize(o, o.GetType()) + }; + JsonSerializer.Serialize(fs, envelope); } eventWaitHandle.Set(); @@ -183,7 +204,31 @@ private object Receive() using (var ms = new MemoryStream(message)) { - return JsonSerializer.Deserialize(ms); + // Deserialize the envelope first to get type information + var envelope = JsonSerializer.Deserialize(ms); + if (envelope == null || string.IsNullOrEmpty(envelope.TypeName) || string.IsNullOrEmpty(envelope.PayloadJson)) + { + Log.Warn("Received invalid message envelope"); + return null; + } + + // Verify the magic marker + if (envelope.Magic != MessageEnvelope.MagicMarker) + { + Log.Warn($"Invalid message envelope magic marker: expected {MessageEnvelope.MagicMarker:X8}, got {envelope.Magic:X8}"); + return null; + } + + // Get the type from the type name + Type messageType = Type.GetType(envelope.TypeName); + if (messageType == null) + { + Log.Warn($"Could not resolve type: {envelope.TypeName}"); + return null; + } + + // Deserialize the payload using the correct type + return JsonSerializer.Deserialize(envelope.PayloadJson, messageType); } } else From e5f9846f620e80ef959c4adad775554f3f5a1e31 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz <43656407+supermem613@users.noreply.github.com> Date: Tue, 18 Nov 2025 17:46:03 -0500 Subject: [PATCH 25/26] refactor: remove in-memory token storage implementation for .NET 9 migration --- .../Services/VstsConnectionService.cs | 77 ------------------- 1 file changed, 77 deletions(-) diff --git a/Source/TeamMate/Services/VstsConnectionService.cs b/Source/TeamMate/Services/VstsConnectionService.cs index 451be08..364ce50 100644 --- a/Source/TeamMate/Services/VstsConnectionService.cs +++ b/Source/TeamMate/Services/VstsConnectionService.cs @@ -157,83 +157,6 @@ private static void RegisterTokenCache(ITokenCache tokenCache, string cacheFileP } }); } - private static VssClientCredentialStorage GetVssClientCredentialStorage(double tokenLeaseInSeconds) - { - // TODO: Restore custom caching storage for .NET 9 - using in-memory storage for now - // The Azure DevOps SDK API has changed significantly and requires a new implementation - // For now, use in-memory storage which will work but won't persist across restarts - return new VssClientCredentialStorage("TeamMate", new InMemoryTokenStorage()); - } - - // Temporary in-memory token storage for .NET 9 migration - private class InMemoryTokenStorage : Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenStorage - { - // Simple in-memory dictionary for tokens - not persisted - private readonly System.Collections.Concurrent.ConcurrentDictionary tokens = new(); - - private static string GetTokenKeyString(Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey) - { - // Create a unique key from token key's hash code - // VssTokenKey is a value type, so its hash code is based on its content - return tokenKey.GetHashCode().ToString(); - } - - protected override Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken AddToken( - Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey, string tokenValue) - { - string key = GetTokenKeyString(tokenKey); - tokens[key] = tokenValue; - return null; // Return null - credential storage will handle token object - } - - protected override Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken RetrieveToken( - Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey) - { - return null; // Let SDK manage tokens - } - - protected override bool RemoveToken(Microsoft.VisualStudio.Services.Common.TokenStorage.VssTokenKey tokenKey) - { - string key = GetTokenKeyString(tokenKey); - return tokens.TryRemove(key, out _); - } - - public override System.Collections.Generic.IEnumerable RetrieveAll(string tokenType) - { - return System.Linq.Enumerable.Empty(); - } - - public override bool RemoveAll() - { - tokens.Clear(); - return true; - } - - public override string RetrieveTokenSecret(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token) - { - return null; - } - - public override bool SetTokenSecret(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token, string tokenValue) - { - return true; - } - - public override bool RemoveTokenSecret(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token) - { - return true; - } - - public override string GetProperty(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token, string propertyName) - { - return null; - } - - public override bool SetProperty(Microsoft.VisualStudio.Services.Common.TokenStorage.VssToken token, string propertyName, string value) - { - return true; - } - } public async Task ResolveProjectReferenceAsync(Uri projectCollectionUri, string projectName) { From ec015c7d6455cde53ae15b92e9323a070ae06121 Mon Sep 17 00:00:00 2001 From: Marcus Markiewicz <43656407+supermem613@users.noreply.github.com> Date: Tue, 18 Nov 2025 17:47:17 -0500 Subject: [PATCH 26/26] fix: remove unused XML namespaces from Product.wxs --- Source/Setup/Product.wxs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Setup/Product.wxs b/Source/Setup/Product.wxs index b5a0e83..8cf6204 100644 --- a/Source/Setup/Product.wxs +++ b/Source/Setup/Product.wxs @@ -1,7 +1,5 @@ - +