Results 1 to 4 of 4

Thread: Single instance - duplicated

  1. #1
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2010
    Posts
    51
    Reputation
    99

    Single instance - duplicated

    I wrote app1 that had 'make single instance application' checked in the app properties. All good there.
    I then needed app2, which is an admin version of app1, and the code wasn't going to be substantially different to app1 so i took a copy of it and did the renaming things (the folder, subfolder, in the .sln file etc.) and made my changes. All good there too. However i can't run both at the same time because of the single instance thing. I though that renaming the second app would let me run it as its essentially a different app.
    So, my question is, what do i need to change in order for the system to see it as two different apps?
    In the .sln file i see:
    Project("{ long hex number }") = ...
    Is it something to do with this number? (same in both apps)
    Last edited by DavyEFC; 09-20-2018 at 10:52 AM. Reason: Resolved

  2. #2
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    15,214
    Reputation
    2860
    Open Application tab of project properties, click the 'Assembly information' button. It would appear that the GUID here is the instance ID that is used.
    You can change it manually or generate one with Guid.NewGuid Method (System) | Microsoft Docs. There should also be a "Create Guid" in VS Tools menu that can be used.
    [xcode=vb] code here [/xcode] - see bbcode list or use formatting buttons in posting editor.

    Visual Studio Community 2017

  3. #3
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2010
    Posts
    51
    Reputation
    99
    Quote Originally Posted by JohnH View Post
    You can change it manually...
    I did that and it works fine now. Thanks very much for the info

    Quote Originally Posted by JohnH View Post
    ...There should also be a "Create Guid" in VS Tools menu that can be used.
    Unfortunately not, maybe because i'm using Community 2017 version?

  4. #4
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    15,214
    Reputation
    2860
    I'm using that VS too, perhaps a configuration/installation thing?
    [xcode=vb] code here [/xcode] - see bbcode list or use formatting buttons in posting editor.

    Visual Studio Community 2017

Similar Threads

  1. Single instance wpf application
    By Tmann in forum Windows Presentation Foundation (WPF)
    Replies: 2
    Last Post: 01-30-2012, 10:41 AM
  2. Question single-instance, secondary instance
    By Michael Allison in forum Remoting
    Replies: 2
    Last Post: 08-08-2008, 11:52 PM
  3. Single Instance of a class/DLL
    By AndyDale in forum VB.NET General Discussion
    Replies: 11
    Last Post: 12-07-2007, 7:10 AM
  4. MDI Form with Single Child Instance??
    By Armjamil in forum Windows Forms
    Replies: 1
    Last Post: 11-08-2005, 8:50 PM
  5. Single Instance of Application
    By neeraja in forum Security
    Replies: 2
    Last Post: 07-21-2005, 1:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •