Hello Support and Forum,
So we have a Powershell script compiled into a windows service using Powershell Studio 2020. The new service installs fine on all platforms, but we have one Windows 2012 R2 server that throws this exception when trying to start the service:
Service cannot be started. System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.
at ..(String )
at ..( , String[] , IntPtr& )
at ..(String[] )
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
We tried a couple other Powershell studio created services and they do the same thing, so we're pretty sure it's not the script inside the service itself.
Powershell 5.1 is on this server and all patches. We are thinking that this server is missing something that is default, but not sure what this error even means.
All other 2012 R2 servers are working fine.
All insight is appreciated
Posh Service fails instantly
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Re: Posh Service fails instantly
In 2020, all packaging engines were updated to use .NET Framework 4.8.
Please try installing .NET Framework 4.8 runtime on that machine:
https://dotnet.microsoft.com/download/d ... work/net48
Please try installing .NET Framework 4.8 runtime on that machine:
https://dotnet.microsoft.com/download/d ... work/net48
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.