RaspberryPi.Net icon indicating copy to clipboard operation
RaspberryPi.Net copied to clipboard

RaspberryPiDotNet xbuild with 31 errors

Open Suchtaaa opened this issue 6 years ago • 3 comments

Hello guys,

I want to write code for the RaspberryPi in C# with Mono. That works pretty well.

But I need also to work with the GPIO-Pins.

When I want to build the RaspberryPiDotNet-Project, it throws me 31 errors, like this one:

CSC: error CS0518: The predefined type `System.RuntimeTypeHandle' is not defined or imported

Every error is the same, but instead of 'System.RuntimeTypeHandle' are everytime different things.

Suchtaaa avatar Oct 16 '18 16:10 Suchtaaa

Which version of Mono are you using? Not always a very recent one that comes by default on many distros.

devlead avatar Oct 16 '18 17:10 devlead

This one:

Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1) <

Suchtaaa avatar Oct 16 '18 17:10 Suchtaaa

I ran into the same Problem today and fixed it by defining the TargetFrameworkVersion:

xbuild /p:TargetFrameworkVersion=v4.0 RaspberryPiDotNet.csproj

Leppin avatar Nov 29 '18 08:11 Leppin