Download

Example Project Doesn't Have Visual Studio Solution

Hello all,

So I downloaded the Strategy Game example project off of the marketplace but it did not create a Visual Studio Solution for the code.
Is there a way to generate the .sln file for Visual Studio from the Editor without having to add a new source file that will just get deleted later?

Thanks.

Just add a code file to the project and say yes when it ask to edit it, it’s will open the whole solution

Thanks for the quick reply.

I did this and it does work. However, is there a way to generate the solution without having to add a code file?
It’s really not that big of a deal but it does work.

Thanks.

Once you did that a solution file will be in your folder Unreal Projects\StrategyGame\Source

I am pretty sure the solution file should be generate in the root directory of the project.

Just discovered something with what you said, right-click on .uproject file and select “Generate Visual Studio Files”

Adding a code file to the project generates the solution, but “Generate Visual Studio Files” doesn’t seem to do anything for me. Strange.

It seems if a “Source” directory exists with code files (in the case of the example projects off the marketplace), then “Generate Visual Studio Files” works for exactly what I need.
However, if no source files exists, you have to add a new source file (which makes sense anyway).

Thanks for the help everyone.

That’s not the case, for me; I’m trying it with the Strategy Game demo but no dice.

Greetings everyone and thank you for this awesome Engine. My friend got UE4 and we are both discovering it. His english is not good enough, that is why I am speaking of his behalf. Well, it seems we are encountering the same problem as here: https://answers.unrealengine.com/questions/18770/shootergame-strategygame-wont-open-in-an-editor-bu.html: we can not open ShooterGame and StrategyGame and we got the same message: ‘ShooterGameLoadingScreen’ could not be found. Please ensure that this module exists and that it is compiled." After running the RegisterShellCommands.bat as an admin, we got the “Generate Visual Studio Files.” by right clicking on ShooterGame.uproject and StrategyGame.uproject and according to this: https://wiki.unrealengine.com/Generate_Visual_Studio_Project , we should get the sln file of the game and then start the steps that you mentionned. Unfortunately, the VS project wasn’t created "Just above your Strategy Game project, you should see a new file for Visual Studio. Open it up to take a peek at all of the C++ code behind your game! " like how the tutorial indicates. So If we didn’t get the sln file, then we can not continue the following steps to make the project run. Can you please help us? Thanks.

We have the source directory, but when clicking “Generate Visual Studio Files” , nothing happens and the sln file will not be created.

I’m still having problems with this; installing the latest version now, though.

Not a big deal, just inconvenient.

Here’s a very straightforward way to generate your project files. In the folder with your .uproject file, create a .bat file, and make it something like this



call "%~dp0..\..\UnrealEngine\GenerateProjectFiles.bat" "%~dp0StrategyGame.uproject" -Game -Engine
PAUSE


Personally I’m using a relative path for the the .bat file, you’ll probably want to use an absolute path. Also, If you’re just compiling the game code and aren’t modifying the engine code, you can skip adding the “-Engine” parameter.

Good tip, thank you

Note that not all marketplace projects have code - Swing Ninja for example. When you try and generate the code files for these it will complain and fail as these are done in Blueprints not C++. You can however add code to the project by the methods suggested above.

Doing it that way works, for me.

Thanks a lot, bro.

Right-click on the .uproject file, select “Generate Visual Studio Project Files” from the context menu