2 Replies - 2849 Views - Last Post: 18 February 2013 - 06:51 AM

#1 bboyzeez  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 143
  • Joined: 16-December 12

massive error when importing a image into xna

Posted 17 February 2013 - 06:10 AM

hi all , normally i dont have a problem with importing images into xna , but i have made my own in photoshop and now i get this error when i try to run program

Error 1 Building content threw TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.Xna.Framework.Content.Pipeline.CommonhelperFunctions.InitD3D()
at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.InitD3D()
at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.Import(String filename, ContentImporterContext context)
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..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: Exception: Cannot create D3D DeviceD3DERR_NOTAVAILABLE.
at Microsoft.Xna.Framework.Content.Pipeline.Interop.RefDevice..ctor()
at Microsoft.Xna.Framework.Content.Pipeline.Interop.RefDeviceCache.GetCachedDevice()
at Microsoft.Xna.Framework.Content.Pipeline.Interop.RefDevice..ctor() C:\Users\Aaron\Documents\Visual Studio 2010\Projects\HeliAttack\HeliAttack\HeliAttackContent\images\menu1.png HeliAttack


any ideas as to what is happening here? have i made the image wrong in photoshop?

Is This A Good Question/Topic? 0
  • +

Replies To: massive error when importing a image into xna

#2 bboyzeez  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 143
  • Joined: 16-December 12

Re: massive error when importing a image into xna

Posted 17 February 2013 - 06:16 AM

edit: i have just looked and i cannot get any image to get past this not just image i made, i have installed express 2010 on my new laptop and this is where i am getting the errors on my pc this all works perfectly?
Was This Post Helpful? 0
  • +
  • -

#3 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1356
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: massive error when importing a image into xna

Posted 18 February 2013 - 06:51 AM

The real root of the problem is:
Inner exception: Exception: Cannot create D3D DeviceD3DERR_NOTAVAILABLE.

Run a DirectX Diagnostic on your system to ensure that DirectX is installed, and that you have the latest version that your laptop can use, which if it is Windows XP, will be DirectX9.0c.

The run a DirectX Diagnostic, click the start button, then click "Run...". Once the box opens, type 'dxdiag', without the quotes, this will open the DirectX Diagnostic Tool. On there you will find tons of information about your system, including the DirectX Version at the bottom which will look something like DirectX Version: DirectX 9.0c(4.09.0000.0904)

You can find the latest version of DirectX 9.0c here.

Try updating first to see if that fixes the issue. If it doesn't then there is something else we need to dig into.

This post has been edited by Kilorn: 18 February 2013 - 06:51 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1