Chronic problem checking in even when clearing cache

If you are having a problem using Vault, post a message here.
Post Reply
Hviezdoslav
Posts: 7
Joined: Wed Oct 12, 2011 11:43 am

Chronic problem checking in even when clearing cache

Post by Hviezdoslav » Wed Oct 12, 2011 11:55 am

SourceGear Vault Standard Version 5.1.1(19215)

Visual Studio 2010 New Web App Project

Visual Studio 2010 Version 10.0.30319.1 RTMRel .NET Framework Version 4.0.30319 RTMRel

Windows 7 Ultimate Service Pack 1 64-bit OS

Gregarious greetings,

This error is happening with this new web app and SourceSafe each time I add a file to SourceSafe. Yesterday, I added a new file to SourceSafe and got the same error when trying to checkin. So yesterday I cleared the cache on my client side per a SourceSafe article on the Internet after adding this newly created file to SourceSafe and getting this error when trying to checkin. Then I got into SourceSafe to reset the Working folder, and I did Get Latest for all of the files and it worked for a while as I could checkin that file now and again throughout the morning but this error happened again with this same newly added file later during the same day and again yesterday I went through the process to clear client side cache, reset working folder, and get latest on each file.

Here is what I did today. I created in Visual Studio 2010 PlantMatrix Web app a new file named Only_Testing.cs in DataManager folder of Data folder. At this point I did no coding within this file in Visual Studio 2010.

I went to SourceGear to that DataManager folder and clicked Detect New Files to Add. I put a checkmark in this new file and clicked OK. The file was added to SourceSafe. I then checked out this file in SourceSafe.

I went to VS 2010 and added some code to the new file and I saved.

When I then went to SourceSafe to checkin the file, I received the following:

Item $/PlantMatrixWebApp/PlantMatrixWE/PlantMatrix/Data/DataManager/Only_Testing.cs caused the transaction to fail: An item with the same name or object id already exists in the selected folder.
Transaction failed

In Visual Studio 2010, this web app project has Valid bindings in File/Vault Source Control/Change Bindings. In Visual Studio 2010 in Tools/Options/Source Control, the Plug-In Selection’s drop down is set to SourceGear Vault Standard Visual Studio Enhanced Client and the Integrated Options has Automatically Check Out in drop down and has no checkmarks for Get Everything When Opening A Solution, Check In Everything When Closing A Solution, and Enable Diagnostic Logging.

Does anybody know why chronically I get this error in SourceSafe while creating this new web app project? If so, could you please let me know? In the past, we have used SourceSafe only for a Windows application in Visual Studio 2005 and we have not experienced this error when trying to checkin a newly added file or any file for that matter.

The SourceSafe software resides on a Windows Server 2008 OS and on this same machine the SourceGear database resides in SQL Server 2008 R2 (Microsoft SQL Server Mgmt Studio version 10.50.2500.0, Microsoft Data Access Components MDAC version 6.1.7601.17514, Microsoft MSXML version 3.0.6.0, Microsoft .NET Framework version 2.0.50727.5446, Operating System version 6.1.7601).

I thank you very much in advance for considering this post of mine. Please let me know if I may provide you with further information.

The article on the Internet that I used about clearing the cache is at the URL http://support.sourcegear.com/viewtopic ... 13&t=11513 about clearing the client-side cache.

Hviezdoslav

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Chronic problem checking in even when clearing cache

Post by lbauer » Wed Oct 12, 2011 3:33 pm

This information is a little confusing. Visual SourceSafe is a Microsoft version control tool, different from Vault.

It sounds like you are using Vault. When you say "SourceSafe" do you mean "source control," which is a generic term?

Let's take this a step at a time.
Is this the constant error you are getting, or are there other errors as well?
Item $/PlantMatrixWebApp/PlantMatrixWE/PlantMatrix/Data/DataManager/Only_Testing.cs caused the transaction to fail: An item with the same name or object id already exists in the selected folder.
Transaction failed
Linda Bauer
SourceGear
Technical Support Manager

Hviezdoslav
Posts: 7
Joined: Wed Oct 12, 2011 11:43 am

Re: Chronic problem checking in even when clearing cache

Post by Hviezdoslav » Thu Oct 13, 2011 7:09 am

I apologize. I mean SourceGear Vault. In my prior job I worked with SourceSafe.

We have here the SourceGear Vault Standard Version 5.1.1(19215). The SourceGear database sgvault resides on a Windows Server 2008 machine in SQL Server 2008 R2.

Hviezdoslav
Posts: 7
Joined: Wed Oct 12, 2011 11:43 am

