bryansp

Previously, I archived the database, then restored it. I am not sure if this was the root of the issue or not.

Now, when I use automation to get a previous version of a file, I either get the most current version of the file, or I get the error message: "An item with the name $/ASP.NET Projects/Intranet_DotNet.root/Intranet/AccountingModule already exists".

A call to GetVersionByLabel always returns the most current version number instead of the version number of the labeled file.

A call to GetVersionByVersionNumber will return the error mentioned above if the version number is not the most current.

I know the files in the VSS database are there because I can launch the VSS client and look at the history, and manually get the previous versions.

We have v6.0d installed. When I run the Analysis tool, I do get some errors, and when I run Analyze with the fix option, it says it fixes some items, but when I analyze the database again, the same errors appear. They are all similar to: Project log 'aywaaaaa' has a delete record for item 'MaintainFraudType.aspx.resx', but that item wasn't found in the project. However, this error has been there ever since we started using VSS.

Any help would be appreciated. Thanks!



Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Patrick MCCormick

Hi Bryan,

I just finished a case very similar to this. We were finding that if one uses 6.0c visual SourceSafe (visual SourceSafe SP6) the problem does not occur.

The error I was working on occurred in ole automation as well as line command after restoring an archive but not in the VSS explorer.

In order to fix the problem I removed some of the extra destroy records in the root directory.

This exposed another error reporting version not found messages.

To address this second error I changed the create date on the history of the aaaaaaa file to before the creation of the file.

I reported the second version not found error as a bug and I am working on a repro of the first error in order to report it as well.

I doubt the analyze error has anything to do with the problem.

I would suggest you open a case with product support.

http://support.microsoft.com/default.aspx scid=fh;EN-US;OfferProPhone

Patrick MSFT






Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

bryansp

Thanks for the reply!.. Is there a tool somewhere that can rebuild the SourceSafe database (other than analyze.exe) .. I would really like to hold off opening a support incident until I have exhausted all other means. ...And this posting is my last remaining means!




Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Patrick MCCormick

Hi Bryan,

Unfortunately other than analyze there is no other tool. Internally we have something that allows me to manipulate the log entries. The good news is since this is a bug which I only just reproduce and reported after your post it should not be a chargable incident.

In my tests I could repro the issue if I started with a blank data restored a project, renamed that project and restored the project a second time.

I not sure if your situation exactly matches this.

If you started with a blank database and avoid renaming or restoring the same project more than once this could help.

You could just download VSS 6.0c service pack

http://msdn.microsoft.com/vstudio/previous/ssafe/

And use those binaries instead since it appears to be a regression bug.






Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

bryansp

I went to the link you suggested, but I do not see a service pack that will *downgrade* me to v6.0c. SP6 upgrades 6.0 to 6.0d build 31222 which is where I believe the issue is.

If I can dig up the original cd's or find a SP that will take me back to 6.0c could I take one of my most recent archives (backup) and restore it using v6.0c to a new database, then copy it out and use it with v6.0d and not have the issue as long as I don't archive under 6.0d anymore Thanks for all your help!!!





Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Patrick MCCormick

I accidentally sent the wrong link

try

http://www.microsoft.com/downloads/details.aspx FamilyID=77e4e564-01b2-461a-9fa0-03e138694c7f&DisplayLang=en

for 6.0c. There is a visual Studio service pack 6 that gets you to build 31222 and there is a Visual SourceSafe service pack 6 that is 6.0c build 9350.

I believe the issue is with the get function rather than the archive and restore. You could use 6.0c to do the gets via ole automation or the command line.

If you check the history of the problem database and you find that you have multiple restores of the same project. e.g. you restored $/project1 renamed it, and restored $/project1 then restoring using your current version of SourceSafe to a new database, (only restoring once, might fix the problem.)

Now the 31222 build should fix

http://support.microsoft.com/default.aspx scid=kb;EN-US;822845

but I am assuming you are running into a different issue.






Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

bryansp

