Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloned in windows 8, opened up Samples-WindowsDX in VS 2013, installed nuget packages in PMC, and it doesn't compile! #29

Closed
lnaie opened this issue Sep 17, 2014 · 16 comments

Comments

@lnaie
Copy link

lnaie commented Sep 17, 2014

Hi,

As the title says. Also I see broken links in Content folder of VS project.
Is there something I'm missing? I thought this is gonna work with nuget packages as well.

Thx

@SimonDarksideJ
Copy link
Collaborator

You need to build the content project FIRST before running the platforms.
Else content (.xnb's) won't be available.

Were also looking to update the content side from the legacy content projects to the new MG content builder at some point soon, which should make this easier,

@Briix
Copy link

Briix commented Nov 11, 2014

When I try to open Samples-Content.sln it gives me this error http://cl.ly/YSgO and tells me that the project type is not supported by Xamarin Studio. I'm probably doing something wrong, but I'm not sure what?

@SimonDarksideJ
Copy link
Collaborator

Not sure what the status is for opening xna content projects using Xamarin Studio at present.

Although I do have an outstanding task to update the content projects to the new MG content builder.

@LogonDev
Copy link

LogonDev commented Dec 1, 2014

I've looked at all the threads, issues, and tryed looking everywhere and to be honest Im now more confused than when I started.

"You need to build the content project FIRST before running the platforms.
Else content (.xnb's) won't be available."

Could someone please explain to me step by step how to do this. Do I need to use the monogame project builder. If so where do I get this. If I have to open a .csproj which one do I open.

Also it would be VERY HELP FULL if you included instructions with the download,

@SimonDarksideJ
Copy link
Collaborator

Fair point @Logon13 We have discussed about documentation for a while on the starter projects but time being what it is, we haven't gotten round to it yet.

In short the steps necessary to build are:

  • Open Samples-Content.sln and build it for your target platform
  • Open Samples-.sln for the project you want to run / play with
  • Run it!

All the code for ALL platforms are in the <Game folder as the code is shared across all platforms
Platform specific code / deliverables are in \Platforms folder - mostly required assets and .csproj files

The samples don't yet use the new content tool but they will soon

Hope this helps

@SimonDarksideJ
Copy link
Collaborator

A PR has been submitted to update all samples to use the new MGCB tool, so it's more like the XNA days of old now with a single content reference (instead of linked / copied asset files)

@AaronLS
Copy link

AaronLS commented Dec 20, 2014

@DDReaper I am trying to follow your suggestion, but I do not see a Samples-Content.sln:
https://github.com/Mono-Game/MonoGame.Samples

I've tried both the DX and OpenGL Windows projects and they cannot find "C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Content.Builder.targets". I have MonoGame v3.0.1 installed, since that's the newest version of 3.0 which it appears to be looking for, but there is no such file installed.

I've tried to find a starting point to get up and running, but the MonoGame documentation for "Getting Started" is just links to downloads, and it seems the tutorials I find via Google are out of date.

Any other suggestions?

@SimonDarksideJ
Copy link
Collaborator

:D, if you check this post http://darkgenesis.zenithmoon.com/all-hail-the-old-and-the-newthe-monogame-content-builder-tool/ we recently updated the project to the new content builder tool (MGCB) so the samples-content project is gone.

Download the latest dev build installer from http://www.monogame.net/downloads/ for your platform and just open the projects.
When you build the content will automatically get compiled for your given platform

Hope this helps.

@AaronLS
Copy link

AaronLS commented Dec 20, 2014

@DDReaper MGCB is crashing. I tried on another machine that has never had monogame on it just to rule out interferance from the previous install. Using VS 2013:

  1. Installed: http://teamcity.monogame.net/repository/download/MonoGame_DevelopWin/latest.lastSuccessful/Windows/MonoGameInstaller-3.2.exe?guest=1

  2. Went to MonoGame.Samples and clicked "Download Zip" button. The default branch selected was "develop". Unzipped and opened the *-GL and built, and get "MGCB has stopped working" error, but it doesn't handle/display the exception so not sure what went wrong. The build output says "exited with code -532462766". Same issue with the -DX project.

  3. I tried downloading the zip for the "master" branch.

Opened Samples-WindowsGL project. There was no MonoGame reference, so to correct the first batch of errors I added a reference to C:\Program Files (x86)\MonoGame\v3.0\Assemblies\WindowsGL\MonoGame.Framework.dll

FYI I noticed the project sees the same DLL in the packges folder first because of the rules .NET uses to find the DLL, which might be an issue if the nuget package is older than the MonoGame develop build:
\MonoGame.Samples-master\MonoGame.Samples-master\packages\MonoGame.Binaries.3.2.0\build\net40\MonoGame.Framework.dll

The next build errors indicate a bunch of missing content files:
Could not copy the file "\Downloads\MonoGame.Samples-master\MonoGame.Samples-master\ContentBuilder\bin\Windows\Content\Backgrounds\Layer0_0.xnb" because it was not found. Platformer2D

  1. I suspect I needed to open the Content Project since it's not referenced from the Dx/OpenGL samples. When I open Contentbuilder.csproj it fails to load the projects. This is Professional edition of VS2013 with Update 2 CTP:

Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- ContentBuilder, "C:\Users\ashumaker\Downloads\MonoGame.Samples-master\MonoGame.Samples-master\ContentBuilder\ContentBuilder.csproj"
- Platformer2D, "C:\Users\ashumaker\Downloads\MonoGame.Samples-master\MonoGame.Samples-master\Platformer2D\Content\Platformer2D.contentproj"

No changes required
These projects can be opened in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
- .nuget, ".nuget"
- Samples-Content, "C:\Users\ashumaker\Downloads\MonoGame.Samples-master\MonoGame.Samples-master\Samples-Content.sln"

For now, I will try one of the project templates from scratch, and just use the samples as a code reference. My initial goal is just to get a triangle to render as a starting point :)

@SimonDarksideJ
Copy link
Collaborator

Hmm, building a new machine now to check it out (rather than give the "works on my machine" default answer :D)

Will then submit a better front page readme for the samples of the correct setup.

The MASTER branch is fixed for the 3.2 release, so it still using the orriginal build system. Meaning you have to Open and build the Samples-Content.sln FIRST before opening any of the samples (which platformer is the only one in that branch)

@theZMan
Copy link

theZMan commented Dec 21, 2014

I just build a whole bunch of VMs from scratch to test the installer so I can also test this next week if you need any help. I have a wide range of install + all updates from XP though 8.1 (well 8.1 is almost done...)

@AaronLS
Copy link

AaronLS commented Dec 30, 2014

Since we identified that the unsupported project error is due to a misunderstanding about which samples branch to use with the new pipeline, which will be resolved with update to the readme, then I will open a seperate issue regarding the compile error with the develop branch.

@SimonDarksideJ
Copy link
Collaborator

RIght, managed to find some more time to test on a clean machine and the result is very odd.
Wonder if @tomspilman can shout in on this since it's a content issue.

When you build the packages on a clean built machine I get the following error:
Error 3 The command ""C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe" /@:"C:\Development\MonoGame.Samples\SpaceWar\Content\SpaceWar.mgcb" /platform:Windows /outputDir:"C:\Development\MonoGame.Samples\SpaceWar\Platforms\Windows8\Content\bin\Windows" /intermediateDir:"C:\Development\MonoGame.Samples\SpaceWar\Platforms\Windows8\Content\obj\Windows" /quiet" exited with code -1073741819. SpaceWar
Same error with both Platformer and Spacewar

Any ideas what else I can do to test this further Tom?

@SimonDarksideJ
Copy link
Collaborator

Never mind, found it was a font issue (related to the recent issue about the Pericles font) Changed the font to Arial and it built

@SimonDarksideJ
Copy link
Collaborator

Right, submitted a PR #33 to change the font to Arial to solve the build issue.
Also submitted a new read-me to answer the project building questions with NuGet #34

@SimonDarksideJ
Copy link
Collaborator

Can this issue now be closed @lnaie, sample seems to work fine now.
Also updating it to the new 3.3 release as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants