Windows Phone - Won't Run

Aug 17, 2011 at 3:15 AM
Edited Aug 17, 2011 at 3:17 AM

I'm having a heck of a time getting any xTile project to run in the Windows Phone emulator. My game runs fine on Windows, but the WP emulator just goes back to the home screen when I try to debug it, and there's no errors or output to tell me what's wrong.

I'd really like to see a separate download of the demo project, not as it is in the source with the errors trying to open the solution. If I could just see source for project for WP7 that runs...

Aug 17, 2011 at 8:35 AM

For starters, can you set up a simple WP7 project (no xTile.. just the Cornflower Blue background) and successfully deploy it to your phone?

Next, can you deploy this basic project in debug mode and step or debug break into the source?

If you can get to this point, I think you could then start adding a reference to the xTile assemblies etc. and run in debug mode to see at which point the problem occurs.

 

I realise you might get errors when opening the tIDE/xTile source code due to the source control bindings, but Visual Studio should give you the option to disable or remove these.  Are there other errors beyond these?

Aug 17, 2011 at 12:47 PM

Making a new project gets even more problematic...

New Windows Phone project run -> Cornflower Blue

Add WP xTile and pipeline DLLs, add appropriate references -> Cornflower Blue

Add a new map and image to the content project ->

Error    1    Building content threw Exception: Unable to load map with file path 'c:\users\sean\documents\visual studio 2010\Projects\WindowsPhoneGame2\WindowsPhoneGame2\WindowsPhoneGame2Content\00.tide'
   at xTile.Format.FormatManager.LoadMap(String filePath)
   at xTile.Pipeline.TideImporter.Import(String filename, ContentImporterContext contentImporterContext)
   at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
   at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings)
    Inner exception: NotSupportedException: Specified method is not supported.
       at xTile.Format.TideFormat.Load(Stream stream)
       at xTile.Format.FormatManager.LoadMap(String filePath)    c:\users\sean\documents\visual studio 2010\Projects\WindowsPhoneGame2\WindowsPhoneGame2\WindowsPhoneGame2Content\00.tide    WindowsPhoneGame2

 

Using tIDE 2.0.3 for editing and the latest 2.0.4 library DLLs. Could version incompatibility be a problem?

Aug 17, 2011 at 2:07 PM

I'm looking at this thread, which seems to imply that the problem is something to do with the pipeline reference. Is there a specific folder structure that I need to follow, or does the pipeline DLL need to be somewhere specific? At the moment, I'm putting the two DLLs in a folder called xTile inside the WPGame project.

Aug 17, 2011 at 3:55 PM

Make sure you reference the Pipeline assembly from the Content project (NOT the game project itself).

As soon as I have time I will carry out some tests with v2.0.4. The "method not supported" could indicate an XNA version issue.. for example, I may have released the WP7 engine under WP7 SDK 7.1 instead of 7.0.

Aug 17, 2011 at 3:59 PM

I'm pretty sure I have 7.0 installed on my desktop. I'll try updating to 7.1 tonight.

Aug 17, 2011 at 4:04 PM

The 7.1 is an unintended one off, I don't plan to upgrade xTile WP7 until Mango comes out.

 

If you do install the 7.1 SDK however, Visual Studio will prompt you to chose a version when creating a new WP7 project. Also, if you have existing 7.0 projects, you can right-click on the project and chose an "upgrade to 7.1" option. However, be aware that you cannot revert the upgrade once you do it. Anyhow, it should not be a big deal.. you could simply create a PC or X360 copy of the project from the context menu, delete the WP7 one, and then recreate it (WP7 project copy) with the desired version when prompted.

Aug 18, 2011 at 12:52 AM

Updated to 7.1... Still getting errors...

 

Error    1    Building content threw Exception: Unable to load map with file path 'c:\users\sean\documents\visual studio 2010\Projects\WindowsPhoneGame2\WindowsPhoneGame2\WindowsPhoneGame2Content\Map\00.tide'
   at xTile.Format.FormatManager.LoadMap(String filePath)
   at xTile.Pipeline.TideImporter.Import(String filename, ContentImporterContext contentImporterContext)
   at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
   at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings)
    Inner exception: NotSupportedException: Specified method is not supported.
       at xTile.Format.TideFormat.Load(Stream stream)
       at xTile.Format.FormatManager.LoadMap(String filePath)    c:\users\sean\documents\visual studio 2010\Projects\WindowsPhoneGame2\WindowsPhoneGame2\WindowsPhoneGame2Content\Map\00.tide    WindowsPhoneGame2

Aug 18, 2011 at 5:40 AM

I get the same error in both 7.0 and 7.1 projects for Windows Phone. The DLLs are definitely referenced right.

 

Until the next update, what's the latest confirmed-working version of the library for Windows Phone?

Aug 18, 2011 at 6:31 AM

I got the source to compile and run just fine, so there's something wrong with the way I'm setting up my project.

