Results 1 to 10 of 10

Thread: Project Loading/Unloading

  1. #1

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Project Loading/Unloading

    I don't have enough data on this, but what I have is freaky enough that I've started into studying it, and figured I'd ask on here in case somebody has an explanation.

    I have a project in VS2022. If I start VS, then load the project by finding it in the recent project list, or by using Open Project, then all is well. If I right click on VS in the task bar and launch the project that way, the project opens, all the recent code pages open up, then the whole project spontaneously unloads and I'm back to an empty VS, ready to load a project.

    The first few times that happened, I just figured I might have done something weird, but it's become so consistent that I've started into seeking the patterns for it. Thus I started repeating steps to see what was repeatable. What I have so far is this.

    Given project A, B, and T (for target), where A, B, and T are not related to one another, aside from all being projects in VS2022 on the same computer:

    Opening T alone is fine.
    Opening A alone is fine.
    Opening B alone causes B to reload.
    If A is open, opening B is fine.
    If A is open, opening T causes T to unload.
    If A is open, and B is open, opening T is fine.

    All of these have been repeated multiple times (yes, I sat here and opened and closed projects repeatedly to make this list), but on the last attempt, with A open, T did manage to remain open, so that is the first violation of the pattern.

    Also, while the code pages come up, the unloading happens when the Solution Explorer or Git tabs are populating.

    Does anybody know what is going on here?
    My usual boring signature: Nothing

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,398

    Re: Project Loading/Unloading

    This is new to me, but I wonder if this is a situation where it works fine if you open the solution (.sln file) but causes this wonky behavior if you open the project (.csproj or .vbproj file).
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Project Loading/Unloading

    I could not replicate the behavior. I am using Azure Devops for source control, not Git.

    Microsoft Visual Studio Professional 2022
    Version 17.10.6
    VisualStudio.17.Release/17.10.6+35201.131
    Microsoft .NET Framework
    Version 4.8.09032
    Last edited by dbasnett; Sep 30th, 2024 at 01:06 PM.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  4. #4

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Project Loading/Unloading

    Isn't it still a Git repo? I'm using Azure DevOps, as well, and I can't replicate it on just any project.

    Also, as far as I know, I am always opening the .sln. That's the extension shown, anyways. I'm not going to some file system and clicking on a file, though.
    My usual boring signature: Nothing

  5. #5
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Project Loading/Unloading

    Quote Originally Posted by Shaggy Hiker View Post
    Isn't it still a Git repo? I'm using Azure DevOps, as well, and I can't replicate it on just any project.

    Also, as far as I know, I am always opening the .sln. That's the extension shown, anyways. I'm not going to some file system and clicking on a file, though.
    I'm using TFS. And what I see when opening is a .sln file.


    What I see

    Name:  Screenshot 2024-09-30 145211.jpg
Views: 685
Size:  14.3 KB
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  6. #6
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Project Loading/Unloading

    Does this happen from the taskbar jump-list?

  7. #7

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Project Loading/Unloading

    Yes. What an interesting question. I hadn't tested that out, but now I have. This issue only happens if I open the solution from the task bar jump list. If I open VS and load a project from there, then it does not happen. I also notice that the load sequence appears different if I load from the task bar versus loading from VS.

    Still, why did you ask the question? You must have had some suspicion as to what is going on.
    My usual boring signature: Nothing

  8. #8
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Project Loading/Unloading

    I had an issue several years ago where starting from the jump list, Visual Studio sometimes would fail to find projects. Ended up removing those projects from the jump list which seem to resolve the issue.

  9. #9
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Project Loading/Unloading

    Quote Originally Posted by Shaggy Hiker View Post
    Yes. What an interesting question. I hadn't tested that out, but now I have. This issue only happens if I open the solution from the task bar jump list. If I open VS and load a project from there, then it does not happen. I also notice that the load sequence appears different if I load from the task bar versus loading from VS.

    Still, why did you ask the question? You must have had some suspicion as to what is going on.
    A number of years ago we had someone that had issues with something similar... there was a difference opening sln files in VS vs from explorer ... eventually we discovered it had to do with VS discovering what the CWD is at the time... when opening in VS, it could set the CWD to the location where the sln file is but when opening from Explorer, the CWD was what ever it was, and so it had issues then finding the projects - which are then relative to the sln file. It wouldn't surprise me to find something similar to that going on here.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  10. #10

    Thread Starter
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Project Loading/Unloading

    I figured I'd revive this thread, as something new happened.

    I've still been running into the issue described. Fortunately, it's kind of rare since it requires opening two different projects at the same time at work. I open multiple projects at the same time at home quite often, but rarely at work, so the issue is rare.

    And today, I spent some time hunting down a data problem using a test project, then opened the production project, moved the relevant code over...and the production project asked me if I wanted to save the changes I had just made, which I did, and then it unloaded.

    All this time I was thinking that it would unload as a part of startup, but that's not the case. It fully loads, then unloads itself, but is aware if changes have been made in the few seconds that it was loaded. I don't believe this would be the case if it was the loading process itself that was failing. In that case, it wouldn't think it was loaded and wouldn't notice that the files displayed had changed. Instead, it is fully operational, it just unloads itself. It unloads itself properly, though, asking to save any changes if appropriate.

    Does that suggest anything?
    My usual boring signature: Nothing

Posting Permissions

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



Click Here to Expand Forum to Full Width