Open mk185147 opened 1 year ago
In addition, where is the source of version 3? It's not in this repo (or I couldn't find the right branch).
The same issue is still present in the version v3.0.0
Looking into the nuget package Microsoft.Management.Infrastructure.Runtime.Win I see that the version 3.0.0 doesn't contain files runtimes*\native\mi.dll and runtimes*\native\miutils.dll which were present in the preview 3 nuget package.
@adityapatwardhan and @daxian-dbw can you, please, help? I saw in the ticket https://github.com/dotnet/runtime/issues/86713 that you were probably preparing a solution for use these powershell nuget packages with .NET 8 but it isn't clear to me what is the expectation. I see that mi.dll and miutils.dll aren't included in Microsoft.Management.Infrastructure.Runtime.Win anymore - is it expected? Is there other way how can I deliver these dlls to a windows container? Thanks
@mk185147 Regarding that .NET issue, the v3.0.0 of the MMI package resolves the problem -- PowerShell 7.4 and applications that host PowerShell 7.4 will continue to work without needing to make the runtimeconfig
change.
I believe mi.dll
and miutils.dll
were removed from the v3.0.0 package because they are available under C:\Windows\System32
on Windows machines, so there is no need to include an older version of those 2 libraries in the NuGet package. But I don't know about the specifics. @adityapatwardhan made the changes and would have more insights.
Thank you @daxian-dbw . Unfortunately, mi.dll and miutils.dll aren't present on Windows Nano Server containers, that is where is see the System.TypeInitializationException when using Microsoft.Management.Infrastructure version 3.0.0 (and it worked with 3.0.0-preview.3 where the mi.dll and miutils.dll were present). Do you know about a good way how to deliver mi.dll and miutils.dll into Windows nano cotnainers? Thanks
Prerequisites
Steps to reproduce
I build my app with .NET 8, runtime win-x64 and Microsoft.Management.Infrastructure version 3.0.0 and let it run.
I am able to get my .NET 8 app running when built with Microsoft.Management.Infrastructure version 3.0.0-preview.3, the issue is also happening with 3.0.0-preview.4.
Expected behavior
Actual behavior
Error details
No response
Environment data
Version
3.0.0
Visuals
No response