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

[Bug] Weird parsing error when start an executable with System.Diagnostic.Process #2668

Closed
EmyTheBlubery opened this issue Nov 21, 2024 · 2 comments

Comments

@EmyTheBlubery
Copy link

Hello, I have a really weird behaviour when start an executable located in AppDomain.CurrentDomain.BaseDirectory with System.Diagnostic.Process

Here a little snippet of my code:

var process = new Process
{
    StartInfo = new ProcessStartInfo(ExecutableInBaseDirectory, "rhkgndfkhgnfdkj")
};

process .Start();

It produces this exception:

// BeforeAnythingElse
System.FormatException: The input string 'rhkgndfkhgnfdkj' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int32.Parse(String s)
   at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args) in C:\Users\Myuser\Documents\Dev\Libs\MyLib\Benchmark\bin\release\net8.0\c48cf43b-d86c-4c81-be98-0f95d9f48d2e\c48cf43b-d86c-4c81-be98-0f95d9f48d2e.notcs:line 45

Anyone has an Idea as to why it's doing that.
Could my .exe by overridden by Benchmarkdotnet?

@timcassell
Copy link
Collaborator

Looks the same as #2664

@EmyTheBlubery
Copy link
Author

Yes absolutely thanks

@timcassell timcassell closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants