Jump to content


"Package did not load correctly" errors on startup

p4vs visual studio 2017 p4vsprovider scc display information package

  • Please log in to reply
4 replies to this topic

#1 m_parker

m_parker

    Newbie

  • Members
  • Pip
  • 5 posts
  • LocationChicago, IL

Posted 19 July 2018 - 09:01 PM

All of our solutions are marked as controlled by P4VS.  When I open one in VS 2017, a large percentage of the time, I get 2 dialogs that say "The 'X' package did not load correctly." where in the first X is 'P4VsProvider' and in the second is 'Scc Display Information'.  After this, P4VS is completely inoperable until I restart Visual Studio.  If I double-click a solution in P4V, I am at the point now where I expect this to happen and I will have to open it twice.  This is incredibly frustrating.

I have tried re-installing P4VS, repairing Visual Studio, and fully uninstalling and reinstalling Visual Studio.  P4VS is version 2018.2.166.5359 and VS is Professional version 15.5.7.

Attached Thumbnails

  • p4vsprovider.png
  • scc display information.png


#2 p4bill

p4bill

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts

Posted 19 July 2018 - 09:10 PM

Sorry that you are running into this and thanks for the feedback. We have not seen that here, but something is certainly not right. 2018.2.166.5359 had changes to load the package asynchronously (Microsoft is going to disable synchronous auto load of packages in a future VS 2018 update). So, it could be something related to that change.

If you are seeing it every time, we should be able to get a repro with your help and additional details. Are you opening Visual Studio with a solution, or are you opening the solution after opening Visual Studio? What are your connection settings in options? Could you please email support@perforce.com and cc bbaffy at same?

#3 m_parker

m_parker

    Newbie

  • Members
  • Pip
  • 5 posts
  • LocationChicago, IL

Posted 19 July 2018 - 09:23 PM

My two most common workflows are opening solutions directly from the Depot Tree in P4V by double-clicking them, or opening them from the VS taskbar jump list.  For each solution (we have dozens), it seems to be a guaranteed hit if I open it from the depot tree for the "first time".  The second time, it works fine, and it seems to be always fine from the taskbar.  I don't know if there's some time limit on whether "first time" happens again, but I can basically go down the list of solutions and get it with each one right now.  I tried using Open Solution/Project in Perforce Depot... from inside VS and did not see the issue on a solution I had not opened before.

I'll send an email linking this thread and my options. :)

#4 skhansen

skhansen

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 23 July 2018 - 06:34 AM

The described error is easy to reproduce. It occurs everytime you open a C# solution in VS 2017 by double clicking on the solution file for the first time, when you have just syncronized from a repository.
At this point in time Visual Studio has not yet created its .suo file for the solution in the hidden .vs folder in the solution root folder. If you go into the xml log file, also shown in the attached screenshot, you will see the following error message including a stack trace. An example of this looks like the following:

<entry>
    <record>709</record>
    <time>2018/07/20 12:10:45.163</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [P4VsProvider]Source: &apos;mscorlib&apos; Description: Could not find file &apos;C:\Projects\DummyBranch\Src\Modules\DummySolution\.vs\DummySolution\v15\.suo&apos;.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not find file &apos;C:\Projects\DummyBranch\Src\Modules\DummySolution\.vs\DummySolution\v15\.suo&apos;.&#x000D;&#x000A;File name: &apos;C:\Projects\DummyBranch\Src\Modules\DummySolution\.vs\DummySolution\v15\.suo&apos;&#x000D;&#x000A;   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)&#x000D;&#x000A;   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)&#x000D;&#x000A;   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)&#x000D;&#x000A;   at Perforce.P4VS.BackwardsCompatibleAsyncPackage.MainThreadInitialization(IVsUIShell shellService, Boolean isAsyncPath)&#x000D;&#x000A;   at Perforce.P4VS.BackwardsCompatibleAsyncPackage.&lt;&gt;c__DisplayClass2_0.&lt;&lt;Initialize&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.GetResult()</description>
    <guid>{8D316614-311A-48F4-85F7-DF7020F62357}</guid>
    <hr>80070002</hr>
    <errorinfo></errorinfo>
  </entry>


The problem is gone next time you open the solution because the .suo file has now been created by Visual Studio. It has been like this since the asynchronous loading of the p4vs plugin was introduced in the latest p4vs patch release. It seems like some sort of race condition which only happens when Visual Studio is about to load while also creating the. suo file and also loading p4vs. The problem does not occur if opening a fresh solution in an already running instance of Visual Studio.

#5 p4bill

p4bill

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts

Posted 23 July 2018 - 02:42 PM

Thanks for the details, skhansen and m_parker. We have reproduced the issue here and a fix will be in the next release.





Also tagged with one or more of these keywords: p4vs, visual studio, 2017, p4vsprovider, scc display information, package

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users