https://bugs.winehq.org/show_bug.cgi?id=45129
Bug ID: 45129 Summary: Some applications/installers fail trying to run Windows PowerShell cmdlets or .NET apps that reference 'System.Management.Automation' v1.0.0.0 assembly Product: Wine Version: 3.7 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
just for documentation purpose and to collect potential dupes in future.
Example from bug 45033
.NET helper executable extracted from custom action which makes use of 'PowerShell' class.
--- snip --- $ wine ./customactions.exe ChangeAppStartingCursor ... 01ae:fixme:wer:WerRegisterRuntimeExceptionModule (L"C:\windows\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll", 0x630000) stub! ... 01ae:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub 01ae:fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000402,(nil),0x0001,0x00000000,0x32d0f0,(nil)): stub 01ae:err:eventlog:ReportEventW L"Application: customactions.exe\nFramework Version: v4.0.30319\nDescription: The process was terminated due to an unhandled exception.\nException Info: System.IO.FileNotFoundException\nStack:\n at customactions.Program.ChangeAppStartingCursor()\n at customactions.Program.Main(System.String[])\n" ... Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. File not found. at customactions.Program.ChangeAppStartingCursor() at customactions.Program.Main(String[] args) wine: Unhandled exception 0xe0434352 in thread 1ae at address 0x3620023:0x7b446ec7 (thread 01ae), starting debugger... --- snip ---
That assembly is part of Windows PowerShell:
https://docs.microsoft.com/en-us/dotnet/api/system.management.automation?vie...
which provides 'PowerShell' class implementation for .NET apps.
https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.pow...
--- quote --- PowerShell Class Definition
Namespace: System.Management.Automation
Assembly: System.Management.Automation.dll
Represents a PowerShell command or script to execute against a Runspace(Pool) if provided, otherwise execute using a default Runspace. Provides access to different result buffers like output, error, debug, verbose, progress, warning, and information.
Provides a simple interface to execute a powershell command: --- quote ---
https://4sysops.com/wiki/differences-between-powershell-versions/
--- quote --- PowerShell 2.0 is integrated in all Windows versions since Windows 7 and Windows Server 2008 R2. If you want to ensure that a PowerShell script also works properly on a system with PowerShell 2.0, you can switch to a PowerShell 2.0 prompt on every Windows version after Windows 7 with PowerShell.exe -Version 2. However, this will only work if you installed .NET Framework 2.0 / 3.5. --- quote ---
$ wine --version wine-3.7-65-ge637a6f0bf
Regards
https://bugs.winehq.org/show_bug.cgi?id=45129
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet Status|NEW |RESOLVED Resolution|--- |INVALID
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
it might be part of Wine-Mono at some point but that wouldn't help in the many use-cases requiring native MS .NET Frameworks.
https://github.com/PowerShell/PowerShell/issues/2613
There might be a way with .NET Core + PowerShell Core for "native" host OS but there would be still a lot of interoperability issues.
Install the missing prerequisites on your own. Resolving as 'invalid' here.
Regards
https://bugs.winehq.org/show_bug.cgi?id=45129
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de Status|RESOLVED |CLOSED
--- Comment #2 from André H. nerv@dawncrow.de --- closing invalid