Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Porting a C# library to windows phone 8?

I was using the Math.NET Neodym library for a project on Visual C# for a winforms application.

Here's the project's link: Math.NET Neodym Now, I want to port it over to Windows Phone 8, When adding a reference to the library in the WP8 SDK, I get an error along the lines of:

a reference to a higher version or incompatible assembly cannot be added

Now, I've asked this question before, and Ive been told that I can port the library to WP8 by recompiling it. And I have no idea how to? Do I just copy paste each file from the Library into a new WP8 library project and compile?

like image 458
7VoltCrayon Avatar asked Jan 11 '13 20:01

7VoltCrayon


People also ask

What is porting in C?

Portability refers to how easily- if at all- code can move from one system architecture to another. We know that Linux is a portable because it has already been ported to various implementations. To view which implementations Linux has ported to, type in the following command. vim /usr/src/kernels/2.6.43.8-1. fc15.

Can you compile rust to C?

No. It compiles to LLVM intermediate representation, the same CLANG compiler compiles C & C++ into.


2 Answers

The easiest way would be to convert the project to a Portable Class Library. This would allow it to be used by Windows Phone as well as desktop apps.

You should be able to just open the solution, and change the appropriate project properties to do this. However, if any types are not supported by the target framework(s), you'll need to rework or remove those portions of the library.

like image 83
Reed Copsey Avatar answered Sep 24 '22 01:09

Reed Copsey


Please see the answer to this question at a previous post. This might not be an issue with "higher version", just VS2012 having an irrelevant error message.

like image 23
JustinAngel Avatar answered Sep 21 '22 01:09

JustinAngel