Yes, this did fix the issue. I used 6.0c to archive my *bad* database. I then created a new database with 6.0c and restored my projects to it. I then *upgraded* back to 6.0d and was able to use automation to get previous versions of a file both by Label and version number.

I still have the issue where the analysis tool is reporting "Project log 'cfeaaaaa' has a delete record for item 'some_file', but that item wasn't found in the project." even after running a fix database, but this does not seem to be causing any issues anyway.

Thanks again for all your help!!





Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Comanche

Patrick MCCormick wrote:
...You could use 6.0c to do the gets via ole automation or the command line...

As far as I got the same issue, I tried this recommendation. I replaced SSAPI.DLL version 06.00.31222 with the version from VSS6SP5 (06.00.9350). But SSEXP.EXE refused to launch giving the following error: "The procedure entry point VS_GetInfo@@YAHPADHPAUPRJENTRY@@PAUVERSION@@@Z could not be located in the dynamic link library ssapi.dll.".

Do you mean that some other binaries should be downgraded as well

Added later:

I tried to downgrade 2 files more - SSEXP.EXE and SSGUI.DLL. And after that SourceSafe Explorer launched OK. Isn't it dangerous to downgrade them too version 6.0c is a very old one...





Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Richard Berg MSFT

It's safest to use the same version for all binaries. That way you know the combination has been tested together.

This bug is fixed in the SourceSafe 2005 GDR.




Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Comanche

Richard Berg MSFT wrote:
It's safest to use the same version for all binaries. That way you know the combination has been tested together.

You mean I need to downgrade the whole Win32 folder

Richard Berg MSFT wrote:
This bug is fixed in the SourceSafe 2005 GDR.

1. Only in 2005 no chances in 6.0

2. What's the reason of this bug ! It's very important to know because the other database (located at the same Win2003 server) works fine; and so maybe it's possible to do smth. with the problematic database - instead of fixing the binaries Your explanation will be greatly appreciated!





Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Richard Berg MSFT

No, I'm afraid it doesn't meet the bar for 6.0 fixes.

The bug is usually caused by an archive/restore. When searching the file history, IVSS doesn't deal with the Restore record correctly.




Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Comanche

Richard Berg MSFT wrote:
No, I'm afraid it doesn't meet the bar for 6.0 fixes.

Is it a way to push people to move to VSS 2005 :-)

Richard Berg MSFT wrote:
The bug is usually caused by an archive/restore. When searching the file history, IVSS doesn't deal with the Restore record correctly.

"Usually" - means not always in my case, there was no any archive/restore on the database! it was created empty! can there be some other reason





Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Richard Berg MSFT

No, more like we're sick of 6.0 :-) Seriously, it's 9 years old now and outside our standard support policy.

The fix for 2005 only affected Restore records. I believe 6.0d made the same mistake with Rollback records, and possibly one other kind, but without seeing the repro myself I can't be sure.




Re: Visual Studio Source Control and SourceSafe Automation only gets the most current version of a file

Patrick MCCormick

Hi

when I suggested using the 6.0c version to get around the ole automation problem. I was thinking more along the line of a side-by-side install referencing the 6.0c ssapi.dll in your ole automation. You certainly do not want to mix and match. Create a directory with the 6.0c binaries and reference that directories ssapi.dll. Keep your 6.0d win32 directory intact.

It is important to use 6.0d if you are using Visual Studio 2003 it included a number of fixes to make the integration more smoothly or if you are running into a bug address in the release.

the list of fixes can be seen

http://support.microsoft.com/default.aspx scid=kb;EN-US;820831

In the 6.0d release there were a number of regression bug that were subsequentially fix through hotfix releases.

The latest cumulative hotfix release is

http://support.microsoft.com/default.aspx scid=kb;EN-US;928392

I don't know if trying 6.0c will fix the issue you are running into but in my opinion it is worth a try. You could even have database corruption that is triggering this message. Where I have seem this problem before is when integrating Visaul Interdev with SourceSafe.