Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# Project not working with Microsoft.PowerShell.SDK #10266

Closed
ghost opened this issue Jul 31, 2019 · 17 comments
Closed

C# Project not working with Microsoft.PowerShell.SDK #10266

ghost opened this issue Jul 31, 2019 · 17 comments
Labels
Area-Maintainers-Build specific to affecting the build Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-External The issue is caused by external component(s).

Comments

@ghost
Copy link

ghost commented Jul 31, 2019

Trying to use PowerShell with WindowsForms Application (See attached sample) under .Net Core 3.0 Preview 7. Have issue open with .Net Core Team: dotnet/core#3075 (comment)
The below sample was update to include Microsoft.PowerShell.SDK and the System.Management.Automation.

<ItemGroup>
   <PackageReference Include="Microsoft.Extensions.Logging" Version="3.0.0-preview7.19362.4" />
   <PackageReference Include="System.Management" Version="4.6.0-preview7.19362.9" />
   <PackageReference Include="System.Management.Automation" Version="7.0.0-preview.2" />
   <PackageReference Include="Microsoft.PowerShell.SDK" Version="6.1.1" />
   <PackageReference Include="Microsoft.PowerShell.Commands.Diagnostics" Version="6.1.1" />
   <PackageReference Include="Microsoft.WSMan.Management" Version="6.1.1"/>
 </ItemGroup>

WindowsFormsApp18.zip

VSSolutionDebugTest_2019731_080800_pid20116.log

Error does not show and internal exception though:

[2019-07-31 08:08:04Z] <Non-Published Non-SingleExe Debug Test> (E):
Failed to set PowerShell Enabled Execution Policy to Bypass
Exception Message: Cannot load PowerShell snap-in Microsoft.PowerShell.Diagnostics because of the following error: The PowerShell snap-in module D:\Workspaces\Training\WindowsFormsApp18\WindowsFormsApp18\bin\x64\Debug\netcoreapp3.0\win7-x64\Microsoft.PowerShell.Commands.Diagnostics.dll does not have the required PowerShell snap-in strong name Microsoft.PowerShell.Commands.Diagnostics, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL.
Exception StackTrace:    at System.Management.Automation.Runspaces.InitialSessionState.CreateDefault()
   at System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace(PSHost host)
   at System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace()
   at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
   at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.Invoke()
   at WindowsFormsApp18.Form1.EnableExecutionPolicy(String executionPolicy) in D:\Workspaces\Training\WindowsFormsApp18\WindowsFormsApp18\Form1.cs:line 227
   at WindowsFormsApp18.Form1..ctor() in D:\Workspaces\Training\WindowsFormsApp18\WindowsFormsApp18\Form1.cs:line 98
Internal Exception: 
@ghost ghost added the Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a label Jul 31, 2019
@iSazonov
Copy link
Collaborator

It is not clear why you reference 6.1.1 version in Microsoft.PowerShell.Commands.Diagnostics" Version="6.1.1" line.

@ghost
Copy link
Author

ghost commented Jul 31, 2019

