-1

I'm totally new to programming in c# with visual studio and I would need your help to resolve a problem I'm having. I created a UWP (Universal Windows Platform) Application that I can remotly run on my Raspberry PI 3.

For this project I need communication with a RFID reader that is plugged in to my raspberry PI true SPI. I found some code that indicates how to do this but I'm unable to add this library in to my project, below the link can be found of what I'm trying to do. I would like to import the Library Mfrc522Lib.cs in to my project and use it in my main form. Can anyone indicate me how I need to do this?

Link : https://stackoverflow.com/questions/34284498/rfid-rc522-raspberry-pi-2-windows-iot#=

Thanks a lot!

Pierre
  • 13
  • 4
  • you could try finding the packages you need using NuGet. It is a package-manager included in VisualStudio – Manticore Apr 13 '18 at 11:29
  • You need to download the entire project from `git` and build a `dll`, so you will be able to add a reference to `dll` assembly and use in your project – Ricardo Pontual Apr 13 '18 at 11:29

1 Answers1

0

What you wanna do is include Mfrc522Lib.cs into your project.

Right click your Main project file in visual studio and select add option, from there select Exisiting item and add Mfrc522Lib.cs.

Its better to copy the Mfrc522Lib.cs to the physical path of your project file.

OOMMEN
  • 249
  • 3
  • 6
  • Ok thank you. And how can I referre to this in to my main form? Because when I just add this like you say and then type for example "mfrc.IsTagPresent" in to my main form this isn't recognized. – Pierre Apr 13 '18 at 11:41
  • Its because your project file and Mfrc522Lib.cs have different namespaces. – OOMMEN Apr 13 '18 at 11:46
  • Thanks a lot! This was indeed my problem. – Pierre Apr 13 '18 at 11:52
  • Glad to hear that – OOMMEN Apr 14 '18 at 09:31
  • Hi @Pierre If the answer has resolved your issue please [mark](https://meta.stackexchange.com/a/5235) it as accepted to convenient people who visit this thread later, Thanks for understanding. – CoCaIceDew Apr 16 '18 at 01:52