Vcxproj - project can not be loaded

For me this is 100% repetable bug. Engine 4.2.1 both versions, I mean with sources and compiled one.

I lunch editor, create new c++ project, then editor closes automatically and VS opens. I got my project and solution, then I close VS and try to reopen project by clicking on *.sln. Solution opens but project not, VS says ‘load failed’ so I assume that *.vcxproj is corrupted somehow.

Strange thing is that I open project in editor by double click on *.uproject and I can compile it from editor, but again when I try to open it for editor by clicking ‘open visual studio’ I got the same result with corrupted project file.

Any idea, what is going on?

1 Like

Editor compiles because UBT does no require VS project files only VS compiler in fact it ignores all VS settings. You can always regenerate project files by right clicking uproject file and click “generate visual studio project files”

2 Likes

Hi EnOnE,

What version of Visual Studio are you using, and can you copy/paste the text of the error message you receive (or post a screenshot) when you try to open the solution in Visual Studio?

This is how solution explorer look like =>

And this is the error message => C:\Documents and Settings\Przemo\Documents\Unreal Projects\PizzaSrc2\Intermediate\ProjectFiles\UE4.vcxproj : error : Project “C:\Documents and Settings\Przemo\Documents\Unreal Projects\PizzaSrc2\Intermediate\ProjectFiles\UE4.vcxproj” could not be found.

And there are other messages for other projects that look the same.

Generally every time I turn off VS I need to create whole project from begining and this happens on two different PCs.

regenerating did not help

Are you using Visual Studio Express 2013? If so, are you using the Desktop version?

Could you also check the value of your VS120COMNTOOLS (if you are using VS 2013) environment variable (located at Control Panel\System and Security\System -> Advanced System Settings) and let me know what file path that is showing?

I am using VS 2013 Ultimate. This is the value for env.var. => C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\

So I think that is correct. I use UE4 in Debug Editor compilation mode, maybe this will help.

I have jus checked it. The same goes with every UE4 version from 4.0 to 4.2. No matter if it is compiled or not. I wonder how VS can corrupt vcxproj files just like that, is it something wrong with my VS?. I will try to put this file as attachement from “Basic Code C++” project from UE 4.2.1. Can you compare it? MyProject.vcxproj

Hi EnOnE,

I am very sorry for not responding sooner. Were you able to resolve this issue?

No, for about 2 months I am doing some projects on UDK and Unity, so I had no to work on it.

You don’t have to do it right away if you are busy with other projects, but whenever you are ready to start trying to look into this issue again, please let us know and we can try to help you figure out what is going on.

Hi EnOnE Masta,

I am very sorry for the delay in getting back to you. Are you still having trouble with this issue?

Hey,

Recently I checked that and still I have the same issue, but now I am on 4.6.1 version. It is crazy cause VS tells me that it can not find vcxproj and it show the path where this file actually is.

I have found that I have same problem with any project in VS2013, not only ue4

Well I have found solution. It seems that if the whole project has very long path VS can’t find vcxproj, but when projects is in ie. c:\myue4proj then everything is right. I am curious what is the max path length when everything works fine.

I believe Visual Studio has a 260 character limit, but I don’t think you were over that. The path you mentioned is also very similar to the paths in my own projects which do not see this issue happening. Once the developers return after the holiday break I will see if anyone has any thoughts about what may be causing this issue for you.

yeah i have the same problem can u help me ?

Sorry to necro. I’m trying every possible solution in every thread I can find on my issues. Though this didn’t work for me, it might work for someone else. I think the character limit issue (confirmed 260, though some sites suggest 259 - also found one that said 256) is an interesting thought, and I found a tool that helps with this process so you don’t have to manually count them. I’m sure others have thought of this (especially all of you Twitter users out there), but here you go: https://www.lettercount.com/

it works ! Thank you ! :+1: :+1: :+1: