Jump to content


P4VS Visual Studio 2015 adding files to project

P4VS VS2015

  • Please log in to reply
2 replies to this topic

#1 jamesh

jamesh

    Member

  • Members
  • PipPip
  • 18 posts

Posted 29 July 2015 - 10:19 AM

I've found that the P4VS plug-in does not appear to automatically check-out the .vcxproj and .vcxproj.filters files for a project when I tried to add a new file or existing file to it in VS2015. It did work with VS2013. This is irritating, as Visual Studio then subsequently fails to add anything because the file is marked as read-only (until it is checked out). I can work around it by checking out the project file explicitly, but it does rather disrupt my workflow from the previous version.

For reference, I am using Version 14.0.23107.0 D14REL of VS2015, and 2015.1.105.4164 of the P4VS plug-in.

#2 p4bill

p4bill

    Advanced Member

  • Members
  • PipPipPip
  • 217 posts

Posted 30 July 2015 - 01:52 PM

I am unable to recreate that behavior with the same version of P4VS and Visual Studio 2015 14.0.23103.0 D14REL (I was unable to find a download of Enterprise 14.0.23107.0 D14REL).

Here are my repro steps, perhaps you can spot something that you are doing differently:
1. Open a project that is in Perforce and connect to the server with the appropriate user and workspace
2. Contect click on the project and add an item (I added a class file)
results:
* you are prompted to add the new files to Perforce
* the project file is edited in memory with no prompt for checkout. I beleive this has behaved this way for a while:
        #476701 (Bug #53262) *
            P4VS now automatically approves project files for in memory edit
            to avoid automatic check out of project files on load of solution.
on a "Save all" or close of the project you would be prompted to check out the project file in order to save the change to disk and check in the changed project file to Perforce.

The only thing I can think of that may result in what you are seeing is if this setting is unchecked:

Tools -> Options -> Perforce - General [] Automatically add new files to Perforce

If ^^that^^ is unchecked, you would not see the first prompt for addind the new file.

On a side note, .filters files do not need to be checked into Perforce as they can be different for different users. See the second answer here:

http://stackoverflow...-source-control

We may need to get you in touch with support to troubleshoot further what you are running into. Anything that I note in my repro appear very different from your steps?

#3 jamesh

jamesh

    Member

  • Members
  • PipPip
  • 18 posts

Posted 30 July 2015 - 02:08 PM

Thanks for the response. [Un]fortunately I cannot now reproduce the issue locally either. I have no idea what is different today versus yesterday. If I come across it again, and can figure out the differences, I'll post again.

For reference, I do have the "Automatically add new files to Perforce" option checked. I am now seeing what I was previously seeing on Visual Studio 2013 whenever I add a new file to the project:
1) Adding the file immediately adds the file to my default changelist (I have the relevant option deselected so that it goes straight there)
2) At the same time, the project is checked out (but not the filters file)
3) On save, the .filters is also checked out and the relevant edits saved in both that and the project file.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users