x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Problem adding c++ to perforce project

When I try to add new code to my project running in a perforce workspace, I get the error

"Failed to add class NewClass. Failed to generate project files.".

I assume this is because of the write only default in perforce but I'm not really sure how to get around it. It does actually create the files though, but I assume it doesn't link up with UE and isn't usable.

I also tried asking here but it didn't help much.

Product Version: Not Selected
Tags:
more ▼

asked Sep 10 '14 at 06:11 AM in C++ Programming

avatar image

Paha
44 6 9 102

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

You didn't happen to check in the "Intermediate" or "Saved" folders did you? If you did be sure to take remove them from the depot. Also none of the visual studio related files should be checked in either. (.sln, .sdf, etc) Also, sometimes files that aren't even in the depot can sometimes be made read only, so that could be it too, if thats the case you could manually untick the read only option for any files that aren't under source control. This should probably completely fix your issue.

more ▼

answered Sep 13 '14 at 12:40 AM

avatar image

Chris528
332 21 21 36

avatar image Paha Sep 13 '14 at 07:36 AM

I did add the "Intermediate" and "Saved" folders to the depot. I'm not really sure they can be removed from the depot without also deleting the local copy. And wouldn't other people need them if they were working with the code as well?

I'm also pretty sure VS always forces me to have all the VS related files checked out before doing anything, which I have to launch the game from every time for some odd reason... They're basically always checked out.

I've tried to do what you said (forcefully, screwed up my files pretty bad at one point lol) but it didn't seem to help. I get around it now by manually creating the files. Also, even though the error happens, the files are still generated but not added to the project, so I have to manually add them. Is there any other repercussions for ignoring the warning? Thanks for the suggestions!

avatar image Chris528 Sep 13 '14 at 12:14 PM

Nobody on the team needs "Intermediate" or "Saved" to be shared, its 100% safe to just delete them. This is exactly why its not working for you.

"I'm also pretty sure VS always forces me to have all the VS related files checked out before doing anything"

What VS related files?

Also, is the perforce plugin for visual studio setup correctly?

avatar image Paha Sep 13 '14 at 06:23 PM

I deleted the "Intermediate" and "Saved" folders and it didn't fix anything. Also the VS related files are the .sln .sdf .suo files. When you say they shouldn't be checked in, do you mean I should always have them checked out or they shouldn't be in the depot at all?

The plugin is also set up correctly.

avatar image Chris528 Sep 14 '14 at 10:34 AM

I meant that the .sln, sdf, .suo, etc should not be in the depot at all.

avatar image Paha Sep 19 '14 at 09:03 AM

Well, I never got the error to go away, but it seems to work fine even with the error. So I'll mark you're answer since you were the most helpful. Thanks for everything.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

You need a perforce client to do this the ordinary way. Grab it here: Perforce 20 User Downloads you might also check out this: Visual Studio Plugin

Then connect to your workspace, and check out the file(s) you need.

more ▼

answered Sep 11 '14 at 01:43 AM

avatar image

gormed
39 8 4 8

avatar image Paha Sep 12 '14 at 12:05 AM

I just installed the plugin you linked so thanks for that. I already had perforce installed which is why I think I'm having this problem. I guess I've solved it. I have to create the files manually and not through UE, and then I have to write both files from scratch, so it kinda sucks.

avatar image gormed Sep 12 '14 at 12:12 AM

Well it should work, creating them manually might work but i don't know if it will course any troubles later... Also make sure you do not check in the sln, suo or sdf files, because they might get recreated by the UE Build Tool and you do not want to check them out again and again ;)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question