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!
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.
Related
I'm having difficulties implementing serial communication in .NET MAUI 7.
I have confirmed that the project at Xamarin.Android.SerialPort works properly.
However, it does not work in my project.
I get an error at [new SerialPort.SerialPortWrapper.SerialPort].
errorCapture
How can I add the libserial.so file to my project APK?
It's too difficult.
Please help.
I have added the open source project from the link to my project, but it does not work.
There seems to be some issue with downloading the C# library. How do I get it added to the project?
You could add all these projects to the solution.
Then you can create a new program(such as console app), and right click add reference-> choose projects.
The following is the detailed steps.
1.Right click the solution->adding existing project->adding the project that you have downloaded from the link.
2.Create a new program that you will use google API->add reference-> projects ->choose the project you added last step.
3.Now you could use the class and method in the app.
Where to find Microsoft.Practices.Composite.UnityExtensions.dll for Microsoft.Practices.Unity.dll thats of version 2.1.505.2..
I was using 1.2.0.0 version of unity dll . While i changed the version to 2.1.505.2 the code gave me an error saying unityextension is depenedent to 1.2.0.0 version of unity dll ...
the version I am using is 2.0.0.0 of unityextension.
I really need help .. thanks in advance
Follow below steps as documented in official website :-
1.In Visual Studio, create a new Silverlight application. To do this, point to New on the File menu, and then click Project. In the Project
types list, click Silverlight in the Visual C# node. In the Templates
box, click Silverlight Application. Finally, set the project's name,
such as CALApplication1, specify a valid location, and then click OK.
This project will be the Shell project of your application.
2.On the Add Silverlight Application dialog box, make sure the Add a new ASP.NET Web project to the solution to host Silverlight option is
selected, and then click OK.
3.(Optional) In Windows Explorer, create a folder named Library inside your solution's folder, and then copy the following assemblies into
the folder
â—¦Microsoft.Practices.Composite.UnityExtensions.dll. This assembly
contains base and utility classes you can reuse in applications based
on the Composite Application Library for Silverlight that consume the
Unity Application Block. For example, it contains a bootstrapper base
class, the UnityBootstrapper class, that creates and configures a
Unity container with default services when the application starts.
I'm currently working on a solution with two different project. One project is a windows form (main project) and the other one is a console application. Currently I am running the console application from the main project with:
System.Diagnostics.Process.Start(Environment.CurrentDirectory + "\\console.exe");
When I debug, everything works fine as a wish. However, C sharp creates two different executables, one with the console and another with the main project. My question: is there a simple way to merge those two to only one executable? Note: I am a beginner, and I tried really hard to get this working :(
Thank you!
To merge multiple assemblys into one you can use Fody/Costura. It allows you to merge multiple assemblys(exe's) into 1 project(exe). In your main project you add it (can be done via nuget). Then just in weavers.xml (file that will be automaticly generated add these text:
<Costura>
<IncludeAssemblies>
MyProject.MyConsoleApp
</IncludeAssemblies>
</Costura>
(it should be the same name as the reference, so add the console app to your windows form as reference,and remember don't add the .exe suffix)
PS: read the tutorial on the link I gave you.
In winforms application/asp.net sqlite works if i reference sqlite.dll.
But when i try this to smart Device Project it fails to build because
of this error:
Can't find PInvoke DLL 'SQLite.Interop.DLL'.
What did i did is also reference system.Data.SqLite.dll in my project file, add also it windows folder of my device(Windows SE Emulator/Datalogic Memor windows ce 5.0).
Any one here experience this and resolve this problem?
Currently i am using SQLcompact 3.5 for the handhelds but i encounter drawbacks in terms of speed and capacity and i know that sqlite will solve it.
Thanks in Regards.
I Got the solution:
We need to Add SQLite.Interop.066.DLL in the project root folder.
Then right click to SQLite.Interop.066.DL to view its properties.
Next Set its Build Action = Content
and
Copy to Output Directory = Copy if newer
Rebuild/Build the project and try to test it again.