Athari / XnaConvert

Utility for converting XNA XNB files (Texture2D to PNG images) [New BSD]
Other
48 stars 13 forks source link

help me (ContentLoadException) #1

Closed darkhero189 closed 10 years ago

darkhero189 commented 10 years ago

Can you help me

Application: XNB Exporter.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.Xna.Framework.Content.ContentLoadException
Stack:
   at Microsoft.Xna.Framework.Content.ContentReader.PrepareStream(System.IO.Stream, System.String, Int32 ByRef)
   at Microsoft.Xna.Framework.Content.ContentReader.Create(Microsoft.Xna.Framework.Content.ContentManager, System.IO.Stream, System.String, System.Action`1<System.IDisposable>)
   at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String, System.Action`1<System.IDisposable>)
   at Microsoft.Xna.Framework.Content.ContentManager.Load[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String)
   at XNBExport.ExportGame.LoadContent()
   at Microsoft.Xna.Framework.Game.Initialize()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean)
   at XNBExport.Form1.<button1_Click>b__0(System.Object)
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart(System.Object)
Athari commented 10 years ago

Please provide enough information to reproduce the case. What file are you loading? What command line do you use?

darkhero189 commented 10 years ago

Dear you, i'm using and get errors, can you help me?

G:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>cd E:\Microsoft\Winphone8
\Soft\alba.xnaconvert.0.1

G:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>e:

E:\Microsoft\Winphone8\Soft\alba.xnaconvert.0.1>Alba.XnaConvert listlibs --all
Unexpected error!
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the
 requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog
()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(Impor
tDefinition definition)
   at System.ComponentModel.Composition.Hosting.DirectoryCatalog.<>c__DisplayCla