I took the DLLs compiled by the source and got a blank WP project to run with the references set and got Cornflower Blue. I tried adding the basic map loading code from the 4.0 documentation, and it went back to exiting immediately after running. After commenting out every line I added, it seems like the map instantiation (Map map;) is what makes it crash.

Aug 18, 2011 at 12:44 PM

I got the idea to dump my main project into the DemoGame source, and it works. The problem isn't with my code, at least, but there's still something odd about the DLL location. In the source, the xTile DLL is at /SourceDirectory/xTile/bin/Windows Phone/Debug/xTile.dll. If I try to copy it anywhere else and change the reference accordingly, the emulator does the back-to-home thing when I launch. Again, this is only with Windows Phone. The Windows version doesn't care where the DLLs are. I don't have a current XNA membership, so I can't speak for 360 at the moment.

I can keep working as it is, but this isn't ideal. I know the tutorial says to make a folder in the root of the solution, but that doesn't seem to be possible. Do you know if there's a valid location to put the DLLs in a clean solution?

Aug 18, 2011 at 1:29 PM

As far as I am aware you can put the DLLs as long as they have sufficient access rights. I have yet to do my tests but I'll try to sort it out soon.

Aug 19, 2011 at 2:58 AM

I solved it, finally... Here's how it has to be.

In the project folder, I made a folder called Library. This folder, and EVERYTHING INSIDE, will be EXCLUDED from the Visual Studio project. In the Library folder are different folders for the xTile DLLs. One folder, which I call Pipeline, contains the Windows version of xTile.dll and the pipeline DLL. Reference Windows game project to xTile.dll, reference Content to xTile.Pipeline.dll. I noticed that in the source, the folder that the compiled pipeline DLL was in also contained what appears to be the Windows version of xTile.dll, and the tutorial also puts them in the same folder, so I gave it a shot. In another folder called Windows Phone, I added the Windows Phone version of xTile.dll, and it seems to need to be named xTile.dll. I wanted to name it WPxTile.dll and put it in the same folder as the others, but that doesn't seem to work. Reference the phone project to this particular xTile.dll. It's important that NONE OF THESE FILES are included in Visual Studio. If they show up in the browser, they have to be right-clicked and excluded as having two included files named xTile.dll messes up the reference. So, for reference, this is how your clean project should be set up...

/Project Root/ProjectName/ProjectName/Library/Pipeline/xTile.dll (Windows)
/Project Root/ProjectName/ProjectName/Library/Pipeline/xTile.Pipeline.dll
/Project Root/ProjectName/ProjectName/Library/Windows Phone/xTile.dll (Windows Phone)
/Project Root/ProjectName/ProjectName/Library/Xbox 360/xTile.dll (Xbox 360 - haven't tried this, but guessing it should work the same way)

 

And the result:

 

Aug 19, 2011 at 6:26 PM

I'm glad you found a solution, thanks for sharing this! :)

I suppose the project references would work were it not for the fact that VS Express does not support solution folders. These should otherwise allow you to keep project references to the DLLs for different platforms without causing conflicts. 

Aug 19, 2011 at 11:31 PM

For simplicity's sake, could the downloads page have a sample project with all three platforms configured? Maybe eventually an installable project template?

Sep 6, 2012 at 7:59 AM

I can confirm this solution works for the Xbox 360! Thanks for sharing!

I also think it is a good idea to provide some sort of template for the 3 platforms, and a FAQ containing this sort of solution. We could even help improving the support for this great project.

Aug 15, 2013 at 2:00 PM
Hello Everyone!!

I am new to tIDE and I am having this exception.

Error 1 Building content threw Exception: Unable to load map with file path 'C:\Asma Khalid\Personal\Microsoft\Presentation\XNA and Level or Tile editor\res\tIDE\sample\TileMapLoadSample\TileMapLoadSample\TileMapLoadSampleContent\Maps\Map01.tide'
at xTile.Format.FormatManager.LoadMap(String filePath)
at xTile.Pipeline.TideImporter.Import(String filename, ContentImporterContext contentImporterContext)
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary
2& dependencyTimestamps, KeyValuePair`2[]& warnings)
Inner exception: NotSupportedException: Specified method is not supported.
   at xTile.Format.TideFormat.Load(Stream stream)
   at xTile.Format.FormatManager.LoadMap(String filePath)

I try to build this on WP os 7.1 with VS 2013 and XTiled.dll, xTiled.pileline.dll version 2.0.7.0

They work on VS Express 2010 with PC but not for WP 7.1.

Kindly, let me know the resolution?
Aug 15, 2013 at 8:39 PM
I have resolved this issue. Here is my solution and observation.

xTile.Pipeline.dll file is by default associated with xTile.dll of WinPC so you need to create two folders any where in your project i.e. in folderA place the xTile.Pipeline.dll and its associated xTile.dll of winPC in it. Then, in content reference add only xTile.Pipeline. Then create folderB and place xTile.dll of WP or Xbox in it and add it in the project reference. The issue will be resolved.