Can you convert the project from OpenGL to DirectX and back again? Need it to port to both xbox and linux.
SOLUTION
When I first added all projects at once I got some weird problem with the app manifest. Creating it in this order was the only thing that worked for me.
- Created a Windows 10 Universial project
-I named the solution “MyGame”, and then renamed the project “MyGameDX”
-Added a simple Hello world code to try out.
-
Right click the solution and add project type “SharedProject”
-Named it “MyGameSharedProject” -
Added MyGameSharedProject to MyGameDX references.
-
Moved “Game1.cs” and the Content folder to the shared project.
-
Open MyGameSharedProject\MyGameSharedProject.projitems with a text editor.
Change
<None Include="$(MSBuildThisFileDirectory)Content\Content.mgcb" />
to
<None Include="$(MonoGameContentReference)Content\Content.mgcb" />
-
Open MyGameDX.csproj with a text editor. I added this after another ItemGroup.
<ItemGroup>
<MonoGameContentReference Include="..\MyGameSharedProject\Content\Content.mgcb" />
</ItemGroup>
The visual studio should update your MyGameDX project with a little reference icon to Content.
-Running the project should work now.
-
Right click the solution and add project type “Monogame Cross Platform”. Named it “MyGameGL”.
-
In solution properties, changed StartUp project to MyGameGL.
-
Removed “Game1.cs” and the Content folder from the GL project.
-
Added MyGameSharedProject to MyGameGL references.
-
Open MyGameGL.csproj with a text editor. I changed the content path
<MonoGameContentReference Include="Content\Content.mgcb" />
to
<MonoGameContentReference Include="..\MyGameSharedProject\Content\Content.mgcb" />
-
Had to add “using MyGame;” in the Program.cs
-Running the project should work again. (I suggest you immedietly select the other project and try run that again)