ss3.<GetExports>b__2(ComposablePartCatalog catalog)
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGe
tExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InnerCatal
ogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition a
tomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExports
Core(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExpor
tsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsC
ore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(Expor
tProvider provider, ComposablePart part, ImportDefinition definition, AtomicComp
osition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSub
set(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComp
osition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsSt
ateMachine(PartManager partManager, ComposablePart part)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(P
artManager partManager, ComposablePart part, Boolean shouldTrackImports)
   at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports(Comp
osablePart part)
   at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.<>c
__DisplayClass2.<Compose>b__0()
   at System.ComponentModel.Composition.Hosting.CompositionServices.TryInvoke(Ac
tion action)
   at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Com
pose(CompositionBatch batch)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(Com
positionBatch batch)
   at System.ComponentModel.Composition.AttributedModelServices.ComposeParts(Com
positionContainer container, Object[] attributedParts)
   at Alba.XnaConvert.Program.ComposeContentServices()
   at Alba.XnaConvert.Program.MainInternal(String[] args)
   at Alba.XnaConvert.Program.Main(String[] args)

E:\Microsoft\Winphone8\Soft\alba.xnaconvert.0.1>
Athari commented 10 years ago

Please make sure you have installed all XNA redistributable packages listed in the project's ReadMe file.

darkhero189 commented 10 years ago

Dear Mr Athari, i had installed all XNA redistributable packages listed in the project's ReadMe file (images attach) i had installed in windows 8.1 and winserver 2008 have an same error, Can you help me?

E:\Microsoft\Winphone8\Soft\alba.xnaconvert.0.1>gacutil -i Alba.Framework.dll
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Failure adding assembly to the cache: Attempt to install an assembly without a s
trong name

installed

Athari commented 10 years ago

Please try this version: http://www.mediafire.com/download/zwkqw8p5el9ccwl/Alba.XnaConvert.0.1.1.zip It should give you more sensible error message about what went wrong.

P.S. You don't need to add anything to GAC manually.

darkhero189 commented 10 years ago

Dear Mr Athari, i had get version 0.1.1 and run, i get have an error,

G:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>cd E:\Microsoft\Winphone8
\Soft\Alba.XnaConvert.0.1.1

G:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>e:

E:\Microsoft\Winphone8\Soft\Alba.XnaConvert.0.1.1>Alba.XnaConvert listlibs --all

Failed to load one of plugins.
Unable to load one or more of the requested types. Retrieve the LoaderExceptions
 property for more information. (1: Could not load file or assembly 'Microsoft.X
na.Framework.dll' or one of its dependencies. The specified module could not be
found. 2: Could not load file or assembly 'Microsoft.Xna.Framework.dll' or one o
f its dependencies. The specified module could not be found.)
Detailed exception information:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the
 requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog
()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(Impor
tDefinition definition)
   at System.ComponentModel.Composition.Hosting.DirectoryCatalog.<>c__DisplayCla
ss3.<GetExports>b__2(ComposablePartCatalog catalog)
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGe
tExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InnerCatal
ogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition a
tomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExports
Core(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExpor
tsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsC
ore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(Expor
tProvider provider, ComposablePart part, ImportDefinition definition, AtomicComp
osition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSub
set(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComp
osition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsSt
ateMachine(PartManager partManager, ComposablePart part)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(P
artManager partManager, ComposablePart part, Boolean shouldTrackImports)
   at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports(Comp
osablePart part)
   at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.<>c
__DisplayClass2.<Compose>b__0()
   at System.ComponentModel.Composition.Hosting.CompositionServices.TryInvoke(Ac
tion action)
   at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Com
pose(CompositionBatch batch)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(Com
positionBatch batch)
   at System.ComponentModel.Composition.AttributedModelServices.ComposeParts(Com
positionContainer container, Object[] attributedParts)
   at Alba.XnaConvert.Program.ComposeContentServices()
   at Alba.XnaConvert.Program.MainInternal(String[] args)
   at Alba.XnaConvert.Program.Main(String[] args)
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Xna.
Framework.dll' or one of its dependencies. The specified module could not be fou
nd.
File name: 'Microsoft.Xna.Framework.dll'

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Xna.
Framework.dll' or one of its dependencies. The specified module could not be fou
nd.
File name: 'Microsoft.Xna.Framework.dll'

E:\Microsoft\Winphone8\Soft\Alba.XnaConvert.0.1.1>Alba.XnaConvert convert -v 4 -
d "D:\Input" -o "D:\Output"
Failed to load one of plugins.
Unable to load one or more of the requested types. Retrieve the LoaderExceptions
 property for more information. (1: Could not load file or assembly 'Microsoft.X
na.Framework.dll' or one of its dependencies. The specified module could not be
found. 2: Could not load file or assembly 'Microsoft.Xna.Framework.dll' or one o
f its dependencies. The specified module could not be found.)
Detailed exception information:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the
 requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog
()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(Impor
tDefinition definition)
   at System.ComponentModel.Composition.Hosting.DirectoryCatalog.<>c__DisplayCla
ss3.<GetExports>b__2(ComposablePartCatalog catalog)
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGe
tExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InnerCatal
ogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition a
tomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExports
Core(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExpor
tsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsC
ore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(Expor
tProvider provider, ComposablePart part, ImportDefinition definition, AtomicComp
osition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSub
set(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComp
osition)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsSt
ateMachine(PartManager partManager, ComposablePart part)
   at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(P
artManager partManager, ComposablePart part, Boolean shouldTrackImports)
   at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports(Comp
osablePart part)
   at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.<>c
__DisplayClass2.<Compose>b__0()
   at System.ComponentModel.Composition.Hosting.CompositionServices.TryInvoke(Ac
tion action)
   at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Com
pose(CompositionBatch batch)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(Com
positionBatch batch)
   at System.ComponentModel.Composition.AttributedModelServices.ComposeParts(Com
positionContainer container, Object[] attributedParts)
   at Alba.XnaConvert.Program.ComposeContentServices()
   at Alba.XnaConvert.Program.MainInternal(String[] args)
   at Alba.XnaConvert.Program.Main(String[] args)
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Xna.
Framework.dll' or one of its dependencies. The specified module could not be fou
nd.
File name: 'Microsoft.Xna.Framework.dll'

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Xna.
Framework.dll' or one of its dependencies. The specified module could not be fou
nd.
File name: 'Microsoft.Xna.Framework.dll'
darkhero189 commented 10 years ago

and i have seen version of Microsoft.Xna.Framework.dll, detail in attach file Can you help me? microsoft xna folders microsoft xna framework dll

darkhero189 commented 10 years ago

Can you help me, Mr Athari? I'm using 64 bit process

Athari commented 10 years ago

That's weird. Just a bare FileNotFoundException without any stack or inner exceptions or even a fully qualified assembly name...

Do any XNA games work? What happens if you specify a different XNA version on the command line?

darkhero189 commented 10 years ago

Hi Athari, I try download source code from this site and debug it, I had an exception from this function

private void ComposeContentServices ()
        {
            new CompositionContainer(new DirectoryCatalog(".", "Alba.XnaConvert.Loader.*.dll")).ComposeParts(this);
        }
Athari commented 10 years ago

It's the same exception. No need to copy-paste it every time. Please answer my questions above.

darkhero189 commented 10 years ago

Dear Mr Athari, im using visual studio 2012, create xna game studio 4, all running, i run projects over emulator WVGA 512

Can you help me?

Athari commented 10 years ago

I need answers to these questions: https://github.com/Athari/XnaConvert/issues/1#issuecomment-31022747

darkhero189 commented 10 years ago

i don't understand your questions 1, can you tell detail for me?

Athari commented 10 years ago

Considering you're extracting XNA resources, you have an XNA game installed. Does it work?

darkhero189 commented 10 years ago

Can you send for me your email, i will send for you my projects, Thanks Athari

Athari commented 10 years ago

I can't help you if you don't provide the necessary information. Apparently there's a problem with your XNA installation which isn't directly related to XnaConvert utility. You can try googling for "FileNotFoundException Could not load file or assembly Microsoft.Xna.Framework" and trying the suggested solutions.