How to add System.ServiceModel.Syndication.dll in Windows Phone 8 project? - c#

I am trying to build an rss feed app. and i want to add System.Servicemodel.Syndication. But when i am trying to add, it is saying a reference to a higher version or incompatible assembly cannot be added to the project. After reading some post on how to solve it, i try to unblock the assembly but i found no unblock button. That means the project is already unblocked.
So how can i solve the issue?? Is there any alternative way to read rss?

Judging from the documentation here Adding a Reference to the Syndication DLL you need to install the Silverlight 4 SDK and then reference the v4 version of the dll located at Microsoft SDKs/Silverlight/v4.0/Libraries/Client/.
Windows Phone is based on Siverlight v4.

this assembly is designed for silverlight 5 so you cannot add to the project due to compatibility issues regarding .Net 3.5 +

See the article at
http://www.wintellect.com/blogs/jprosise/silverlight-for-windows-phone-programming-tip-2
on how to use LINQ to XML instead
(btw that article says the alternative is to use the respective dll from the Silverlight 3 SDK)
another way is to use a Web Service and parse the RSS on the server instead, see example at:
http://www.codeproject.com/Articles/83859/A-Simple-Silverlight-RSS-Reader

Related

In Xamarin, Is it possible link to a .NET 4.0 assembly?

I don't have Xamarin yet, and i want to build some application both for android and windows, each will use same shared library.
Is there a possibility to link .NET 4.0 assembly to Xamarin ios/android project, without recompile?
This assembly reference to System only, uses SQLite-NET by praeclarum, which requires native Windows library sqlite3.dll.
As i heard, on Mono/Xamarin? Mono.Data.Sqlite is required instead sqlite3.dll, but i am not sure, can i keep my library "cross-platform" with it? Or i will have to change something?
Unfortunately, i cannot check this currently.
Thank you..
.net assemblies can't be linked to Xamarin Android/iOS but you can link PCLs or you can create a Xamarin Android/iOS project, link files from your .net assemblies there and resolve possible problems with conditional directives (#if...).

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?
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.
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.

How to reference a.Net 4.0 COM in a .Net 2.0 App

I had a Problem to use DotNet 4.0 DLL in a DotNet 2.0 Application, googling the Issue showed a single suitable solution: COM
Anyway i'm trying to do that now but i keep getting the following Error when i add the reference in my application (the reference is tlb):
The ActiveX type library 'MyLib.tlb' was exported from a .NET assembly
and cannot be added as a reference. please reference the Assembly directly.
Am i missing anything? its stated on a lot of websites that this option should work:
Example1, Example2
On the other hand its stated on an old link of microsoft that this option is not possible "By Design"
Any Ideas? Hints?
Home i'm not confusing things.
Thank you.
Because it would lead to loading the .NET4 runtime in a process where the .NET2 runtime is already loaded - this is not possible by design!
Support for mixing .NET versions in one process was introduced in .NET 4 .
IF you really need to make this work:
make a native out-of-process COM server which uses that .NET4 DLL
then use that server from your .NET2 process (NOT the .NET4 DLL directly !)
REMARK - after seeing your comment about EF4:
I strongly recommend to convert your .NET2 application to .NET 4 - anything else will be a real maintainance nightmare!

Google APIs Client Library for .NET on Windows Phone 7 Project

Is it possible to use Google APIs Client Library for .NET in a WP7 project?
I've tried to add a new reference to DotNetOpenAuth.dll and I'm getting the folowing error.
Reference cannot be added to DotNetOpenAuth.dll because it was not built using the Windows Phone runtime. Windows Phone projects will work only with Windows Phone assemblies.
Is it possible to solve?
Try Portable Library Tools from MSDN. Read about them here. Now reference Google .Net library in the portable library, also reference this portable library project in WP7 project. Now, write a small wrapper over the Google apis in the portable library project and use them from your WP7 project. Referencing works but I did not use it, you can give it a try once.
I would think it would be possible to use the Google APIs from WP7. I've not used them myself, but it looks like you use them by making HTTP requests which, if memory serves me right, is possible on WP7.
With regards to the DotNetAuth.dll it is more then likely built against the Full or Client Profile version of the .NET Framework and therefore can't be used by WP7. In order to do this, then a WP7 specific version of the assembly will be have to be compiled.

How to include third Party dll files in Mono 2.10?

I have developed an windows desktop Application using C# .NET 4 framwork.Now, we are going to using MONO2.10 for cross platform.For sample, I have downloaded the mono 2.10 on windows version and able to run my .net exe.While doing so, Its Working fine and it says error the below mentioned error msg. As per my understanding, I think the DLL Reference is not included properly...
i am using 2 third party dll files in application.
Ionic.dll for .net zip library
DocumentFormat.OpenXml.dll for XML file management.
Please guide me to how to include these dll reference in Mono on windows?
Thanks & Regards,
Saravanan.P
This library is not part of Microsoft .NET or Mono Framework.
Therefore, you just need to either put it in GAC or in the same folder with your application, just like you normally do with third-party components.

Categories