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="Anonymous" data-source="post: 3133"><p>This is weird. The code runs perfectly if used in an .exe-file or in an assembly which is loaded by other apps - <strong> even MediaPortals runs with it</strong>.</p><p>Only MediaPortals Configuration.exe insists on having failed to locate the assembly (silly enough... :wink: ), so my code obviously is incompatible with something <strong>inside MediaPortals Configuration.exe</strong>.</p><p></p><p>Maybe someone finds the bug in this code snippet.</p><p>Any help is very appreciated!</p><p></p><p>[code]namespace MP2LCD</p><p>{</p><p> [Serializable]</p><p> public class XMLScreens // only there for serializing</p><p> {</p><p> [XmlElement(Type = typeof(TMeeScreenData))]</p><p> public ArrayList Screen; // array of TMeeScreenData</p><p> }</p><p></p><p> public class MP2LCDSetup : ISetupForm</p><p> { </p><p> public void ShowPlugin() </p><p> {</p><p> ConfigureForm cf = new ConfigureForm();</p><p> cf.ShowDialog(); // will get an error</p><p> }</p><p> }</p><p></p><p> public class MP2LCDPlugin : IPlugin</p><p> {</p><p> public void Start() </p><p> {</p><p> ConfigureForm cf = new ConfigureForm();</p><p> cf.ShowDialog(); //will run</p><p> }</p><p> }</p><p></p><p></p><p> public class ConfigForm : System.Windows.Forms.Form</p><p> {</p><p> // ...</p><p></p><p> public ArrayList ScrTyp; // is basically a TMeeScreenData[]</p><p></p><p> public ConfigForm()</p><p> {</p><p> InitializeComponent();</p><p></p><p> int i;</p><p></p><p> XMLScreens s = new XMLScreens();</p><p></p><p> XmlSerializer ser = new XmlSerializer(typeof(XMLScreens));</p><p> TextReader reader = new StreamReader("plugins\\process\\MP2LCD.screens.xml");</p><p> try</p><p> {</p><p> s = (XMLScreens)ser.Deserialize(reader); // fires MediaPortal error message when run by Configuration.exe</p><p></p><p> ScrTyp = s.Screen;</p><p> }</p><p> catch </p><p> {</p><p> ScrTyp.Clear();</p><p> }</p><p> finally</p><p> {</p><p> reader.Close();</p><p> }</p><p> }</p><p> }</p><p>}[/code]</p></blockquote><p></p>
[QUOTE="Anonymous, post: 3133"] This is weird. The code runs perfectly if used in an .exe-file or in an assembly which is loaded by other apps - [b] even MediaPortals runs with it[/b]. Only MediaPortals Configuration.exe insists on having failed to locate the assembly (silly enough... :wink: ), so my code obviously is incompatible with something [b]inside MediaPortals Configuration.exe[/b]. Maybe someone finds the bug in this code snippet. Any help is very appreciated! [code]namespace MP2LCD { [Serializable] public class XMLScreens // only there for serializing { [XmlElement(Type = typeof(TMeeScreenData))] public ArrayList Screen; // array of TMeeScreenData } public class MP2LCDSetup : ISetupForm { public void ShowPlugin() { ConfigureForm cf = new ConfigureForm(); cf.ShowDialog(); // will get an error } } public class MP2LCDPlugin : IPlugin { public void Start() { ConfigureForm cf = new ConfigureForm(); cf.ShowDialog(); //will run } } public class ConfigForm : System.Windows.Forms.Form { // ... public ArrayList ScrTyp; // is basically a TMeeScreenData[] public ConfigForm() { InitializeComponent(); int i; XMLScreens s = new XMLScreens(); XmlSerializer ser = new XmlSerializer(typeof(XMLScreens)); TextReader reader = new StreamReader("plugins\\process\\MP2LCD.screens.xml"); try { s = (XMLScreens)ser.Deserialize(reader); // fires MediaPortal error message when run by Configuration.exe ScrTyp = s.Screen; } catch { ScrTyp.Clear(); } finally { reader.Close(); } } } }[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Error: Failed to locate assembly
Contact us
RSS
Top
Bottom