Re: Chronic problem checking in even when clearing cache

Post by Hviezdoslav » Thu Oct 13, 2011 8:55 am

I just typed a very long post while I was proceeding to add a new file. When I clicked Submit after that long post, I got the page about needing to login. Unfortunately I did not copy all of the long post and paste into a Word doc before trying to Submit. In the future I will do so if the post is long. Plus sometimes another worker will come to my desk to speak about something related to work.

Basically, I cleared client-side cache (renamed folder in C drive path) and reset Vault server. I added new file to VS 2010 and then detected/added in SourceGear.

I modified file in VS 2010 and clicked Save and got a Microsoft error about not being able to save changes and a Save File As popup arose. When I went in VS 2010 to check if the Valid bindings still exist for Vault Source Control, I got the same error. So I closed VS 2010 and opened again. Now I can save changes to this new file and see the Valid bindings.

In SourceGear, the file was checked out automatically to me. But checking in the file causes the same error.

I notice that when I am on this Windows 7 PC in Virtual PC/Windows XP mode and am logged into Source Gear in Virtual PC/Windows XP mode, when I open Visual Studio 2005 and click to open a Windows application I am prompted to login to the Vault server. When I am on this Windows 7 PC and logged into SourceGear, when I open the web app project in VS 2010 I am not prompted to login to the Vault server even though the VS 2010 is bound to Vault Source Control.

Anyway, please let me know if you have any suggestions or questions. This web app project was created by a former employee and he only started it. He did not have the web app hooked up to any source control. I want to hook up the web app project to source control and I will have many files to add.

Thanks very much to you,

Hviezdoslav

Hviezdoslav
Posts: 7
Joined: Wed Oct 12, 2011 11:43 am

Re: Chronic problem checking in even when clearing cache

Post by Hviezdoslav » Thu Oct 13, 2011 9:17 am

Okay. This other error happens whenever I delete the newly added file that I cannot checkin.

So I just deleted in SourceGear the newly added file from this morning and clicked to delete also from Working folder.

In VS 2010, the file is not there now. When I go to build the web app project though, I get the following build error:

Could not write lines to file “obj\Debug\PlantMatrix.csproj.FileListAbsolute.txt.” Access to the path “C:\Users\Pete\Desktop\PlantMatrixWE\PlantMatrix\obj\Debug\PlantMatrix.csproj.FileListAbsolute.txt’ is denied.

This file on the C drive is Read Only and has Date Modified 10/13/2011 8:54 AM. This file is not in SourceGear in this path. SourceGear has some files in the obj\Debug but not this file. When I go in SourceGear to the Debug folder to detect new files to add, I do not see this file to add.

Should I delete the obj folder with subfolder Debug from SourceGear altogether? The web app project will constantly be writing to obj\Debug.

I just deleted the obj folder and its sub folder Debug and the files in Debug within Source Gear. The option to delete from working folder was greyed out. I do not think that I need this or should have this in SourceGear since only VS 2010 creates and writes to these files.


But back to the problem checking in a newly or recently added file in SourceGear, does anybody have any ideas or suggestions?


Thanks much,

Hviezdoslav

Hviezdoslav
Posts: 7
Joined: Wed Oct 12, 2011 11:43 am

Re: Chronic problem checking in even when clearing cache

Post by Hviezdoslav » Thu Oct 13, 2011 9:37 am

I unbound the Valid binds in VS 2010 and rebinded and when doing so I was forced to login to the Vault server but when logging into the web app project subsequently I do not need to login to the Vault server.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Chronic problem checking in even when clearing cache

Post by lbauer » Thu Oct 13, 2011 10:43 am

But back to the problem checking in a newly or recently added file in SourceGear, does anybody have any ideas or suggestions?
If you are getting the error that the file already exists, then look in the Vault Pending Change set to see if there's a duplicate transaction. If so, delete the duplicate transaction.

If you'd like we can schedule a remote assist session where I can take a closer look. Email support at sourcegear.com, Attn: Linda. Please include a link to this forum post.
Linda Bauer
SourceGear
Technical Support Manager

Hviezdoslav
Posts: 7
Joined: Wed Oct 12, 2011 11:43 am

Re: Chronic problem checking in even when clearing cache

Post by Hviezdoslav » Thu Oct 13, 2011 12:28 pm

This is a detailed version of what I am doing and I will paste this into my post in SourceGear’s forum when I am done in this Word document.

