✅ Powershell SDK error on .Net 8
Hey, so I've been trying to invoke a powershell command using the Powershell SDK for .Net 8 but it seems to throw an error saying Windows.Web.dll wasn't found?
15 Replies
I have installed all the required packages
My Powershell Invocation
that trick to load WinRT assemblies relies on runtime features that were removed in .NET 5 iirc
Sooo it means I can't use Powershell like that?
yes
but also like, you could just use the WinRT stuff directly from C#
no point in using PowerShell for this
i agree if you are using PowerShell just to call
PackageManager
there is absolutely no point in doing that. the APIs are easily usable from C#Call Windows Runtime APIs in desktop apps - Windows apps
Enhance your desktop application for Windows users by using Windows Runtime APIs.
if this is part of a script that you already have and it's complicated to untangle it will require some amount of work to use
Windows.*
APIs from it on .NET 8
it is still possible though i have never tried itOh alright
also I'm pretty sure Windows.Web isn't even the right assembly to load for that
Guess so too, that's why I was confused why is it throwing this error
didn't find any solutions online so decided to ask here
in this case it does not matter because all Windows.* are redirected automatically to the right place. but, yes, it is not strictly correct
!close
Closed!