97 | | .NET is in theory system-independent, and .NET applications can be deployed under Unix, Linux, MacOS, etc using runtime environments such as [http://www.mono-project.com/Main_Page Mono]. However, not all .NET features work under Mono, most notably the Microsoft.!VisualBasic assembly. This can prove problematic since every Visual Basic project by default receives a reference to this assembly. |
| 99 | .NET is in theory system-independent, and .NET applications can be deployed under Unix, Linux, MacOS, etc using runtime environments such as [http://www.mono-project.com/Main_Page Mono]. However, not all .NET features work under Mono, most notably the Microsoft.!VisualBasic assembly. When you start a new project in Visual Studio, it is immediately provided with a reference to this assembly. Aargh. You will have to take that away: |
99 | | In EwE we have worked around this problem by redefining key types and constants from the Microsoft.!VisualBasic assembly in [http://webservice.ecopath.org/Ecopath/Help/Index.aspx EwEUtils]. You should not use Chr, Asc, IIF, !TriState, !MsgBox, UBound, !InStr, vbTab, vbCrLF and a whole whack of other old and familiar constructs if you wish your application to run on any other OS than Windows. |
| 101 | * Right-click your project in the Solution Explorer and select 'Properties' |
| 102 | * In the References tab, clear the check beside Microsoft.VisualBasic in the 'Imported Namespaces' |
| 103 | |
| 104 | Done. |
| 105 | |
| 106 | Now, your code may require some of the handy-dandy bits that this assembly provided. We redefined some of the key types and constants from the Microsoft.!VisualBasic assembly in [http://webservice.ecopath.org/Ecopath/Help/Index.aspx EwEUtils]. We did not copy all of 'em, some good .NET equivalents exist for outdated VB6-derived contraptions such as string manipulation functions and file interactions. You should not use Chr, Asc, IIF, !TriState, !MsgBox, UBound, !InStr, vbTab, vbCrLF and a whole whack of other old and familiar constructs if you wish your application to run on any other OS than Windows. |