I have another chance to try to create a new file and add to SourceGear and see if I can checkin the file. I have cleared the DNS cache, Memory cache, and Thumbnails cache on this Win 7 PC. In SourceGear I have deleted the obj folder and its sub folder Debug and all of Debug folder’s files since Visual Studio 2010 creates these files and writes to ‘em. At present, there is no dmOvenProgramStep.cs file in the Visual Studio 2010 web app project or in SourceGear. I deleted this dmOvenProgramStep.cs file that I’d created earlier today and that I could not check in in SourceGear earlier today because of the error about name or id existing already.

Earlier today I did the clearing of client-side cache and the restarting of Vault on server but now I am doing it again without being in SourceGear or Visual Studio.

I ran the following query in the SourceGear database on the Windows Server 2008 machine:

use sgvault
go
select * from dbo.tblrepositories

The following two records were returned:

0 A988FC1F-9EF7-46EB-B98E-FC13D24797C6 Default Repository Settings $ NULL NULL 0 0 0 0 0 0 0 0 2 0 0 2011-10-05 14:35:39.813 0 NULL NULL U
1 ADA07F21-3511-4FF6-A628-D50606E90D95 Default Repository $ 4371 11137 686 8064 0 6580 0 0 0 0 2 0 NULL 0 2011-10-05 14:35:39.813 0 37787 NULL U

On my Windows 7 PC, in the path C:\Users\Pete\AppData\Local\Sourcegear\Vault_1\Client\, there is only one folder named ADA07F21-3511-4FF6-A628-D50606E90D95 and in that folder there is the username folder for me. I renamed that username folder to have “_OldAsOf13OCT2011HalfPastNoon” at the end of the file’s name to try to clear the client-side cache.

Then I used Remote Desktop Connection to go to the Windows Server 2008 machine. In the Server Manager, in Roles, in Web Server (IIS), I clicked to highlight Internet Information Services (IIS) Manager. On the right in the Actions, in Manage Server I clicked the Restart link and the link was greyed out momentarily during the restart. Now the link is available for clicking again. I disconnected from the Windows Server 2008 machine.

I logged into SourceGear and see that after the login the username folder was created in the path C:\Users\Pete\AppData\Local\Sourcegear\Vault_1\Client\ADA07F21-3511-4FF6-A628-D50606E90D95 and that this username folder has 4 different CacheMember_FurtherText files.

In SourceGear, I had to Set Working Folder and I clicked to force all subfolders to use inherited working folder. The status changed from Missing to Unknown for the PlantMatrixWE.sln solution file. So beginning with the PlantMatrixWE.sln file in SourceGear, I did Get Latest Version Do Not Overwrite/Merge Later on the files. The Unknown status on the PlantMatrixWE.sln file went away. There is nothing in the Pending Change Set in SourceGear with today’s date. Now the Working Folder is set and none of the files in SourceGear have any value in the Status column.

I then opened Visual Studio 2010 and opened the web app project.

In VS 2010 in web app project folder in Data\DataManager I created a new file again named dmOvenProgramStep.cs. I went to SourceGear and see that the PlantMatrix.csproj file has been checked out automatically and exclusively to me. The PlantMatrix.csproj.user file in SourceGear is not checked out to me and has no status. In VS 2010 Tools/Options/Source Control/Integrated Options, there is Automatically Check Out for When Check Out Is Required On Edit. In VS 2010, there is Valid for the status of the Vault Bindings.

In SourceGear, I right-clicked on DataManager folder, selected Detect New Files To Add, checked the checkbox for dmOvenProgramStep.cs, and clicked OK. I then added a comment in VS 2010 to this new file and clicked Save but the Save File As form opens, so I clicked Cancel on the Save File As form. In SourceGear, now the PlantMatrix.csproj.user file has Renegade status and the PlantMatrix.csproj file is still checked out to me from the Automatic Check Out. Yet in SourceGear the dmOvenProgramStep.cs file was not checked out to me automatically when I clicked Save to save a comment in VS 2010 in the file. The file of course is Read Only on the C drive path since SourceSafe did not check out automatically the file.

So I clicked in the file in VS 2010 to undo the lil’ test comment that I’d added.

SourceGear still has Renegade status for the PlantMatrix.csproj.user file that is not checked out and still has the Edited status for the PlantMatrix.csproj file that was checked out automatically to me.

Now I click in SourceGear the DataManager folder and see that now the dmOvenProgramStep.cs file is checked out to me exclusively (as I did not manually try to check out the file because I wanted to see if the file would be checked out automatically to me when I tried to save the lil’ comment that I’d added in VS 2010). The status is not Edited though and there is no status for this dmOvenProgramStep.cs file that has 1 for both the local and remote versions.

So I went back to VS 2010 and added again the lil’ test comment and now I can click Save to save without getting the Save File As form.

