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
Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Management.Automation.Runspaces.RunspaceFactory' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'api-ms-win-eventing-provider-l1-1-0.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at System.Management.Automation.Tracing.EtwActivity.UnsafeNativeMethods.EventActivityIdControl(ActivityControlCode controlCode, Guid& activityId)
at System.Management.Automation.Tracing.EtwActivity.GetActivityId()
at System.Management.Automation.Runspaces.RunspaceFactory..cctor()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace()
Ups, sorry I run dotnet run without --configuration Linux and that's why it happened
The real exception is
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at System.Management.Automation.ClrFacade.Load(AssemblyName assembly)
at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadMshSnapinAssembly(PSSnapInInfo mshsnapinInfo)
at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadPSSnapIn(PSSnapInInfo mshsnapinInfo)
at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadPSSnapIns(Collection`1 mshsnapinInfos, PSConsoleLoadException& warning)
at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadConsole(PSConsoleLoadException& warning)
at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.CreateDefaultConfiguration()
at System.Management.Automation.Runspaces.RunspaceConfiguration.Create()
at System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace(PSHost host)
at System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace()
at PSTests.RunspaceTests.DoTest()
at PSTests.RunspaceTests.Main(String[] args)
Activity
andyleejordan commentedon May 20, 2016
The last merge from Source Depot, #1001, caused the following xUnit test failures:
These are, of course, from our xUnit tests.
/cc James Truher (@JamesWTruher) sergei (@vors)
andyleejordan commentedon May 20, 2016
The xUnit test runner isn't being very friendly with respect to reporting failing tests. Filed dotnet/cli/issues/3173.
andyleejordan commentedon May 20, 2016
/cc John Kordich (@johnkord) Paul Allen (@paulcallen)
andyleejordan commentedon Jun 1, 2016
sergei (@vors)
Start-PSxUnitshould be usable now per #1065.vors commentedon Jun 10, 2016
Exception details
vors commentedon Jun 10, 2016
So essentially
NOETWdefine is not used, when compiled SMA for xUnit tests and it tries to load win-only libs.vors commentedon Jun 10, 2016
Ups, sorry I run
dotnet runwithout--configuration Linuxand that's why it happenedThe real exception is
vors commentedon Jun 10, 2016
ok, another red-hearing
I just didn't include
in my test app
vors commentedon Jun 10, 2016
ok, so we are trying to load snap-in
Microsoft.PowerShell.Diagnostics(which corresponds to dllMicrosoft.PowerShell.Commands.Diagnostics).We are failing badly (maybe same segfault as #1058 )
Issue for porting this dll is #1042
vors commentedon Jun 10, 2016
Started make changes in
vors/xunitbranch Basically A (@ealexjordan) already found the problem: removed#if !CORECLRguards in default snapins list.vors commentedon Jun 10, 2016
One test (TestRunspaceWithPowerShellAndInitialSessionState) still fails https://travis-ci.com/PowerShell/PowerShell/jobs/42210737
No segfault fortunately
Doesn't repro locally