| 1 | == Metadata file could not be found == |
| 2 | |
| 3 | When you get the following compilation error: |
| 4 | {{{ |
| 5 | error: Metadata file "System.Xml.Linq.dll" could not be found |
| 6 | }}} |
| 7 | |
| 8 | This can be a mismatch between .NET versions, such as the version Cobra is running on vs. the version the DLL in question was written against. The current solution is to explicitly point to the appropriate back-end C# compiler. Suppose you are accessing a .NET 3.5 DLL, the solution might then be one of these: |
| 9 | {{{ |
| 10 | cobra -c -d -native-compiler:C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe foo.cobra |
| 11 | cobra -c -d -native-compiler:C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe foo.cobra |
| 12 | }}} |
| 13 | |
| 14 | == Cannot locate assembly reference "Foo.dll' == |
| 15 | |
| 16 | When you get the following compilation error: |
| 17 | {{{ |
| 18 | Cannot locate assembly reference "Foo.dll" |
| 19 | }}} |
| 20 | |
| 21 | This can be that the library "Foo.dll" does exist, but is referencing another library that it needs. This error report needs improving. In the meantime, you can get additional information by passing a flag to the Cobra compiler: |
| 22 | {{{ |
| 23 | cobra -verbosity-ref:1 ... |
| 24 | }}} |