So I went back to SourceSafe and now there is Edited for the status of dmOvenProgramStep.cs file. In the Pending Change Set tab, there is a line for 10/13/2011 12:58:10 PM for Add File for dmOvenStepProgram.cs, a line for 10/13/2011 1:00:15 PM for Modified for PlantMatrix.csproj, and a line for 10/13/2011 1:11:19 PM for Modified for dmOvenProgramStep.cs file. AM I SUPPOSED TO CLICK ON THE CHECKBOXES FOR THESE LINES AND CLICK THE COMMIT BUTTON? For now I am not going to try to commit these lines in Pending Change Set.

I went to check in the dmOvenProgramStep.cs file. I see that the CheckIn form has checkmarks in the Add File line and in the Modified line. There is no checkmark in the Keep Checked Out checkbox or the Remove Local Copy checkbox. I clicked OK and yet again I get the following error:
[10/13/2011 1:16:40 PM] Item $/PlantMatrixWebApp/PlantMatrixWE/PlantMatrix/Data/DataManager/dmOvenProgramStep.cs caused the transaction to fail: An item with the same name or object id already exists in the selected folder.
[10/13/2011 1:16:40 PM] Transaction failed

What is causing this error? Am I proceeding in a wrong manner, and if so, how?

So in SourceGear I went to the root web app project folder. I tried Get Latest Attempt Automatic Merge for the PlantMatrix.csproj.user file that has Renegade status but this status did not go away. So I checked out this file and checked in immediately this file, and I checked in without any error and the local version and remote version did NOT increase by 1. I checked in the PlantMatrix.csproj file without any error and the local and remote versions DID increase by 1.

I went again to DataManager folder in SourceGear and tried to check in the dmOvenProgramStep.cs folder but yet again I get the error. Now the line in the Pending Change Set only has two rows for today for dmOvenProgramStep.cs because the one row vanished when I checked in the project file.

I need to be able to add files to SourceGear as I add the files to VS 2010. I need to put this web app project into source control.

Do you know if I am doing something wrong, and if so could you please inform me if I am doing something wrong? I do not have this problem when I add a file to a VS 2005 Windows project and SourceGear on the Virtual PC/Windows XP mode of this Windows 7 machine and then try to check in the file. My colleague has a Windows XP operating system and he does not have this problem when he adds a file to a VS 2005 Windows application and SourceGear and then tries to check in the file.

I thank you in advance for your consideration of my problem and attempt to help.

Hviezdoslav

Hviezdoslav
Posts: 7
Joined: Wed Oct 12, 2011 11:43 am

Re: Chronic problem checking in even when clearing cache

Post by Hviezdoslav » Thu Oct 13, 2011 12:39 pm

Okay, I read your most recent reply and thank you very much for it.

I'd tried to click the checkbox in the line in Pending Change Set and click Commit but I got the same error. I had not seen any button in Pending Change Set for deleting and I right-clicked on the line in Pending Change Set but did not see any choice for deleting.

So just now I highlighted the Add File line in Pending Change Set for this dmOvenProgramStep.cs . I thought that I'd try pushing the Delete key on the keyboard and that line in Pending Change Set vanished. When I did the same for the Modified line for this file, I got the Undo Checkout popup and clicked Cancel.

I then right-clicked on dmOvenProgramStep.cs outside of the Pending Change Set and I did a Get Latest Version Attempt Automatic Merge and successfully I checked in the file without getting this error.

So I guess that I must always delete the Add File line in Pending Change Set before trying to check in a newly added file even though we do not need to do so when we add a new file to the Win app in VS 2005 and to SourceGear?

My colleague has worked here for a number of years and has not done anything at all in the Pending Change Set when he added a new file to SourceGear after adding a file to the VS 2005 Windows application.


I thank you very much, Linda. Now I could check in that new dmOvenProgramStep.cs file.


I will send you an email to try to schedule a remote assistance session just in case I am doing something wrong during this whole process.

Thank you very much again, Linda.

Hviezdoslav

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Chronic problem checking in even when clearing cache

Post by lbauer » Fri Oct 14, 2011 7:35 am

So I guess that I must always delete the Add File line in Pending Change Set before trying to check in a newly added file even though we do not need to do so when we add a new file to the Win app in VS 2005 and to SourceGear?
No, this is just something you need to do if there are duplicate items in the Pending Change set. We'll have a remote session this afternoon that hopefully will tell us why you are seeing this.

http://support.sourcegear.com/viewtopic.php?p=26479
Linda Bauer
SourceGear
Technical Support Manager

Post Reply