home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Error: Failed to locate assembly
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="FredP42" data-source="post: 414578" data-attributes="member: 91354"><p>I had the same issue, and I finally found the solution in the code of the OnlineVideos plugin.</p><p></p><p>XXX is the serialize type.</p><p>[CODE]</p><p>XXX ReadSettings()</p><p>{</p><p> XXX myobj = null;</p><p></p><p> AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;</p><p> using (FileStream tr = new FileStream(file, FileMode.Open))</p><p> {</p><p> XmlSerializer xml = new XmlSerializer(typeof(XXX));</p><p> myobj = (XXX)xml.Deserialize(tr);</p><p> }</p><p> AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve;</p><p></p><p> return myobj;</p><p>}</p><p></p><p>System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)</p><p>{</p><p> foreach (System.Reflection.Assembly asm in AppDomain.CurrentDomain.GetAssemblies())</p><p> {</p><p> if (asm.FullName == args.Name)</p><p> return asm;</p><p> }</p><p> return null;</p><p>}[/CODE]</p><p></p><p>And then you have to use the sgen.exe tools (located in the .NET SDK directory C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin) to create an XML serialization assembly for your types.</p></blockquote><p></p>
[QUOTE="FredP42, post: 414578, member: 91354"] I had the same issue, and I finally found the solution in the code of the OnlineVideos plugin. XXX is the serialize type. [CODE] XXX ReadSettings() { XXX myobj = null; AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; using (FileStream tr = new FileStream(file, FileMode.Open)) { XmlSerializer xml = new XmlSerializer(typeof(XXX)); myobj = (XXX)xml.Deserialize(tr); } AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve; return myobj; } System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) { foreach (System.Reflection.Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) { if (asm.FullName == args.Name) return asm; } return null; }[/CODE] And then you have to use the sgen.exe tools (located in the .NET SDK directory C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin) to create an XML serialization assembly for your types. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Error: Failed to locate assembly
Contact us
RSS
Top
Bottom