Closed Alhifar closed 10 years ago
That message means that the program can't load Alba.XnaConvert.Loader.Xna40.dll
. Please make sure that you've extracted all files, not just the main executable file. What happens if you run the following command line?
Alba.XnaConvert listlibs
I believe everything is extracted properly.
C:\xnaconvert>Alba.XnaConvert listlibs Done!
Weird. The program can't load DLLs for some reason.
Alba.XnaConvert.exe.config
in Notepad and replace its contents with the following:<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<system.diagnostics>
<trace autoflush="true" indentsize="4"/>
<sources>
<source name="System.ComponentModel.Composition" switchValue="All">
<listeners>
<add name="fileListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="Composition.log"/>
</listeners>
</source>
</sources>
</system.diagnostics>
</configuration>
Alba.XnaConvert listlibs
.Composition.log
file in the program folder. Open it with Notepad and copy its contents here.System.ComponentModel.Composition Warning: 3 : The catalog 'DirectoryCatalog (Path=".")' could not load assembly 'C:\XNACONVERT\ALBA.XNACONVERT.LOADER.XNA10.DLL'. Could not load file or assembly 'Alba.XnaConvert.Loader.Xna10, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) System.ComponentModel.Composition Warning: 3 : The catalog 'DirectoryCatalog (Path=".")' could not load assembly 'C:\XNACONVERT\ALBA.XNACONVERT.LOADER.XNA20.DLL'. Could not load file or assembly 'Alba.XnaConvert.Loader.Xna20, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) System.ComponentModel.Composition Warning: 3 : The catalog 'DirectoryCatalog (Path=".")' could not load assembly 'C:\XNACONVERT\ALBA.XNACONVERT.LOADER.XNA30.DLL'. Could not load file or assembly 'Alba.XnaConvert.Loader.Xna30, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) System.ComponentModel.Composition Warning: 3 : The catalog 'DirectoryCatalog (Path=".")' could not load assembly 'C:\XNACONVERT\ALBA.XNACONVERT.LOADER.XNA31.DLL'. Could not load file or assembly 'Alba.XnaConvert.Loader.Xna31, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) System.ComponentModel.Composition Warning: 3 : The catalog 'DirectoryCatalog (Path=".")' could not load assembly 'C:\XNACONVERT\ALBA.XNACONVERT.LOADER.XNA40.DLL'. Could not load file or assembly 'Alba.XnaConvert.Loader.Xna40, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
And after a little bit of googling on that error, looks like this is the issue: http://blogs.msdn.com/b/brada/archive/2009/12/11/visual-studio-project-sample-loading-error-assembly-could-not-be-loaded-and-will-be-ignored-could-not-load-file-or-assembly-or-one-of-its-dependencies-operation-is-not-supported-exception-from-hresult-0x80131515.aspx
Worked fine after setting the zip to "unblock" before extracting.
New version of the program will output warnings and errors from MEF to console. However, I have no idea how to programmatically check whether the program is being executed from an "untrusted" location.
For what it's worth, looks like this (http://stackoverflow.com/questions/6375599/looks-this-pinvoke-correct-and-reliable) is a way to get the files unblocked. Not sure what rights that requires to run though.
Looks like IZoneIdentifier
COM interface can be used to both read and write zone information, without relying on implementation details. If that interface works for checking whether the app is being executed from a network path too, that would be great, because that's not the first time I see weird errors because of security. Just deleting the alternate stream won't work I suspect, because that should require the executable itself to be trusted.
How did you get untrusted files? Downloaded files from the Release tab on GitHub using Internet Explorer, then extracted files using Windows Explorer?
I downloaded the files from the release tab on GitHub using Chrome, then extracted them with WinRar.
I'm running Windows 8.1 with .Net 4.5 and all of the XNA Frameworks installed. XNA games are functioning properly. When I try to run "C:\xnaconvert>alba.xnaconvert convert -r -d "F:\Games\Steam Library\SteamApps\co mmon\cthulhu saves the world" -o C:\CthuluFiles", I get "Content loader for 'XNA' with version '4.0' not found." despite having the XNA framework installed.