args.Console output client process:
*** Named pipe client stream with impersonation example ***
Spawning client processes...
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Unhandled Exception:Unhandled Exception: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Installing System.Runtime v.4.3.1.0 and adding this app.config to my client project also didn't help:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@JeremyKuhne, @carlossanlop Can you advise how to run this example?
The code needs updated. Environment.CommandLine returns the name of the dll on .NET Core. This can be done by adding the following line in the client after getting the command line:
C#
currentProcessName = Path.ChangeExtension(currentProcessName, ".exe");
https://github.com/dotnet/coreclr/issues/20562 and https://github.com/dotnet/corefx/issues/29014 discuss this behavior.
cc: @jkotas
@Legends Thanks for closing the issue, but I'm going to reopen it to put it on our backlog as a reminder to update the doc.
Hi @tdykstra
I think the code needs to be changed here.
Can I proceed with making the changes?
@SumanjaliDamarla Yes, please do, thanks!
Most helpful comment
@Legends Thanks for closing the issue, but I'm going to reopen it to put it on our backlog as a reminder to update the doc.