@iSazonov
That is what the .Net Core Team pointed me to see next:
Net Core Team requested I:
Changing the RID in WindowsFormsApp18.csproj to win7-x64 gets around the problem with Microsoft.Management.Infrastructure during the build (Debug/Release), but hits a similar issue with Microsoft.PowerShell.Commands missing.
Adding a package reference to Microsoft.PowerShell.SDK fixes that issue (this is what the powershell hosting sample for .NET Core does: https://github.com/PowerShell/PowerShell/tree/master/docs/host-powershell). However I'm not familiar with their packages, so you may have more luck asking the PowerShell folks about the right way to do this on .NET Core.
Changing the RID in WinSetState.csproj and the publish profile to win7-x64 then fixes the publish issue you're seeing and allows publish to finish.
Please give that a try an see if it works for you. I would suggest trying to get this working without PublishSingleFile/PublishReadyToRun/PublishTrimmed first to simplify things. If you run into further issues with the powershell-related packages, I'd suggest filing an issue at: https://github.com/PowerShell/PowerShell

The PublishSingleFile/PublishReadyToRun/PublishTrimmed still do not work when published the singleExe does not launch but the non-published version gives this error now, before the Microsoft.PowerShell.SDK was loaded and only the System.Management.Automation was loaded and it was giving this error:

7/29/2019 7:26:08 PM
System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.Publish.Framework.Model.DefaultPublishSteps.<>c__DisplayClass26_0.<IsBuildCompletedSuccessfully>b__2()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Publish.Framework.Model.DefaultPublishSteps.<DefaultCorePublishStep>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__205.MoveNext()
---> (Inner Exception #0) System.Exception: Publishing failed.<---

System.Exception: Publishing failed.

And the publish option with only System.Management.Automation <PackageReference Include="System.Management.Automation" Version="7.0.0-preview.2" /> loaded.

3>"obj\x64\Release\netcoreapp3.0\win-x64\linked\System.Management.Automation.dll"
3>
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100006c - Microsoft.Management.Infrastructure.Serialization.CimMofDeserializer.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100006d - OnClassNeeded.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100006e - Microsoft.Management.Infrastructure.Serialization.MofDeserializerSchemaValidationOption.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100006f - Microsoft.Management.Infrastructure.CimInstance.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000070 - GetIncludedFileContent.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000071 - Microsoft.Management.Infrastructure.CimException.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000074 - Microsoft.Management.Infrastructure.CimClass.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000076 - Microsoft.Management.Infrastructure.CimSystemProperties.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000077 - Microsoft.Management.Infrastructure.CimProperty.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000078 - Microsoft.Management.Infrastructure.CimType.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100007a - Microsoft.Management.Infrastructure.Generic.CimKeyedCollection`1.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100007b - Microsoft.Management.Infrastructure.Generic.CimReadOnlyKeyedCollection`1.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100008c - Microsoft.Management.Infrastructure.CimQualifier.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100008d - Microsoft.Management.Infrastructure.CimPropertyDeclaration.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100008e - Microsoft.Management.Infrastructure.CimFlags.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x10000c2 - Microsoft.Management.Infrastructure.CimSession.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100016e - Microsoft.Management.Infrastructure.CimConverter.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x10001a0 - Microsoft.Management.Infrastructure.CimMethodDeclaration.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x10001a1 - Microsoft.Management.Infrastructure.CimMethodParameterDeclaration.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x10001a2 - Microsoft.Management.Infrastructure.Options.CimOperationOptions.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000236 - Microsoft.Management.Infrastructure.NativeErrorCode.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000237 - Microsoft.Management.Infrastructure.Options.CimCredential.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000238 - Microsoft.Management.Infrastructure.Options.PasswordAuthenticationMechanism.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000239 - Microsoft.Management.Infrastructure.Options.ImpersonatedAuthenticationMechanism.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x100023a - Microsoft.Management.Infrastructure.Options.CimSessionOptions.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000275 - Microsoft.Management.Infrastructure.Serialization.CimSerializer.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000276 - Microsoft.Management.Infrastructure.Serialization.ClassSerializationOptions.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1000278 - Microsoft.Management.Infrastructure.Serialization.CimDeserializer.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00001a - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00001b - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00001c - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00001f - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000020 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000021 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000024 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000035 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000036 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000037 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000039 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00003a - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00003e - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00003f - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000040 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b0000d7 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000244 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000245 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000246 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b0002ef - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b0002f0 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b0002f1 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b0002f2 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b0002f3 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b0002f4 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b0002f6 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b0002f7 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000489 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00048b - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00048d - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000632 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000634 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000635 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000637 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00063b - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00063c - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00063d - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b00063e - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x1b000640 - .
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000be - Microsoft.Management.Infrastructure.Serialization.CimMofDeserializer.Create.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000bf - Microsoft.Management.Infrastructure.Serialization.CimMofDeserializer.set_SchemaValidationOption.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000c0 - Microsoft.Management.Infrastructure.Serialization.CimMofDeserializer.DeserializeInstances.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000c9 - Microsoft.Management.Infrastructure.Serialization.CimMofDeserializer.DeserializeClasses.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000ce - Microsoft.Management.Infrastructure.CimClass.get_CimSuperClassName.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000cf - Microsoft.Management.Infrastructure.CimClass.get_CimSystemProperties.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000d0 - Microsoft.Management.Infrastructure.CimSystemProperties.get_ClassName.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000d3 - Microsoft.Management.Infrastructure.CimInstance.get_CimClass.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000d9 - Microsoft.Management.Infrastructure.CimInstance.get_CimInstanceProperties.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000dc - Microsoft.Management.Infrastructure.CimProperty.get_Value.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000dd - Microsoft.Management.Infrastructure.CimProperty.get_Name.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0000e2 - Microsoft.Management.Infrastructure.CimProperty.get_CimType.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00010a - OnClassNeeded..ctor.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00013a - Microsoft.Management.Infrastructure.CimClass.get_CimClassQualifiers.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00013c - Microsoft.Management.Infrastructure.CimQualifier.get_Value.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000143 - Microsoft.Management.Infrastructure.CimClass.get_CimSuperClass.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000144 - Microsoft.Management.Infrastructure.CimClass.get_CimClassProperties.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000147 - Microsoft.Management.Infrastructure.CimPropertyDeclaration.get_Flags.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000148 - Microsoft.Management.Infrastructure.CimPropertyDeclaration.get_Qualifiers.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000149 - Microsoft.Management.Infrastructure.CimPropertyDeclaration.get_Name.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00014a - Microsoft.Management.Infrastructure.CimPropertyDeclaration.get_ReferenceClassName.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00014b - Microsoft.Management.Infrastructure.CimPropertyDeclaration.get_CimType.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00014e - Microsoft.Management.Infrastructure.CimQualifier.get_Name.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00014f - Microsoft.Management.Infrastructure.CimQualifier.get_CimType.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0001b6 - Microsoft.Management.Infrastructure.CimQualifier.get_Flags.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0002a2 - Microsoft.Management.Infrastructure.CimSession.get_ComputerName.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00080f - Microsoft.Management.Infrastructure.CimConverter.GetDotNetType.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000810 - Microsoft.Management.Infrastructure.CimInstance.GetCimSessionComputerName.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000812 - Microsoft.Management.Infrastructure.CimInstance.get_CimSystemProperties.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000813 - Microsoft.Management.Infrastructure.CimSystemProperties.get_Namespace.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000816 - Microsoft.Management.Infrastructure.CimClass.Dispose.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000818 - Microsoft.Management.Infrastructure.CimProperty.get_Flags.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000819 - Microsoft.Management.Infrastructure.CimProperty.set_Value.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a16 - Microsoft.Management.Infrastructure.CimSession.Create.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a17 - Microsoft.Management.Infrastructure.CimSession.GetClass.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a18 - Microsoft.Management.Infrastructure.CimSession.QueryInstances.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a1b - Microsoft.Management.Infrastructure.CimClass.get_CimClassMethods.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a1e - Microsoft.Management.Infrastructure.CimMethodDeclaration.get_Name.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a1f - Microsoft.Management.Infrastructure.CimMethodDeclaration.get_Qualifiers.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a21 - Microsoft.Management.Infrastructure.CimMethodDeclaration.get_Parameters.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a24 - Microsoft.Management.Infrastructure.CimMethodParameterDeclaration.get_Qualifiers.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a25 - Microsoft.Management.Infrastructure.CimMethodParameterDeclaration.get_CimType.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a26 - Microsoft.Management.Infrastructure.CimMethodParameterDeclaration.get_Name.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a28 - Microsoft.Management.Infrastructure.Options.CimOperationOptions..ctor.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a29 - Microsoft.Management.Infrastructure.Options.CimOperationOptions.set_ClassNamesOnly.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a2a - Microsoft.Management.Infrastructure.CimSession.EnumerateClasses.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000a2c - Microsoft.Management.Infrastructure.CimSession.EnumerateInstances.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000fe3 - Microsoft.Management.Infrastructure.CimException.get_NativeErrorCode.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000fec - Microsoft.Management.Infrastructure.Options.CimOperationOptions.set_CancellationToken.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000fed - Microsoft.Management.Infrastructure.Options.CimOperationOptions.SetCustomOption.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000fee - Microsoft.Management.Infrastructure.Options.CimOperationOptions.set_ResourceUri.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000fef - Microsoft.Management.Infrastructure.CimSession.EnumerateInstances.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000ff4 - Microsoft.Management.Infrastructure.Options.CimCredential..ctor.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000ff5 - Microsoft.Management.Infrastructure.Options.CimCredential..ctor.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000ff6 - Microsoft.Management.Infrastructure.Options.CimSessionOptions..ctor.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000ff7 - Microsoft.Management.Infrastructure.Options.CimSessionOptions.AddDestinationCredentials.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa000ff8 - Microsoft.Management.Infrastructure.CimSession.Create.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa001004 - Microsoft.Management.Infrastructure.CimSession.EnumerateAssociatedInstances.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00102b - Microsoft.Management.Infrastructure.CimSession.TestConnection.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00155d - Microsoft.Management.Infrastructure.CimSystemProperties.get_ServerName.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa001561 - Microsoft.Management.Infrastructure.Serialization.CimSerializer.Serialize.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00157c - Microsoft.Management.Infrastructure.Serialization.CimSerializer.Create.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00157f - Microsoft.Management.Infrastructure.CimProperty.get_IsValueModified.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa001583 - Microsoft.Management.Infrastructure.CimInstance.SetCimSessionComputerName.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa001586 - Microsoft.Management.Infrastructure.CimProperty.set_IsValueModified.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa00158a - Microsoft.Management.Infrastructure.Serialization.CimDeserializer.DeserializeClass.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa001593 - Microsoft.Management.Infrastructure.CimInstance..ctor.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0xa0015b3 - Microsoft.Management.Infrastructure.Serialization.CimDeserializer.Create.
3>System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002).
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cda - Microsoft.PowerShell.DesiredStateConfiguration.CimDSCParser.ParseInstanceMof.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cdc - Microsoft.PowerShell.DesiredStateConfiguration.CimDSCParser.ParseSchemaMofFileBuffer.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cdd - Microsoft.PowerShell.DesiredStateConfiguration.CimDSCParser.ParseSchemaMof.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000ce6 - Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.get_ByFileClassCache.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cee - Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.MyClassCallback.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cef - Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.ImportClasses.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cf5 - Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.GetCachedClassesForModule.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cf8 - Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.GetCachedClassByFileName.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cf9 - Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.GetCachedClassByModuleName.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cfa - Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.ImportInstances.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000cfb - Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache.ImportInstances.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000d42 - <>c.<GetCachedClassByModuleName>b__45_1.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000eda - Microsoft.PowerShell.Commands.GetModuleCommand.get_CimSession.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6000f50 - Microsoft.PowerShell.Commands.ImportModuleCommand.get_CimSession.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6001ced - Microsoft.PowerShell.Cim.CimInstanceAdapter.GetInheritanceChain.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6002d92 - System.Management.Automation.LanguagePrimitives.ConvertStringToCimSession.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x60030f6 - System.Management.Automation.RemoteDiscoveryHelper.GetCimCredentials.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x60030f8 - System.Management.Automation.RemoteDiscoveryHelper.GetCimCredentials.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x60030f9 - System.Management.Automation.RemoteDiscoveryHelper.CreateCimSession.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6003f9f - System.Management.Automation.CimClassDeserializationCache`1.GetCimClassFromCache.
3>Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. (0x80070002) while resolving 0x6004006 - System.Management.Automation.InternalDeserializer.RehydrateCimClass.
3>C:\Users\danny.mcnaught\.nuget\packages\microsoft.netcore.app.runtime.win-x64\3.0.0-preview7-27912-14\tools\crossgen.exe /nologo
3>/MissingDependenciesOK

@ghost
Copy link
Author

ghost commented Jul 31, 2019

@iSazonov
I am loading nuget package Microsoft.PowerShell.SDK v7.0.0-preview2 now thanks for making me look after your question.

@ghost
Copy link
Author

ghost commented Jul 31, 2019

@iSazonov
That fixes Release/Debug Mode from Visual Studio 2019 but publish using either <RuntimeIdentifier>win7-x64</RuntimeIdentifier> or <RuntimeIdentifier>win10-x64</RuntimeIdentifier> in csproj and pub.xml files get this error during publish:
I will return to Net Core Team now for further input.

7/31/2019 9:46:06 AM
System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.Publish.Framework.Model.DefaultPublishSteps.<>c__DisplayClass26_0.<IsBuildCompletedSuccessfully>b__2()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Publish.Framework.Model.DefaultPublishSteps.<DefaultCorePublishStep>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__205.MoveNext()
---> (Inner Exception #0) System.Exception: Publishing failed.<---

System.Exception: Publishing failed.

===================

@iSazonov
Copy link
Collaborator

iSazonov commented Aug 1, 2019

@SteveL-MSFT After moving to .Net Core 3.0 we probably need to review and update SDK documentation. Should we have a tracking issue?

@ghost
Copy link
Author

ghost commented Aug 1, 2019

@SteveL-MSFT
I still have the question for Microsoft: different nuget packages install and each require/support a different <RuntimeIdentifier> how does that work? i.e. another MS nuget package likes win-64 but others MS nuget packages requires win7-64 or win10-64 and does not have win-64. Does that mean you cannot use the two packages together and if so, is there not a naming convention standard for the <RuntimeIdentifier> within Microsoft?

@SteveL-MSFT
Copy link
Member

cc @adityapatwardhan

With regards to RIDs there are generic RIDs like win and more specific RIDs like win-x64 and even more specific RIDs like win7-x64. Dotnet SDK is supposed to determine compatibility depending on what RID you specify.

@ghost
Copy link
Author

ghost commented Aug 1, 2019

@SteveL-MSFT @adityapatwardhan @iSazonov
I now tried the same project with the following settings then tried running the SingleExe and checked the Event Log: The Event Log returned Error, so it still looks like a PowerShell Issue or linker missing a PowerShell File.

WindowsFormsApp18.deps.zip

Note: The non-SingleExe file:

D:\Workspaces\Training\WindowsFormsApp18\WindowsFormsApp18\bin\x64\Release\netcoreapp3.0\win10-x64\WindowsFormsApp18.exe runs fine with out errors.

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Sdk="Microsoft.NET.Sdk.WindowsDesktop">
  <PropertyGroup Label="Globals">
    <OutputType>WinExe</OutputType>
    <RootNamespace>WindowsFormsApp18</RootNamespace>
    <AssemblyName>WindowsFormsApp18</AssemblyName>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <!--<PublishTrimmed>true</PublishTrimmed>-->
    <!--<PublishReadyToRun>true</PublishReadyToRun>
    <PublishReadyToRunShowWarnings>true</PublishReadyToRunShowWarnings>-->
    <PublishSingleFile>true</PublishSingleFile>
    <RuntimeIdentifier>win10-x64</RuntimeIdentifier>
    <UseWindowsForms>true</UseWindowsForms>
    <AssemblyVersion>1.0.22.7151</AssemblyVersion>
    <FileVersion>1.0.22.7151</FileVersion>
    <Platforms>x64</Platforms>
    <NeutralLanguage>en</NeutralLanguage>
    <Authors>Danny McNaught</Authors>
    <Company>Perspecta</Company>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <PlatformTarget>x64</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\x64\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <PlatformTarget>x64</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\x64\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
    <DocumentationFile></DocumentationFile>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.Logging" Version="3.0.0-preview7.19362.4" />
    <PackageReference Include="Microsoft.PowerShell.SDK" Version="7.0.0-preview.2" />
    <PackageReference Include="System.Management" Version="4.6.0-preview7.19362.9" />
    <PackageReference Include="System.Management.Automation" Version="7.0.0-preview.2" />
  </ItemGroup>
  <ItemGroup>
    <TrimmerRootAssembly Include="Microsoft.Management.Infrastructure" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\WinSetState\WinSetState.csproj" />
  </ItemGroup>
  <ItemGroup>
    <Compile Update="Properties\Resources.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Update="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>
</Project>

Windows Application Event Log Error:

Description: A .NET Core application failed.
Application: WindowsFormsApp18.exe
Path: D:\Workspaces\Training\WindowsFormsApp18\WindowsFormsApp18\bin\x64\Release\netcoreapp3.0\win10-x64\publish\WindowsFormsApp18.exe
Message: Error:
  An assembly specified in the application dependencies manifest (WindowsFormsApp18.deps.json) was not found:
    package: 'Microsoft.PowerShell.Native', version: '7.0.0-preview.1'
    path: 'runtimes/win-x64/native/pwrshplugin.pdb'

@ghost
Copy link
Author

ghost commented Aug 1, 2019

@SteveL-MSFT @adityapatwardhan @iSazonov
Added the Microsoft.PowerShell.Native nuget package to the project but still get the same Event Log Error:

  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.Logging" Version="3.0.0-preview7.19362.4" />
    <PackageReference Include="Microsoft.PowerShell.Native" Version="7.0.0-preview.1" />
    <PackageReference Include="Microsoft.PowerShell.SDK" Version="7.0.0-preview.2" />
    <PackageReference Include="System.Management" Version="4.6.0-preview7.19362.9" />
    <PackageReference Include="System.Management.Automation" Version="7.0.0-preview.2" />
  </ItemGroup>
Description: A .NET Core application failed.
Application: WindowsFormsApp18.exe
Path: D:\Workspaces\Training\WindowsFormsApp18\WindowsFormsApp18\bin\x64\Release\netcoreapp3.0\win10-x64\publish\WindowsFormsApp18.exe
Message: Error:
  An assembly specified in the application dependencies manifest (WindowsFormsApp18.deps.json) was not found:
    package: 'Microsoft.PowerShell.Native', version: '7.0.0-preview.1'
    path: 'runtimes/win-x64/native/pwrshplugin.pdb'

WindowsFormsApp18.deps.zip

@SteveL-MSFT SteveL-MSFT changed the title My bug report C# Project not working with Microsoft.PowerShell.SDK Aug 2, 2019
@ghost
Copy link
Author

ghost commented Aug 21, 2019

With Net Core 3 Preview 8 all works except PowerShell for SingleExe. Without References and methods for powerShell the SingleExe works fine. Add PowerShell SDK, and PowerShell and you get the Windows Application Error listed below.

Get error on running in Event Log.

WindowsFormsApp18.zip
Packages

Microsoft Visual Studio Enterprise 2019 Preview Info.txt

Description: A .NET Core application failed.
Application: WindowsFormsApp18.exe
Path: D:\Workspaces\Training\WindowsFormsApp18\WindowsFormsApp18\bin\x64\Release\netcoreapp3.0\win-x64\publish\WindowsFormsApp18.exe
Message: Error:
  An assembly specified in the application dependencies manifest (WindowsFormsApp18.deps.json) was not found:
    package: 'Microsoft.PowerShell.Native', version: '7.0.0-preview.1'
    path: 'runtimes/win-x64/native/pwrshplugin.pdb'

@jeffschwMSFT
Copy link

jeffschwMSFT commented Aug 21, 2019

@SFC-Sarge the challenge is that the Microsoft.PowerShell.Native package includes its pdb as part of its dependencies (which is highly unusual). By default we do not package pdbs in the single exe to help reduce the overall size. In this case, if you add '<IncludeSymbolsInSingleFile>true</IncludeSymbolsInSingleFile>' to your project file the project will launch.

@ghost
Copy link
Author

ghost commented Aug 21, 2019

Thanks Jeff, That works great.

@swaroop-sridhar
Copy link

Was the dependency on pwrshplugin.pdb auto generated by the SDK? If so, looks like a issue in the SDK?
CC: @dsplaisted

      "Microsoft.PowerShell.Native/7.0.0-preview.1": {
        "native": {
          "runtimes/win-x64/native/PowerShell.Core.Instrumentation.dll": {
            "fileVersion": "10.0.10011.16384"
          },
          "runtimes/win-x64/native/pwrshplugin.dll": {
            "fileVersion": "10.0.10011.16384"
          },
          "runtimes/win-x64/native/pwrshplugin.pdb": {
            "fileVersion": "0.0.0.0"
          }
        }
      }

@dsplaisted
Copy link

The SDK is writing the entry for the PDB to the deps file. But that's because NuGet is interpreting the PDB as a native dependency. I think the NuGet conventions don't specify anything about the file extension for native files (because they are different for different operating systems), so PDBs should not be included in these folders.

@nkolev92 What do you think?

@SteveL-MSFT
Copy link
Member

@adityapatwardhan we should get this fixed for next release: PowerShell/PowerShell-Native#26

@iSazonov iSazonov added Resolution-External The issue is caused by external component(s). Area-Maintainers-Build specific to affecting the build labels Aug 22, 2019
@nkolev92
Copy link

nkolev92 commented Aug 22, 2019

Yeah, the selections for native libraries from the runtimes folder are looking for "any" file, no extension checking.

For reference :)

https://github.com/NuGet/NuGet.Client/blob/eab7f0366f74f30b7ceb9b23f63f1f23adfc45f9/src/NuGet.Core/NuGet.Packaging/ContentModel/ManagedCodeConventions.cs#L472 and
https://github.com/NuGet/NuGet.Client/blob/eab7f0366f74f30b7ceb9b23f63f1f23adfc45f9/src/NuGet.Core/NuGet.Packaging/ContentModel/ManagedCodeConventions.cs#L23-L25

GitHub
Client Tools for NuGet - including Visual Studio extensions, command line tools, and msbuild support. (Open issues on https://github.com/nuget/home/issues) - NuGet/NuGet.Client
GitHub
Client Tools for NuGet - including Visual Studio extensions, command line tools, and msbuild support. (Open issues on https://github.com/nuget/home/issues) - NuGet/NuGet.Client

@ghost
Copy link

ghost commented Aug 23, 2019

This issue has been marked as external and has not had any activity for 1 day. It has been be closed for housekeeping purposes.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Maintainers-Build specific to affecting the build Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-External The issue is caused by external component(s).
Projects
None yet
Development

No branches or pull requests

6 participants