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
Failed to locate assembly error on serialization
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="d-fader" data-source="post: 287389" data-attributes="member: 25116"><p>Hi people,</p><p></p><p>I'm working on an improvement of the Global Search plug-in, but I got stuck on the serialization part of the configuration. I'm trying to read and write it to a file on disk, but it doesn't work. Searching this forum, I found the following thread which describes the *precise* problem I have. The last message in the thread states that the original poster should cross-check it with another post, but when I click that, I come to a page in German that has nothing to do with serialization (I think).</p><p></p><p>Here's the original thread: <a href="https://forum.team-mediaportal.com/plugins-47/error-failed-locate-assembly-560/" target="_blank">https://forum.team-mediaportal.com/plugins-47/error-failed-locate-assembly-560/</a>.</p><p></p><p>Here's the code I try to execute which fails:</p><p></p><p>[code]</p><p> public bool LoadFromFile(string filename)</p><p> {</p><p> try</p><p> {</p><p> XmlSerializer serializer = new XmlSerializer(typeof(GlobalSearchSettings));</p><p> TextReader reader = new StreamReader(filename);</p><p> [b]globalSearchSettings = (GlobalSearchSettings)serializer.Deserialize(reader);[/b]</p><p> reader.Close();</p><p> return true;</p><p></p><p> }</p><p> catch (Exception e)</p><p> {</p><p> return false;</p><p> }</p><p> }</p><p>[/code]</p><p></p><p>Here's the error message I get when this is executed (the bold line triggers the error):</p><p><img src="http://www.tagpulse.nl/GlobalSearchSettings_LoadError.gif" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p></p><p>My questions:</p><p></p><p>1. Can someone help me getting this to work?</p><p>2. If not, can someone check if the 'cross-check' link is correct and if so, what it means?</p><p>3. Why the heck <strong>DOES</strong> this work when I run it in a normal Windows Application (!!!!) ?</p><p></p><p></p><p><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /></p><p></p><p></p><p>grtz,</p><p>d-fader</p><p></p><p>Hmm, I built GlobalSearch with the SVN tag for version 1.0 RC2 and now it seems to work. I used to build with some trunk version of 0.2.3, can anyone tell me what was wrong with that version? thnx.</p></blockquote><p></p>
[QUOTE="d-fader, post: 287389, member: 25116"] Hi people, I'm working on an improvement of the Global Search plug-in, but I got stuck on the serialization part of the configuration. I'm trying to read and write it to a file on disk, but it doesn't work. Searching this forum, I found the following thread which describes the *precise* problem I have. The last message in the thread states that the original poster should cross-check it with another post, but when I click that, I come to a page in German that has nothing to do with serialization (I think). Here's the original thread: [URL="https://forum.team-mediaportal.com/plugins-47/error-failed-locate-assembly-560/"]https://forum.team-mediaportal.com/plugins-47/error-failed-locate-assembly-560/[/URL]. Here's the code I try to execute which fails: [code] public bool LoadFromFile(string filename) { try { XmlSerializer serializer = new XmlSerializer(typeof(GlobalSearchSettings)); TextReader reader = new StreamReader(filename); [b]globalSearchSettings = (GlobalSearchSettings)serializer.Deserialize(reader);[/b] reader.Close(); return true; } catch (Exception e) { return false; } } [/code] Here's the error message I get when this is executed (the bold line triggers the error): [IMG]http://www.tagpulse.nl/GlobalSearchSettings_LoadError.gif[/IMG] My questions: 1. Can someone help me getting this to work? 2. If not, can someone check if the 'cross-check' link is correct and if so, what it means? 3. Why the heck [b]DOES[/b] this work when I run it in a normal Windows Application (!!!!) ? :thx: grtz, d-fader Hmm, I built GlobalSearch with the SVN tag for version 1.0 RC2 and now it seems to work. I used to build with some trunk version of 0.2.3, can anyone tell me what was wrong with that version? thnx. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Failed to locate assembly error on serialization
Contact us
RSS
Top
Bottom