February 23, 2014 at 15:51 #3987
I installed the latest MonoBrick image and way able to write an own small application against the MonoBrickFirmware.dll that I downloaded before.
Afterwards I tried to load the latest source code of the firmware and built it myself (the reason was, that I wanted to play WAV files and that seems to be not supported in the binary firmware). Building the firmware worked well and also building my application against the new MonoBrickFirmware.dll.
Then I copied my exe and the new MonoBrickFirmware.dll to /home/root/apps, logged in to EV3 and tried to run it. But it did not work:
root@EV3:~/apps# mono Projekt2.exe
Missing method .ctor in assembly /home/root/apps/MonoBrickFirmware.dll, type System.Runtime.Versioning.TargetFrameworkAttribute
Can’t find custom attr constructor image: /home/root/apps/MonoBrickFirmware.dll mtoken: 0x0a0000f7
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type ‘System.Runtime.Versioning.TargetFrameworkAttribute’ from assembly ‘MonoBrickFirmware’.
at Projekt2.R2D2..ctor () [0x00000] in <filename unknown>:0
at Projekt2.MainClass.Main (System.String args) [0x00000] in <filename unknown>:0
DirkFebruary 23, 2014 at 16:40 #3988
I did some more investigations. I updated both StartupApp.exe and MonoBrickFirmware.dll in /usr/local/bin. Afterwards I rebooted and EV3 booted correctly. However, when I tried to start my application I still got the same error. Then I created a new Console Project within the MonoBrick solution and put all my stuff into that. And now it works. But I still do not know why it doesn’t work with the projects that lives in it’s own solution.
DirkFebruary 24, 2014 at 20:18 #3997
Anders SøborgKey Master
Thanks for using MonoBrick firmware!
I am not sure if I understand your problem correctly. But in order to create your own project you need to add a reference to the firmware dll. Then you need to make sure that the dll is copied to the output folder. When you “transfer/copy” the program to the brick – you need to make sure that the dll is also copied. Otherwise there will be a mismatch between the dll that was used for compiling the program and the dll that is used at runtime…
AndersFebruary 25, 2014 at 17:19 #4004
I think I did everything exactly as you described above. However, I still get the error mentioned above. But currently that isn’t a real problem for me because everything works fine as long as my project is part of the MonoBrick solution. That is ok for me at the moment.
You must be logged in to reply to this topic.