locked
Unable to perform the get operation because it is writable RRS feed

  • Question

  • Hi All,

    I have a codeset with multiple projects on a network drive: \\Shares\Projects\Application2011 . Here is what I am doing:

    - Copy the Application2011 codeset to the TFS server machine - C:\Depot\Application2011 folder
    - Created a team project called: "Application2011" and mapped this to the C:\Depot\Application2011. This is done on the TFS server machine as well.
    - Then, highlighted the Team Project and did --> "Add Items To Folder" and selected the C:\Deport\Application2011 so that it adds the projects inside C:\Depot\Application2011
    - Then I changed the mapping from C:\Depot\Application2011 to \\Shares\Projects\Application2011.

    At that time, it asked me if I wanted to do: "Get". I did and it added the projects as "pending" changes. Then I went to do checkin. It went through the files and I saw hundreds of: "Unable to perform the get operation because it is writable" errors.

    I did research on forums, Bing, and Google with no luck. Articles I found referred to MSBuild or "you get this error when you do a GET operation"...etc. But I got this error when I tried to do: "Check In"

    Any idea?

    Thank you,

    Amar

    Thursday, August 26, 2010 3:55 PM

All replies

  • Mapping your workspace to a network share is a very bad idea. You don't need to use a network share, because the Version Control in TFS is your repository. Every developer should use its own hard drive to store the source code files. The advantages of this approach is:

    - isolated development: when somebody is working on files, it can break code. Only when (s)he is ready the code is checked in to store it in the repository and share it with team members.

    - better performance: Visual Studio reads a lot in these files (for example when compiling) a network share is far slower then a local hard drive.

    - in control: a team member decides when (s)he gets the latest version of the files. When you use Team Build the binaries that you install on Test and/or Production always use the latest version that is in the repository.


    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Saturday, August 28, 2010 6:57 PM
  • Hi Ewald,

    Thank you for your response. When I say: "mapping workspace to a network share", I was speaking of the the Source Code Controller. When you want to add existing projects to your source code controller, do you also have to have your existing projects on the local harddrive of the TFS server machine or can you have the projects on a network share and link your team project to it? If you can link your team project to the network share, what are the steps to do so?

    Developers will have their workspace mapped to their local depot ( local hard drives ). But can the Team Project be mapped to a network share?

    Thank you,

    Amar

    Monday, August 30, 2010 1:21 PM
  • TFS will store the sources in a database. There is no need to have it on a network share.

    The steps to add your files to source control, see http://msdn.microsoft.com/library/ms181368.aspx


    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Monday, August 30, 2010 1:41 PM
  • Ok. How do I tell TFS to store the sources in a database? The articles in  http://msdn.microsoft.com/library/ms181368.aspx and especially http://msdn.microsoft.com/en-us/library/ms181374.aspx do not talk about adding multiple projects to version control.

    It talks about how you can add a solution to version control, or create a solution and add to version control, or add a file thats not in a solution to version control. It basically says you will need to load your solution, right click on it and do: "Add to Source Control". However, I have 40+ solutions, so does it mean I will need to load each solution and do: "Add to Source Control" 40 times?

    Monday, August 30, 2010 2:27 PM
  • You can add complete folders to source control. Just drag 'n drop from your windows explorer the folder which contains the sources to the correct folder in source control.

    To be able to use source control, you will first need to create a team project.


    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Monday, August 30, 2010 2:30 PM
  • Today, we have all of our projects on a network share so that developers can have access to them. So now we will need to move the projects to the local machine that runs TFS version control and then use the drag n' drop feature to link the newly created Team Project to the projects? Or will I be able to drag n' drop the project folders from network share directly to the team project? The reason I am asking about network share is to keep current project management base structure and also save disc space. ( Local hard disc size is about 30GB with 4, 5 GB free space so unless we get a new hard disc with more space on it we will run into space issue sooner or later; whereas, on the other hand, we have network share which is about 400GB with 200GB free space available. All releases of our software sit on the network share ).
    Monday, August 30, 2010 3:33 PM
  • You can drop from the network share AFAIK. You can also use the Add Items to Folder from the source control explorer. You can not only select 1 file, but you can also select complete folders in that dialog.
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Monday, August 30, 2010 3:42 PM
  • I will try and see if I can drop from the network share. But, as far as, the: "Add Items To Folder" option does not show anything when I browse to the network share which I found very strange. However, if I copy the same projects to the local hard drive on the TFS server box and do: "Add Items To Folder" on my team project, and then browse to the local C:\ disc I can see the project folders. This is one of the reasons I started to look for an alternate way to add projects from network share to version control.
    Monday, August 30, 2010 3:46 PM
  • Ewald,

    I can't seem to get the drag and drop option to work. Browsed to the project folder, dragged it to the correct folder under my team project in Source Control Explorer and i can't drop it because it keeps showing an icon that indicates it is not possible.
     (\) - icon something like this ( assuming thats a circle )

    "Add Items To Folder" do not show anything on the network drive. So I am kind of at a loss now.

    Note: I am doing all these on the TFS server machine.

    Do you really need to map my team project to my solutions? Or how do I tell TFS to link my team project to my solutions?

     

    Wednesday, September 1, 2010 8:28 PM
  • You have to do a get latest on the folder in Source Control first
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Thursday, September 2, 2010 4:32 AM
  • How can I get latest when there is nothing added to my source control?

     

    Thursday, September 2, 2010 4:36 AM
  • Do a get latest on the folder where your sources will be stored in.


    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Thursday, September 2, 2010 4:41 AM
  • I can't create a folder under my Team Project unless I map my team project. So I can't do Get Latest on it either. If I try to map it, I can map it to the network share. But then when I create a folder under my team project it also creates the same folder on my network share - which is what I don't want.

    If you have 40 solutions on a network share, what steps would you follow to add these to your Version Control so that client-side developers can start check out...?

    Thursday, September 2, 2010 1:35 PM
  • Go away from the network share idea!

    1) Map your team project to a local folder, say c:\sources

    2) Create a Main folder in your team project

    3) Copy the contents of the network share you c:\sources\Main

    4) Start the Add files command

    5) Delete the network share (or deny the rights for everybody) so they are going to use source control

    6) every user now also maps there source control to a local folder and do a get latest.


    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Thursday, September 2, 2010 2:21 PM
  • Ok. The idea behind the whole network share thing is to save disc space - cost and keep the current infrastructure.

    The above 6 steps you provided gave me a very clear picture though. :) Now, can you please tell me if this will work:

    1. Map the network share to a Z: drive on my TFS server box.
    2. Map my team project to the Z: drive. ( So, now I have my team project $\TeamProject1 mapped to Z: drive )
    3. VS Command Prompt:
        Z:
        TF ADD /R *
        TF CHECKIN /R
    4. Every user now maps their source control to a local folder on their machine and do a get latest.

    End Result: By mapping the network share to a drive we are still mapping the team project to a "local" drive and also keeping the code set on the network share.

     

    Thursday, September 2, 2010 2:53 PM
  • You could use the network share for adding the files, but please please use the local disk when developing. not every developer needs the complete source code repository on their system. Only get the files that are required.

    But for adding you can use the network share. No problem with that. You don't even have to map a drive.


    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Thursday, September 2, 2010 3:32 PM
  • Right, so I can use network share to add the solutions to my source control. When a developer needs to work on project, he\she will just need to download that project or the specific file(s) to his\her local depot and work on them. When the developer is done working on them then he can check it in and delete the download project from his local depot.

    So my question was: "How do I add my source code without mapping a drive?". By mapping the drive, I seem to have found a way to add them. ( as I mentioned in my previous post ). But how can you add source code from your network share to your team project without mapping a drive?

    Thursday, September 2, 2010 3:38 PM
  • Just map the folder you want to add the sources to to the location where the sources are stored.
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Thursday, September 2, 2010 3:56 PM
  • Ok. I have a team project called: TeamProject1. Unless I map this project to a local folder, I cannot create a folder under the team project. So I map my team project to the network share.

    Current Status: The Server folder not mapped
    Server Folder: $/TeamProject1
    Local Folder: \\shares\projects\TeamProject1
    Recursive option is checked.

    I click on "MAP" and I get a prompt:

    "Map

    Newly mapped items will not be downloaded until you execute a get. Do you want to get $/TeamProject1 now?"

    I click on YES. Now I have the team project mapped. However, when I click on my team project I don't see any files on the Source Control Explorer. So just mapping my team project and doing a "get" did not add my source code. When I do: "Add items to folder" and browse to the network share I don't see any files at all.

    When I click on my team project and do--> "New Folder" it says: TF10175: The team project folder $/TeamProject1 does not exist.

    Really, if there was a documentation that explains about this process I would be more than willing to read through it and get it. But every time a document talks about: "mapping" it talks about mapping process on client machine and it doesn't talk about how to actually map your team project to your source code so TFS knows where the source code repository is.

    Since I am new to TFS, please let me know if I am misunderstanding something.

    And when you try the same scenario on your machine, do you get the same result ( when you go and map your team project to a network share ? )

     

    Thursday, September 2, 2010 4:14 PM