locked
Unexpected error encountered.

    คำถาม

  • I started getting

     

    "Unexpected error encountered. It is recommended that you restart the application as soon as possible.

     

    Error: Access is denied.

    File:vsee\pkgs\vssproviderstub\cvssproviderstubpackage.cpp

    Line number: 545"

     

    when I try to add a project to source control.a couple of weeks ago.

    When I try to open a project under source control, I get a message telling me This version of Visual Studio.NET does not support source controlled projects.

     

    The OS is Vista and I'm using the Internet plug-in for vss in Visual Studio 2005 Professional. This is a new machine and Source control worked for several weeks after I installed it on this computer.

     

    Thanks for your help.

     

    7 มีนาคม 2551 17:31

คำตอบ

  •  Remove vssprovider.dll from the list of packages to skip by running:

    devenv.exe /resetskippkgs

    After running the above command you will be able to open Visual Studio normally without using the /resetskippkgs switch.

    Note: You can add /log to generate a report

    e.g.  devenv.exe /resetskippkgs  /log C:\devenv-log.txt
    • เสนอเป็นคำตอบโดย R. Mencia 10 สิงหาคม 2552 4:59
    • ทำเครื่องหมายเป็นคำตอบโดย Dmitry PavlovMVP, Moderator 25 สิงหาคม 2554 12:45
    • ยกเลิกการทำเครื่องหมายเป็นคำตอบโดย Dmitry PavlovMVP, Moderator 25 สิงหาคม 2554 12:49
    • ทำเครื่องหมายเป็นคำตอบโดย Dmitry PavlovMVP, Moderator 25 สิงหาคม 2554 12:49
    16 มิถุนายน 2551 6:55
  • Hi Mike,

     

    Unfortunately none of these point to the culprit.

    The Shlwapi and IEFrame dlls don't cause the problem.

    The CTF-registry entries are related to the Vista or Office Language Bar (keyboard, pen, voice recognition settings)

    The SQM-files are related to the Customer Experience Program (enabled via Help menu), and those files are used only if you participate in the program.

    It's weird there is no other failure logged.

     

    I'm out of ideas what could be wrong.

    I'd suggest calling product support and working with a support engineer, maybe they have better ideas on how to figure out what's failing with access denied.

     

    Alin

    9 มีนาคม 2551 22:23
    ผู้ดูแล
  • I had this problem as well. I have enabled all skipped packages as recommends K.Renno and then in C:\devenv-log.txt I found some errorinfor blocks like this:  

    </errorinfo>
      </entry>
      <entry>
        <record>237</record>
        <time>2011/08/25 12:39:38.457</time>
        <type>Error</type>
        <source>VisualStudio</source>
        <description>End package load [Microsoft.VisualStudio.TeamFoundation.VersionControl.HatPackage, Microsoft.VisualStudio.TeamFoundation.VersionControl, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]</description>
        <guid>{4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}</guid>
        <hr>80131600</hr>
        <errorinfo>The cache file C:\Documents and Settings\<YOU_USER_HERE>\Local Settings\Application Data\Microsoft\Team Foundation\3.0\Cache\VersionControl.config is not valid and cannot be loaded.
    Please correct or delete the file.
    </errorinfo>

     

    Once I deleted VersionControl.config file and restarted the Visual Studio the problem disappears.


    Don't forget to vote for useful replies and/or mark answers for your questions - that helps other guys to find the answer faster.
    • ทำเครื่องหมายเป็นคำตอบโดย Dmitry PavlovMVP, Moderator 25 สิงหาคม 2554 12:49
    25 สิงหาคม 2554 12:49
    ผู้ดูแล

ตอบทั้งหมด

  • An error in line 545 of cvssproviderstubpackage.cpp in VS2005 means a failure to load the main source control package (VssProvider.dll). This may be caused by incorrect registry entry for the scc package, missing dll from disk, insufficient access rights, etc.

     

    My suggestion is to reinstall/repair your VisualStudio installation.

    (you may also try "regsvr32 "c:\Program Files\Microsoft Visual Studio 8\Common7\IDE\VS SCC\VssProvider.dll", but if the registry entry is corrupted or files are missing it might be better to just repair your VS install)

     

    Alin

    9 มีนาคม 2551 2:38
    ผู้ดูแล
  • Thanks for the insight and suggestion, but the reinstall/repair (run as administrator) did nothing to fix the problem. I suspect the UAC is interfering.

     

    Mike

     

    9 มีนาคม 2551 14:06
  • Ah, now I see the "Error: Access denied" message. I thought it was an Unspecified Error.

     

    I don't know whether it's UAC's interference, I run VS2005 on Vista without problems - try running VS as Administrator (if I remmeber correctly this was recommended anyway for VS2005) and see if it changes anything.

     

    Maybe one of the dependency dlls is placed in a folder where you don't have access?

    Try running "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin\Depends.Exe" and open "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\VS SCC\VssProvider.dll". See if any of the dependencies cannot be resolved.

    One other thing you can try is to run Process Monitor (http://www.microsoft.com/technet/sysinternals/FileAndDisk/processmonitor.mspx), start VisualStudio and open your project, set in ProcMon a filter for devenv.exe, start capturing events, back in VS try adding the solution to source control (you'll get the error), back in ProcMon stop capturing events and look in the captured log for access denied either for files or registry. Knowing what's failing to be accessed might suggest a way to fix the problem...

     

    Alin

     

     

    9 มีนาคม 2551 20:50
    ผู้ดูแล
  • Alin,

     

    Thanks for your help.

     

    Dependency Walker shows the following

    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

     

    SHLWAPI.DLL & IEFRAME.DLL Seem to be the ones having problems.

     

    ProcMan shows the following events.

     

    256706 5:09:38.5922931 PM devenv.exe 5700 RegOpenKey HKLM\SOFTWARE\Microsoft\CTF\KnownClasses NAME NOT FOUND Desired Access: Read
    256707 5:09:38.5947653 PM devenv.exe 5700 RegOpenKey HKLM\SOFTWARE\Microsoft\CTF\KnownClasses NAME NOT FOUND Desired Access: Read

    ...

    256715 5:09:38.6050567 PM devenv.exe 5700 QueryDirectory C:\Users\Mike\AppData\Roaming\Microsoft\VSCommon\8.0\SQM\sqmdata*.sqm NO SUCH FILE Filter: sqmdata*.sqm
    256716 5:09:38.6050771 PM devenv.exe 5700 CloseFile C:\Users\Mike\AppData\Roaming\Microsoft\VSCommon\8.0\SQM SUCCESS 
    256718 5:09:38.6052834 PM devenv.exe 5700 CreateFile C:\Users\Mike\AppData\Roaming\Microsoft\VSCommon\8.0\SQM SUCCESS Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    256719 5:09:38.6053137 PM devenv.exe 5700 QueryDirectory C:\Users\Mike\AppData\Roaming\Microsoft\VSCommon\8.0\SQM\sqmdata*.CVR NO SUCH FILE Filter: sqmdata*.CVR

    Mike



    9 มีนาคม 2551 21:16
  • Alin,

     

    I forgot to mention that I am running VS as admin.

     

    Thanks,

    Mike

    9 มีนาคม 2551 21:45
  • Hi Mike,

     

    Unfortunately none of these point to the culprit.

    The Shlwapi and IEFrame dlls don't cause the problem.

    The CTF-registry entries are related to the Vista or Office Language Bar (keyboard, pen, voice recognition settings)

    The SQM-files are related to the Customer Experience Program (enabled via Help menu), and those files are used only if you participate in the program.

    It's weird there is no other failure logged.

     

    I'm out of ideas what could be wrong.

    I'd suggest calling product support and working with a support engineer, maybe they have better ideas on how to figure out what's failing with access denied.

     

    Alin

    9 มีนาคม 2551 22:23
    ผู้ดูแล
  • >  I forgot to mention that I am running VS as admin.

     

    I hope by this you mean you are logged in with an user in Administrators group and you run VS elevated (right click VS shortcut and choose "Run as Administrator").

     

    Anyway, I had one more idea: are you running by any chance an antivirus with real-time monitoring or other similar disk-monitoring software? I wonder whether it starts scanning the files on disk and denies VS access while doing it. If you have such software, try disable it and see if it makes any difference.

     

    Alin

    9 มีนาคม 2551 22:28
    ผู้ดูแล
  •  Remove vssprovider.dll from the list of packages to skip by running:

    devenv.exe /resetskippkgs

    After running the above command you will be able to open Visual Studio normally without using the /resetskippkgs switch.

    Note: You can add /log to generate a report

    e.g.  devenv.exe /resetskippkgs  /log C:\devenv-log.txt
    • เสนอเป็นคำตอบโดย R. Mencia 10 สิงหาคม 2552 4:59
    • ทำเครื่องหมายเป็นคำตอบโดย Dmitry PavlovMVP, Moderator 25 สิงหาคม 2554 12:45
    • ยกเลิกการทำเครื่องหมายเป็นคำตอบโดย Dmitry PavlovMVP, Moderator 25 สิงหาคม 2554 12:49
    • ทำเครื่องหมายเป็นคำตอบโดย Dmitry PavlovMVP, Moderator 25 สิงหาคม 2554 12:49
    16 มิถุนายน 2551 6:55
  • This has saved my life. I only had left to reinstall Windows 7.

    This worked for me!

    Thanks, K.
    10 สิงหาคม 2552 5:01
  • The solution given by K. Renno worked for me. Life saver.

    I'm using Visual Studio 2005 with VSourceSafe 2005.

    6 เมษายน 2553 11:39
  • I got the same Error.

    I have installed

    1. VS2008 Team Suite
    2. VS90sp1
    3. Team Explorer

    But When I open the Solution,I got this error.

    any one who can help me ?

     


    Frank Xu Lei--谦卑若愚,好学若饥
    专注于.NET平台下分布式应用系统开发和企业应用系统集成
    Focus on Distributed Applications Development and EAI based on .NET
     

    老徐的网站】:http://www.frankxulei.com/

    老徐的博客】:http://www.cnblogs.com/frank_xl/

    【WCF中文技术论坛】:微软WCF中文技术论坛
    【WCF英文技术论坛】:微软WCF英文技术论坛

    30 มิถุนายน 2553 10:18
  • I had this problem as well. I have enabled all skipped packages as recommends K.Renno and then in C:\devenv-log.txt I found some errorinfor blocks like this:  

    </errorinfo>
      </entry>
      <entry>
        <record>237</record>
        <time>2011/08/25 12:39:38.457</time>
        <type>Error</type>
        <source>VisualStudio</source>
        <description>End package load [Microsoft.VisualStudio.TeamFoundation.VersionControl.HatPackage, Microsoft.VisualStudio.TeamFoundation.VersionControl, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]</description>
        <guid>{4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}</guid>
        <hr>80131600</hr>
        <errorinfo>The cache file C:\Documents and Settings\<YOU_USER_HERE>\Local Settings\Application Data\Microsoft\Team Foundation\3.0\Cache\VersionControl.config is not valid and cannot be loaded.
    Please correct or delete the file.
    </errorinfo>

     

    Once I deleted VersionControl.config file and restarted the Visual Studio the problem disappears.


    Don't forget to vote for useful replies and/or mark answers for your questions - that helps other guys to find the answer faster.
    • ทำเครื่องหมายเป็นคำตอบโดย Dmitry PavlovMVP, Moderator 25 สิงหาคม 2554 12:49
    25 สิงหาคม 2554 12:49
    ผู้ดูแล