views:

59

answers:

3

I created a C# project and added it to source control (mercurial). I can edit files in VS, commit it and push it using TortoiseHg. It goes to the server. When some one pulls they get the files.

In my visual studio I added a folder and a file inside that folder. I used TortoiseHg and it saw the new file in the new folder. I committed it and pushed it.

However, now someone pulled the latest code from the server - and they got the new file (it is visible through windows explorer), but when they open the solution in VS, they don't see the file.

Does someone have an idea what is wrong here? or things I should check? Thank you for the help.

P.S. I have visual studio 2010 express (so I can't use the VisualHg plugin).

A: 

Did you make sure that the Visual Studio Project File or Solution file is being updated and committed?

msarchet
@msarchet: Yes, I did that. If I add files at the root level, the other person gets it. But when I add folders, the other person does not see it. And the Visual Studio project file does not seem to change either.
aip.cd.aish
A: 

VS solution contains projects and each project select managed files by metadata(*.vcproj file). It's not the way include all files from root directory.

So, your co-workers can see new added files by in following two ways.

1) share project file(*.vcproj)

2) manually add files in each person's VS instance.

heekyu
@heekyu: If I add files at the root level, the other person gets it. But when I add folders, the other person does not see it. And the Visual Studio project file does not seem to change either - when a new folder is added.
aip.cd.aish
+1  A: 

Visual Studio caches changes to the solution and project until an explicit save or a build. In your comment:

In my visual studio I added a folder and a file inside that folder. I used TortoiseHg and it saw the new file in the new folder. I committed it and pushed it.

I see that an updated .sln or .vcproj file was not mentioned and checked in. Did you see an update to either of these files via TortoiseHg? If not, make sure to build or save your project after a change like this.

Mark Tolonen
@Mark: I had to rebuild the project and then the .vcproj file got updated. When I just saved, it did not. Thanks a lot!
aip.cd.aish