From 4ed9ac35a09f933772d27dbb2e1cc8a56e9aae1f Mon Sep 17 00:00:00 2001 From: Sander van Vliet Date: Fri, 9 Jun 2023 09:37:11 +0200 Subject: [PATCH 1/2] Target netcoreapp3.1 and net6 in tests --- .../WindowsCredentialManager.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WindowsCredentialManager.Tests/WindowsCredentialManager.Tests.csproj b/WindowsCredentialManager.Tests/WindowsCredentialManager.Tests.csproj index 4d31599..7ca9042 100644 --- a/WindowsCredentialManager.Tests/WindowsCredentialManager.Tests.csproj +++ b/WindowsCredentialManager.Tests/WindowsCredentialManager.Tests.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + netcoreapp3.1;net6 true From 4c6e8ae9e4c337634c24cd99578f9eaf07580a9d Mon Sep 17 00:00:00 2001 From: Sander van Vliet Date: Fri, 9 Jun 2023 09:37:39 +0200 Subject: [PATCH 2/2] Change LastWritten from DateTimeOffset to FILETIME so it can be marshalled on net6 --- WindowsCredentialManager/Win32/Types/CREDENTIALW.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WindowsCredentialManager/Win32/Types/CREDENTIALW.cs b/WindowsCredentialManager/Win32/Types/CREDENTIALW.cs index 1ce7153..712ca82 100644 --- a/WindowsCredentialManager/Win32/Types/CREDENTIALW.cs +++ b/WindowsCredentialManager/Win32/Types/CREDENTIALW.cs @@ -1,3 +1,5 @@ +using System.Runtime.InteropServices.ComTypes; + namespace WindowsCredentialManager.Win32.Types { using System; @@ -10,7 +12,7 @@ internal struct CREDENTIALW public CREDENTIAL_TYPE Type; [MarshalAs (UnmanagedType.LPWStr)] public string TargetName; [MarshalAs (UnmanagedType.LPWStr)] public string? Comment; - public DateTimeOffset LastWritten; + public FILETIME LastWritten; public int BlobSize; public SecureBlob? Blob; public CREDENTIAL_PERSIST Persist;