{"id":58,"date":"2007-06-27T04:41:09","date_gmt":"2007-06-27T04:41:09","guid":{"rendered":"http:\/\/www.dereckson.be\/blog\/2007\/06\/27\/compile-bugzproxy-with-microsoft-net-framework\/"},"modified":"2007-06-27T04:41:09","modified_gmt":"2007-06-27T04:41:09","slug":"compile-bugzproxy-with-microsoft-net-framework","status":"publish","type":"post","link":"https:\/\/www.dereckson.be\/blog\/2007\/06\/27\/compile-bugzproxy-with-microsoft-net-framework\/","title":{"rendered":"Compile bugzproxy with Microsoft .Net framework"},"content":{"rendered":"<p>bugzproxy, a C# based assembly that provides access to a Bugzilla server, is coded under linux and is designed to work with Mono.<\/p>\n<p>It seems Mono is less strict than specifications or Microsoft implementation.<\/p>\n<p>So here some modifications to compile it.<\/p>\n<p><!--more--><\/p>\n<h2>Structures initialization<\/h2>\n<p>In Microsoft .Net standard specification, <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/saxz13w4.aspx\" hreflang=\"en\">the structures must be initialized<\/a>.<\/p>\n<p>The difference initializing a struct instead a class is you can omit the keyword new.<\/p>\n<p>Based on CVS version, the 2 struct to initialize are in Bugzilla.server.cs, at lines 271 and 420:<\/p>\n<pre>LoginParam param = new LoginParam(); CreateBugParam param = new CreateBugParam();<\/pre>\n<p>Now, that&#8217;s compile \ud83d\ude42<\/p>\n<h2>Interface accessibility<\/h2>\n<p>Well, that&#8217;s compile but when you&#8217;ll create another project, add a reference to bugzproxy, run you application and initializes Server object, a strange exception will be thrown.<\/p>\n<p>The Problem is the IProxy interface is internal.<\/p>\n<p> <code>bugzillaProxy = XmlRpcProxyGen.Create<IProxy>();<\/code> <\/p>\n<p>This instruction is executed in Server() constructor, called from external assembly. So, .Net framework throws a type not accessible exception.<\/p>\n<p>Solution: s\/internal\/public<\/p>\n<pre>public interface IProxy : IXmlRpcProxy {<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>bugzproxy, a C# based assembly that provides access to a Bugzilla server, is coded under linux and is designed to work with Mono.<\/p>\n<p>It seems Mono is less strict than specifications or Microsoft implementation.<\/p>\n<p>So here some modifications to compile it.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[3],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","tag-csharp"],"_links":{"self":[{"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":0,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dereckson.be\/blog\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}