I am using Mike Bluestein's article, http://mikebluestein.wordpress.com/2009/09/27/using-monotouch-with-the-net-library-for-the-google-data-api/, to build an application that communicates with the google APIs.
When I try to add references to my project, the imported projects say "incompatible target framework: v2.0". I can change version to 1.1, 3.0, or 3.5 with the same results.
If I add the .dll to the monotouch project I get a compilation error - monotouch failed with no output 134.
Any suggestions?
http://macpapa.com/macpapa.com/public-images/SM.png
http://macpapa.com/macpapa.com/public-images/PM.png
I don't think regular .NET dlls will work on an iphone - Notice that the article is using source code and project references, not assembly references. Did you follow the instructions on changing the build targets of the google projects?
Related
I get the following problem every time I try to run my mobile application:
System.DllNotFoundException:
'SQLite.Interop.dll assembly:<unknown assembly> type:<unknown type> member:(null)'
To put this in some context:
I am developing on Xamarin.Forms [4.3.0] (in this case running the build on Android 9.0 x86). The client-side library runs on .NET Standard 2.0 and I have installed System.Data.SQLite.Core (1.0.112) from NuGet.
When you look up my problem, you will find people saying to put the SQLite.Interop.dll's into the x86/x64 folders. But when looking for these files there are none for .NET Standard at all, only for .NET Framework. I tried using the SQLite.Interop.dll's from the precompiled statically-linked binaries from the .NET Framework 4.6 version.
Screenshot of the project structure
Same error though.
Unfortunately, it is not possible for me to switch the SQLite library as I am porting a desktop version to mobile which uses this lib.
if they have not made a mess in the classes and functions you need to port you can use "Microsoft.Data.SQLite", there is a difference but is not as far away from usable as the crazy nonsense you need to do with "SQLite-Net-Pcl"
I just started to play around with C# application using the .NET framework.
I'm trying to install from Nuget the official neo4j driver package for c# but, despite the fact that from the documentation is stated that it should work with any version of .NET language (here), I got an incompatibility error from one of its dependencies (System.Net.NameResolution 4.0.0)
My application is a Console Application and the target framework is .NET framework 4.5.2.
In particular the error I get is:
Could not install package 'System.Net.NameResolution 4.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', but the package does not contain
any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Do you have any idea on how to solve this? I think I'm missing something obvious.
Thanks in advance
Your link states that it works with any .NET language not that it works with any version of the .NET framework. This package appears to be for dotnet core only, so you will need to look into getting started with that.
In preparation for moving to VS2015 I'm upgrading several solutions with CLR projects using the old (now deprecated) "old syntax" to rather use the "new syntax" (i.e. switch /CLR instead of /oldSyntax).
The C# projects are targeting .Net 3.5 (we were hoping to migrate to a later version as a separate step).
I have completed all the syntax stuff (and have no further errors/warnings in that respect), but on building receive the following error:
"SomeAssembly.dll", or one of its dependencies, requires a later version of the .NET Framework than the one specified in the project.
The errors are resolved if I update the C# projects to target .Net 4.0.
Is .Net 4.0 a minimum requirement for using the 'new syntax' (/CLR switch)?
I haven't been able to find any reference material mentioning this.
EDIT: The C# projects are all library projects.
EDIT: Building under VS2008 the error doesn't manifest, but it does when building under VS2015.
I don't find any where that dot net 4.0 is prerequisites for CLR switch, Just check your web.config accordingly before updating the C# projects to target .Net 4.0.
I'm interested in figuring out how to use the Twilio API, and I am building an ASP.NET 5 application using the Twilio API with MVC6 (trying to follow this tutorial). So far, I have created an empty ASP.NET 5 application, and I added "Twilio" to the dependencies in project.json. I get the following error:
"The dependency Twilio 4.0.3 in project TwilioTest does not support framework DNXCore, Version v5.0"
I notice that when I remove "dnxcore50" from "frameworks", the error goes away.
I'm not sure what this means or how to approach it. I'm still pretty new to .NET and trying to wrap my head around how all of the pieces fit together. Does it mean that Twilio isn't compatible with DNXCore? Since all I want to do for now is learn how to use Twilio, could I essentially remove the dnxcore50 framework from the project and continue working through building the app?
The Twillio NuGet package is dependent on the full .NET stack, which in project.json frameworks terms is DNX451. What that means is, you can add the Twillio NuGet package and remove the DNXCORE50 reference and your project will run as expected and you will be able to use the Twillio API. As far as I know the only major drawback is that your ASP.NET Core project will no longer be cross platform as you are now dependent on the full .NET Framework stack which is only present in Windows.
In a nutshell, you should be fine unless you are planning to deploy to Linux/OSx. Hopefully as ASP.NET CORE becomes mainstream more 3rd party SDKs will be built to require only DNXCORE50 as a dependency.
Another option don't use the Twillio Libraries and code against their REST API. See documentation here: https://www.twilio.com/docs/api. But I wouldn't recommend this if you are deploying to a Windows environment.
Twilio is working on their .Net Standard (Core) library. In the meantime, I've published a .Net Core port of their library to unblock our current projects until we get the official update. Feel free to take it for a spin:
Install Twilio.NetCore from Nuget.
And you can check out the source on Github.
I am creating a fresh Mono for android application using http://xamarin.com/monoforandroid
I selected Mono for Android Application using Visual C# option.
My Android target version is :
I went to references of the project and tried adding my pre existing dlls (made in .NET 4 Framework)
and I got this error:
The strange stuff is there is no option to change the .NET Framework from project properties. Can you tell me what I am missing?
The problem here is that you're trying to reference a .NET 4 DLL from a project that isn't .NET 4. Mono for Android uses its own profile for .NET, which is very similar to that of Silverlight (but not exactly the same). While it's possible that adding a DLL compiled for a different profile will work, it's very risky as you will probably run into problems at runtime where your app will crash, due to something being missing from the Mono for Android profile.
The best answer right now is to create a Mono for Android class library, link in the appropriate files from the library you want to use, and reference that. This will give you compile-time checking that you're not using anything unsupported by the Mono for Android profile, and help keep you more sane in the long run. I have an old blog post up here that talks about how to link files across projects.
That said, in this case you're in luck because someone else has already done that last part for you! Check out this fork of Json.NET which provides versions for MonoTouch and Mono for Android.
The strange stuff is there is no option to change the .NET Framework from project properties. Can you tell me what I am missing?
It's not particularly strange - that dialog box was written by Microsoft, with its own project types in mind. It sounds like Mono for Android doesn't have the same options available.
I strongly suspect you'll just have to use a version of JSON.NET targeting .NET 3.5.
(Having said that, Mono for Android claims to support "dynamic language features" which sounds like it should be targeting .NET 4. Odd. I suspect the fix is the same though.)