Skip to content

Single instance app doesn't work when same app is in different folders #11365

Open
@luronumen

Description

@luronumen

.NET version

.NET 8.0.204

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No response

Issue description

Single instance app doesn't work when same app is in different folders

Steps to reproduce

  1. Create a WinForm Application for .NET 8.0 (e.g.: WinFormsApp1)
  2. Implement the Single Instance Application using the Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase class;
  3. Build the Project and copy the bin\Debug\net8.0-windows folder for 2 diferent folders (e.g.: FolderA and FolderB);
  4. Launch the WinFormsApp1.exe from FolderA and keep it opened;
  5. Try to launch the WinFormsApp1.exe from FolderA again: Verify that it is detected that the WinFormsApp1.exe is already opened (PASS!);
  6. Now, Launch the WinFormsApp1.exe from FolderB: Verify that WinFormsApp1.exe is launched and 2 instances of the WinFormsApp1.exe are now opened. One from FolderA and other from FolderB (FAIL);

IMPORTANT NOTES

  • This issue is NOT reproducible when the same App is compiled to .NET Framework 4.8;

Here is the code exemple to reproduce this issue: WinFormsApp1.zip

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions