"Unexpected error" dealing with vss in vs2005

I get the following error when I try do do getLatestVersion or "Change source control" on a vss linked web app


Microsoft Visual Studio

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

Error: Unspecified error

File: vsee\pkgs\vssprovider\cmsscciabstractionlayer.cpp

Line number: 5906

OK

Any idea on how to correct this?

[431 byte] By [Crasch] at [2007-12-26]
# 1

Does this error consistently repro? I would suggest unbinding and rebinding the web app. We are curious about this error. Can you give us some detailed repro steps to repro the error so that we can investigate a fix for this error? Please supply repro steps for the Get Latest Version case and the Change Source Control case. If you don't have repro steps then can you send us your solution?

Thanks,

Barry

BarryTuMSFT at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 2

Crasch,

We have seen at least 4 reports of similar problems, but we don't know what's causing it. We have never been able to reproduce it in house. The only thing we know is that it we had more reports for this with web projects.

What's happening there is that scci package is asking the solution for a project's hierarchy pointer. The solution returns "project not found", and scci code throws the exception. So, it can either be that scci has somehow the wrong path for the project, or there is something messed up with the information the solution has about the projects.

Things that may fix the problem might be:

- unbinding the solution (using ChangesourceControl dialog), then rebinding it back

- re-opening the solution from source control

- re-creating the solution file (create new solution, add existing website, etc)

But before trying this, it would be great if you can provide more information about your solution's config, perhaps we can figure out once for all what's causing the problem.

Ideally, a copy of the solution and suo file (if not the whole solution) will be helpful for scci side. Please attach it to this bug and reactivate it if you can, or open another issue

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=c1a2338d-0a28-4bc2-be02-d2f42e26deb5

We'd also need a description of the solution's configuration (e.g. what type is the web project, where is it located in http, where are its files located on the local disk, where is the solution on local disk, where are the projects bound in the VSS database, etc.

Thanks,

Alin

AlinConstantin-MSFT at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 3

Opened a new bug FDBK48410 with solution files...

Ciao

CArlo

Crasch at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 4
Thanks a lot for taking the effort to open a bug.
BarryTuMSFT at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 5

Crasch,

You get this error message because the solution file was modified after it was opened from source control, and now the paths stored by source control in the suo file don't match anymore the reality. Scci code knows the website should be relative to the solution in a folder XSLPresentation\XSLPresentation, it tries to get the project's hierarchy using this path and when the solution fails to locate such project and returns failure code, scci code throws the exception that displays the "Unspecified error" message.

For a way to fix the issue, see my reply in http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=9d2cc788-a687-4072-89fa-eb59060943e6

Thanks,

Alin

AlinConstantin-MSFT at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 6

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

Error: Unspecified error
File: vsee\pkgs\vsprovider\cscctransaction.cpp
Line number: 283

....................

add a.cpp(already in vss) -> projecta.vcproj(already in same vss 2).
then check in the project
At next time when get last version from vss, it would get the error upper.

vss dir:

$root\dir1\dir11\dir111\dir1111\solution file
$\root\dir1\dir11\dir111\dir1111\dir11111\projecta.vcproj

$\root\dir1\dir12\dir121\a.cpp(not belong the solution)

^^ poor english, sorry.

FengTao at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 7

Feng, your reply does not belong to this thread. You experience an "Unspecified error" but it's on a different file/location than in the original mail.

For your problem, this is a know issue and if I'm not mistaken will be fixed in SP1. The a.cpp file is outside of the project's connection (which is probably bound to $\root\dir1\dir11\dir111\dir1111), so it cannot be controlled by VS2005 in that configuration. Normally the file should appear uncontrolled in SolutionExplorer. Because of a bug, VS attempts to do operations for it and fails, displaying the unspecified error.

The workarounds are either to delete the a.cpp file from database, or to use File/SourceControl/ChangeSourceControl dialog to unbind the solution/project, then rebind them again picking a matching folder that will allow VS to controll all the files in the project

(e.g. $\root\dir1\ matching C:\Dir1, assuming the project is in C:\Dir1\Dir11\...etc and the a.cpp file is in C:\Dir1\Dir12\....etc)

Alin

AlinConstantin-MSFT at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 8

I am experiencing this issue also. The feedback/bug comment is correct. It appears to occur most often if you are converting VB.net 1.1 web projects to .net 2.0 / VS2005. When you do the convert it likes the .sln file in the web folder. We move the sln files to parent folder:

original:

\projects\vbweb.root\vbweb\vbweb.sln

new:

\projects\vbweb.root\vbweb.sln

When you do that and change vss you get the cmSSCIAbstractionLayer.cpp failure. I did note that this is a 'wont fix' issue. It looks really bad to have an untrapped error bubble up to your user interface. At a minimum I would expect a meaningful message and allow the user to continue. Something to the effect of "Your solution file or one of it's meta files has moved since Visual Studio 2005 has been opened. Please save your work and re-open the solution file."

-dsandor

dsandor at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 9

Yes, I'm getting this too, but in slightly different way and I can work around it.

I agree it should not be a 'wont fix' resolution. I am not manually changing anything in the SCC bindings at any point. Here are my symptoms:

Mine is not a web project, but a Windows Application, Perforce is the SCCS. I have several branched codebases, and the problem only occurs when switching between codebases (ie. I run 'clean' on the solution in the codebase I'm switching from, and open the solution in the codebase I'm switching to). The codebases represent the same code at different points in the release cycle and are mapped to different directory hierarchies in the filesystem.

My .sln file is in the same directory as all of the contained project directories (ie. one level up from all the .csproj files):

MySolution

MySolution\MySolution.sln

MySolution\MyProject1

MySolution\MyProject1\MyProject1.csproj

MySolution\MyProject2

MySolution\MyProject2\MyProject2.csproj

etc..

As soon as I open the solution in the new codebase, I get:

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

Error: Unspecified error

File: vsee\pkgs\vssprovider\cmsscciabstractionlayer.cpp

Line number: 4260

-

Clicking OK allows the solution to load normally, and I can work with it normally. I don't have access to the "Pending Checkins" window (blank), but checkin/checkout from the Solution Explorer seems to work correctly. When I close VS2005, I get many instances of the a different error:

-

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

Error: Unspecified error

File: vsee\pkgs\vssprovider\ccheckinwindow.cpp

Line number: 1220

I can click OK to all of these and VS2005 seems to close, but devenv.exe is still at 100% cpu with no change in memory footprint. It stays this way indefinitely and must be killed.

The only way to avoid the above conditions is to fully rebuild the solution after loading it and accepting the error. The errors on VS2005 close-down still occur, and devenv.exe still needs to be killed, but after that the solution can be reopened and closed without any errors/hangs and the Pending Checkins window works normally.

The solution works fine from this point onwards until it is cleaned and then I switch to another codebase, at which point the above problems repeat in the new codebase. This only happens for one of two solutions I have in my codebases. Both solutions have a setup project, if that's relevant. It should also be noted that deleting the .suo file prior to opening the solution does not prevent the error -- only rebuilding, closing and reopening the solution does.

I'd appreciate any feedback on this. Based on my observations it appears that VS is caching something related to the directory in which the .sln file is located, and that rebuilding clears this cache. It seems reasonable that I should be able to have two copies of the same solution in two different directories and be able to work on them independently and have them bound to two different branches in Perforce.

wbradney at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 10

WBradney,

> "Yes, I'm getting this too"

You're not getting the same error. The line number where the unspecified error occurs is different in your case. "Unspecified error" is just a generic error message scci displays everytime something is not right. In your case it's most likely something wrong with Perforce integration - either caused by VS or by Perforce plugin.

Someone in scci dev side should look at this. Unfortunately, I don't work anymore in source control... You should probably start a new thread with your error and case, or if this is preventing your work you should contact product support (and they will involve scci dev team)

Alin

AlinConstantin-MSFT at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 11

> "Unspecified error" is just a generic error message scci displays everytime something is not right.

Yes, that was partly my point. I'd be fired if I let software out the door that gave the same error message to the user for every problem.

I will, however, raise another thread.

Regards,

WMB

wbradney at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 12

I was having the exact same error as the original poster.

My solution was a little simpler than the solution aluded to in the workaround posted above. I simply deleted the .suo file.

When I reopened Studio it asked me to reattach to the existing Web project, which I agreed to, and everything was peachy; including my SourceControl bindings.

I have often found that deleting the .suo files resolves binding and path issues.

Hope that helps someone...

Paul.Davis at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 13

Paul,

Deleting the suo is not the right way to go, please don't recommend this to other users.

From source control point of view, deleting the suo gets rid of translation paths for websites, which will cause VS to access the websites using the paths stored in the sln file. These paths are valid for the first user who added the solution to source control. Any other user enlisted in the solution that deletes the suo can end up either working on a colleague's website files, or will end up with the website "unavailable". With VS2003 you'll see these problems more evident than with VS2005.

The only recommended way to solve path translation issues is to reopen the solution from source control, which will enlist again in the websites and will create a new suo with correct translations.

By deleting the suo you can run into other problems, too. The suo contains the location of the VSS database to which the solution is bound. If you delete the suo VS will try to use the default database, so if you have multiple VSS database, open with VSS a diffrent one than try to open your solution VS will complain the bindings cannot be resolved and will ask you to use ChangeSourceControl to rebind. Similar things will happen if you have multiple MSSCCI providers and switch between them before opening the solution in VS.

Alin

AlinConstantin-MSFT at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 14
While I can understand your position on me not recommending this as a catch all fix it certainly was the cheapest option for our solutions.

We have a single VSS database for the solution in question, every developer has a local copy of all websites/webservices contained in the solution and we never develop against a shared application.

I fail to see why my way is so different from the 'reopen from source control' solution you mentioned. Either way you end up with a new suo file bound to the correct VSS database.

I'm still at a loss as to why MS refuse to fix what is blatently a bug (the untrapped error).

Paul.Davis at 2007-9-4 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...

Visual Studio

Site Classified