This project has moved and is read-only. For the latest updates, please go here.

The type or namespace name 'Farseer' could not be found - help

Topics: Developer Forum, User Forum
Jan 8, 2012 at 8:07 PM
Edited Jan 8, 2012 at 8:08 PM


Having a bit of a nightmare with a basic hello world tutorial that just spawns a box and lets it drop to the floor. I'm running VS2010 Pro at work and have an express edition at home and both have the same symptoms.

I downloaded NuGet and downloaded Farseer and added the references as required but keep getting errors. Here are a couple of screenshots of the error followed by the text logging:  || Error message || Resource tree list

Error 1 Building content threw FileNotFoundException: Could not load file or assembly 'System.Xml, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable)
at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit)
at System.RuntimeType.IsDefined(Type attributeType, Boolean inherit)
at Microsoft.Xna.Framework.Content.Pipeline.TypeScanner.<GetEnumerator>d__0.MoveNext()
at Microsoft.Xna.Framework.Content.Pipeline.TypeHandlerFactory`1.Initialize()
at Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.IntermediateSerializer..ctor()
at Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.IntermediateSerializer.get_SingletonInstance()
at Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.IntermediateSerializer.Serialize[T](XmlWriter output, T value, String referenceRelocationPath)
at Microsoft.Xna.Framework.Content.Pipeline.BuildItemCollection.Save(String filename)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.Dispose()
 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) C:\Users\<NULL>\Documents\dev\WindowsPhone7\Games\XXXXX\XXXXX\XXXXXContent\packages.config XXXXX

It' probably something really simple but then that's the reason I'm doing tutorials :) Thanks for your time.



Jan 8, 2012 at 8:33 PM

Just sorted this out myself actually. Checked all the other libraries properties in solution explorer and they were set as follows:

Copy Local: False

FarSeerPhysicsXNAWP7 was set as:

Copy Local: True

Changed it and it seems to be working now.