1

I have a ASP MVC project committed to SVN (used Visual SVN).As the project grew up i kept adding files.Most of the time when i "Get" project everything is available in VS2012. But today when i get the complete solution from repository - some of previously added files(cs and cshtml and respective folders they are in) are not included in project solution in VS explorer but they are there in the Directory that i did get from svn-

My Project in SVN~

MyMVCProj
   ModelFolder
   ControllerFolder
   ViewFolder
      view1folder~hasfiles

Now i add a new folder to viewfolder with files within and commit

MyMVCProj
       ModelFolder
       ControllerFolder
       ViewFolder
          view1folder~hasfiles
          view2folder~hasafile(<=This available in my disk after getting from svn not in VS2012)

what am i doing wrong? I do get project everyday by >Visual Studio2012>VISUALSVN>Get Solution from Subversion;this saves project to disk and opened in VS

bahrep
  • 29,961
  • 12
  • 103
  • 150
Murali Uppangala
  • 884
  • 6
  • 22
  • 49

2 Answers2

3

I guess that project's file wasn't committed to the repository together with other changes. Here is how you can solve this:

  1. Go to Visual Studio | VisualSVN | Show log and look for the revision committed by DEV2 which added view2folder/,

  2. Take a closer look at changed paths. Most likely the revision added view2folder/ with its contents but the revision didn't change MyMVCProj.csproj file.

    The *.csproj file contains information about the files included in that project. When items are added to the project, references to them get into *.csproj file. If the file is missing these references, then you don't see added items in Solution Explorer.

  3. In Solution Explorer, click Show All Files, right click view2folder/ and choose Include in Project.

  4. In VisualSVN's Pending Changes dialog you can see that project's file has been modified. Commit the change.

    That's it.

Community
  • 1
  • 1
bahrep
  • 29,961
  • 12
  • 103
  • 150
0

I found solution after some workaround - When two or more person working on a project this situation may occur. For me it happened because of following scenario:

  1. Dev1 commits projects to SVN,
  2. Dev2 GETs it and does something and even adds files/folders,
  3. Dev1 just updates and starts working. Now the newly created files by Dev2 are not included in project; but they are available on local disk. These had to be manually added to project after update. (Look for related post).

Please Update here if my approach is wrong.

Community
  • 1
  • 1
Murali Uppangala
  • 884
  • 6
  • 22
  • 49
  • 2
    that suggests you're either not storing the .csproj in SVN, or has not saved and committed it. I don't think VS saves the .csproj when yu add files to the project, you have to close the project or click "save all" – gbjbaanb Aug 27 '14 at 12:29
  • oh! that's a interesting.. Is .csproj saves all those preferences about the project? – Murali Uppangala Aug 27 '14 at 13:10
  • 2
    the .csproj contains the project information - including which files are part of the project. Its a shame MS changed the way files are included in projects with C# to make it look like the folder structure on disk (VC++ is much better in this regard). Open the .csproj file in notepad++ and see for yourself. (It also includes info about building the project, but not debugging) – gbjbaanb Aug 27 '14 at 14:42