VSS Automation - VSSItem.Add problems

Hey everyone, I'm sure this is a simple fix, but I just seem to missing something...

I am using the C# COM wrapper withInteropServices.

I have tried all the below calls, and they return the error below:

tempParent.Add("C:\\index.html", "File promoted from DEVELOPMENT", 0);

tempParent.Add("C:\\index.html", "File promoted from DEVELOPMENT",(int)Flags.VSSFLAG_DELNO);

L07_Debug 7/25/2005 11:25:53 AM PC127782 SSEXP.EXE Testing Ciosor.GetItem - Creation Loop - ERROR: System.Runtime.InteropServices.COMException (0x8004D694): Error loading resource string
at SourceSafeTypeLib.IVSSItem.Add(String Local, String Comment, Int32 iFlags)
at ActewAGL.PromotionManager.GetItem(VSSItem tempParent, StringCollection tempPaths) in c:\temp\actewagl\actewagl\ciosor.cs:line 267

The really wierd thing is that it worked once, and that was it. I did a permanent delete of the file in question, but there kept coming back.

This has me a little puzzled, so if anyone could shed any light on what exactly is going on here that would be great.

Thanks for the help.

[1245 byte] By [odders] at [2007-12-16]
# 1
Sorry for the hassle, but I found the problem :)
odders at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 2

Now you got me curious !
What was the problem? Smile
AlfredoMendezMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 3
Hi,

I am also facing the same problem but while triying the method "get_vssitem".

Any help on this?

Thanks,
Kamalakar Devaki

KamalakarDevaki at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 4
0x8004D694 means "An item with the name already exists", so you probably had the file in the database already. Were you deleting it from a different location than where you were adding it through IVSS?
Are you sure you get the same error code from the GetItems method?

Alin

AlinConstantin-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 5
Yes, I am facing the problem with getitems method.

Thanks,
Kamalakar Devaki

KamalakarDevaki at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 6
I doubt you're getting "An item with the name already exists" error returned from GetItems. Does the error code reported by GetItems contain a different error code than 0x8004D694?

What did you do to fix the Add?

Alin

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

Visual Studio

Site Classified