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

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

Open
luronumen opened this issue May 13, 2024 · 3 comments · May be fixed by #11258
Open

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

luronumen opened this issue May 13, 2024 · 3 comments · May be fixed by #11258
Assignees
Labels
area-VisualBasic tenet-compatibility Incompatibility with previous versions or with WinForms for .NET Framework

Comments

@luronumen
Copy link

.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

@luronumen luronumen added the untriaged The team needs to look at this issue in the next triage label May 13, 2024
@elachlan
Copy link
Contributor

Related: #11232

@elachlan
Copy link
Contributor

@merriemcgaw Do we want Single Instance VB apps to work similarly to framework here? I imagine we can just hash the file path to the app as a GUID.

elachlan added a commit to elachlan/winforms that referenced this issue May 13, 2024
@elachlan elachlan linked a pull request May 13, 2024 that will close this issue
@elachlan elachlan added tenet-compatibility Incompatibility with previous versions or with WinForms for .NET Framework area-VisualBasic labels May 14, 2024
@merriemcgaw
Copy link
Member

Let me run this by @KlausLoeffelmann, but I think it's quite reasonable and might even be a blocker for some migrations.

@merriemcgaw merriemcgaw removed the untriaged The team needs to look at this issue in the next triage label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VisualBasic tenet-compatibility Incompatibility with previous versions or with WinForms for .NET Framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants