You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I run the test WUApiTests.TestInstaller and it throws:
System.InvalidCastException : Specified cast is not valid.
at System.StubHelpers.InterfaceMarshaler.ConvertToNative(Object objSrc, IntPtr itfMT, IntPtr classMT, Int32 flags)
at Vanara.PInvoke.WUApi.IUpdateDownloader.set_Updates(IUpdateCollection value)
at Vanara.WindowsUpdate.UpdateDownloader..ctor(IEnumerable`1 updates) in C:\...\RiderProjects\Vanara\WindowsUpdate\WindowsUpdate.cs:line 1618
at Vanara.PInvoke.Tests.WUApiTests.TestInstaller() in C:\...\RiderProjects\Vanara\UnitTests\PInvoke\WUApi\WUApiTests.cs:line 72
The method set_Updates on IUpdateDownloader from Vanara.PInvoke.WUApi causing the issue.
I test it code and give me the same error:
// Create Downloader
var session = new IUpdateSession();
var downloader = session.CreateUpdateDownloader();
var updatesToDownload = new IUpdateCollection();
// ... add or not some Updates on updatesToDownload collection
downloader.Updates = updatesToDownload; // <------ issue
SAlu2s
The text was updated successfully, but these errors were encountered:
Hello. I run the test WUApiTests.TestInstaller and it throws:
The method set_Updates on IUpdateDownloader from Vanara.PInvoke.WUApi causing the issue.
I test it code and give me the same error:
SAlu2s
The text was updated successfully, but these errors were encountered: