<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><span>It turns out that assemblygen's usage of </span><span>Microsoft.CSharp.CSharpCodeProvider</span><span> defaulted to the 2.0 runtime.  That was an easy fix to assemblygen/src/main.cs:</span><div><span><br></span></div><span>    </span>Dictionary<string,string> oProvOptions = new Dictionary<string,string>();<br><div><span>    </span><span>oProvOptions.Add ("CompilerVersion", "v3.5");<br></span><span>    </span><span>CodeDomProvider csharp = new Microsoft.CSharp.CSharpCodeProvider(oProvOptions);<br></span></div><div><br><span></span></div><div><span>Now bin/qyoto-qtcore.cs compiles, until it reaches a legitimate error in the code: there are two definitions of WindowsVersion. One is a property, one is a function.  Here's what the generated code looks
 like:</span></div><div><br><span></span></div><div><span>  34254         public new static QSysInfo.WinVersion WindowsVersion {<br>  34255             get {<br>  34256                 return ((QSysInfo.WinVersion)(staticInterceptor.Invoke("WindowsVersion", "WindowsVersion() const", typeof(QSysInfo.WinVersion), false)));<br>  34257             }<br>  34258         }<br>  34259         <br>  34260         protected new void CreateProxy() {<br>  34261             this.interceptor = new
 SmokeInvocation(typeof(QSysInfo), this);<br>  34262         }<br>  34263         <br>  34264         [SmokeMethod("windowsVersion()")]<br>  34265         public static QSysInfo.WinVersion WindowsVersion() {<br>  34266             object[] smokeArgs = new object[0];<br>  34267             return ((QSysInfo.WinVersion)(staticInterceptor.Invoke("windowsVersion", "windowsVersion()", typeof(QSysInfo.WinVersion), false, smokeArgs)));<br>  34268         }<br></span></div><div><br></div><div>As you can see, line 34254 defines a property called WindowsVersion, and line 34265 defines a function called
 WindowsVersion.</div><div><br></div><div>Dimitar, did you run into this?</div><div><br></div><div>Steven Boswell</div><div><br></div>  <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight: bold;">From:</span></b> Steven Boswell II <ulatekh@yahoo.com><br> <b><span style="font-weight: bold;">To:</span></b> Dimitar Dobrev <dpldobrev@yahoo.com>; KDE bindings for other programming languages <kde-bindings@kde.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, December 14, 2011 7:40 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Kde-bindings] Building "assemblies" branch of assemblygen under Windows<br> </font> <br>
<div id="yiv1821688841"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: times new roman,new york,times,serif; font-size: 12pt;"><div><span>I looked at all the generated executables and DLLs with Dependency Walker; it said all of them were built for x86.  The issue is that the assemblygen executable is being built with the default value for /platform, which is "anycpu".  I hacked lines 166 and 268 of cmake/modules/CMakeCSharpInformation.cmake to add "/platform:x86" and got past this.<br></span></div><div><br><span></span></div><div><span>Now assemblygen runs, the Q_PROPERTY strings aren't garbage, and the code generated looks OK...but the C# compiler dies with what appears to be bogus errors:</span></div><div><br></div><div>[...]</div><br> </div></div></div></div> </div>  </div></body></html>