Run on Windows Phone 7?

Nov 28, 2010 at 4:58 AM
Edited Nov 28, 2010 at 5:57 AM

What's the best and easiest way to get Farseer to run on Windows Phone 7? I tried downloading the class library but it wouldn't compile saying the namespace FarseerPhysics could not be found.

 

These are some warnings I get:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3268: The primary reference "E:\proj\mobile\Engine\Farseer Physics Engine 3.1 Classlibrary\bin\Debug\FarseerPhysics.dll" could not be resolved because it has an indirect dependency on the framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0,Profile=Client". To resolve this problem, either remove the reference "E:\proj\mobile\Engine\Farseer Physics Engine 3.1 Classlibrary\bin\Debug\FarseerPhysics.dll" or retarget your application to a framework version which contains "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3268: The primary reference "E:\proj\mobile\Engine\Farseer Physics Engine 3.1 Classlibrary\bin\Debug\FarseerPhysics.dll" could not be resolved because it has an indirect dependency on the framework assembly "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0,Profile=Client". To resolve this problem, either remove the reference "E:\proj\mobile\Engine\Farseer Physics Engine 3.1 Classlibrary\bin\Debug\FarseerPhysics.dll" or retarget your application to a framework version which contains "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3268: The primary reference "E:\proj\mobile\Engine\Farseer Physics Engine 3.1 Classlibrary\bin\Debug\FarseerPhysics.dll" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0,Profile=Client". To resolve this problem, either remove the reference "E:\proj\mobile\Engine\Farseer Physics Engine 3.1 Classlibrary\bin\Debug\FarseerPhysics.dll" or retarget your application to a framework version which contains "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3268: The primary reference "E:\proj\mobile\Engine\Farseer Physics Engine 3.1 Classlibrary\bin\Debug\FarseerPhysics.dll" could not be resolved because it has an indirect dependency on the framework assembly "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0,Profile=Client". To resolve this problem, either remove the reference "E:\proj\mobile\Engine\Farseer Physics Engine 3.1 Classlibrary\bin\Debug\FarseerPhysics.dll" or retarget your application to a framework version which contains "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

Nov 28, 2010 at 5:31 AM

Use this, not only is it easy to implement (for Silverlight) it performs a whole heck of a lot better than my port I did of 3.1.  

http://physicshelper.codeplex.com/

Nov 28, 2010 at 5:58 AM
Intrawebs wrote:

Use this, not only is it easy to implement (for Silverlight) it performs a whole heck of a lot better than my port I did of 3.1.  

http://physicshelper.codeplex.com/

Does that support XNA?

Coordinator
Nov 28, 2010 at 5:54 PM

In Visual Studio you can rightclick the XNA version of FPE and convert it to a WP7 project. Farseer Physics Engine 3.2 will have official support for WP7.

Nov 29, 2010 at 12:11 AM
Genbox wrote:

In Visual Studio you can rightclick the XNA version of FPE and convert it to a WP7 project. Farseer Physics Engine 3.2 will have official support for WP7.

That's great news to here! I'll probably wait until 3.2 then :)

Coordinator
Nov 29, 2010 at 12:58 AM

It will take some time as we have quite a bunch of features in the works. You could download the latest source control changeset once we get good WP7 support into the engine if you need it in the near future. You can keep up with the latest updates by joining our Facebook group.

Have in mind that FPE does work on WP7 at the moment, but we don't have any samples, documentation, debugview or anything like that. If you just need the engine and can manage everything else by yourself, then you are basically good to go.

Nov 30, 2010 at 5:24 PM
Genbox wrote:

Have in mind that FPE does work on WP7 at the moment, but we don't have any samples, documentation, debugview or anything like that. If you just need the engine and can manage everything else by yourself, then you are basically good to go.

 

Oh well in that case how do I set it up to run with WP7? You mentioned that I can right click on FPE and convert it to a WP7 project, but I tried right clicking on it and didn't know what to click on to make that change happen?

Coordinator
Nov 30, 2010 at 5:31 PM

Make sure you have all the dependencies installed. Then you need to download the XNA version of the FPE 3.1 project. Once you have loaded the project, you rightclick the SimpleSamplesXNA project and choose "Create copy of project for Windows Phone". Once the new projects are created, you rightclick on the new WP7 project and choose "Set as startup project". Press CTRL + F5 and it should start up on your WP7 if you have it connected and unlocked.

Nov 30, 2010 at 5:45 PM
Genbox wrote:

Make sure you have all the dependencies installed. Then you need to download the XNA version of the FPE 3.1 project. Once you have loaded the project, you rightclick the SimpleSamplesXNA project and choose "Create copy of project for Windows Phone". Once the new projects are created, you rightclick on the new WP7 project and choose "Set as startup project". Press CTRL + F5 and it should start up on your WP7 if you have it connected and unlocked.

Sorry for being such a dolt but I'm not sure what you mean by installing dependencies (your link didn't help?). I did manage to convert it and get it running for WP7 though so I probably have them installed ^_^ I don't have time to test it on a handset/emulator right now but I'll be sure to try later on when I have the chance.

Thanks for the help!

Coordinator
Nov 30, 2010 at 6:44 PM

There is a list of system requirements to the right. You need the dependencies listed installed - but as you mentioned, you probably already have them installed if it worked.