Can I use FileHelpers with Xamarin - filehelpers

I would like to use FileHelpers in a Visual Studio 2017 project that compiles code for Android, is this possible?

Yes. FileHelpers works fine with Xamarin.
Furthermore, you can use the FileHelpers library in a .NET standard 2.0 project which is the recommended way for Xamarin applications to share code across multiple projects - one assembly used by both Android and iOS projects. See the documentation here.

Related

Xamarin Forms code sharing

I'm working on a xamarin forms (PCL) project (A basic customer care chat app which is meant to run on Android and iOS only) that has just two xaml pages, custom renderers and few dependencies. This project is meant to be implemented into another existing project (which I don't have access to its source code) such that an action would be binded to a button on the existing app to show a page on my own project.
There is need for me to share my chat project with my client's developer but without exposing my source codes, perhaps compiling to dll or nuget package that would be added to the existing project to access my project's functions and pages. I have searched through the xamarin forum and here on stackoverflow but can't seem to lay my hands on a solution.
Is this possible at all? If yes, what am I missing? If no, is there any better option to use?
Please do note that the chat app completely done, so I'm hoping perhaps there's a way I could directly convert the project to a Nuget package.
Thanks in anticipation!
If the host application is a Xamarin Forms one:
-Move your cross platform shared code into a PCL or .Net Standard (ContentPages, ContentViews, Classes).
-Move your Renderers and platform specific code to Android and iOs Class Libraries.
Your client will have to reference your first assembly (dll) in their XF assembly in order to instantiate/manipulate your views/classes and platform specifics one on their Back-end side (taking into account your renderers, effects, etc ...)
A lot of Xamarin Controls Libraries Open Source hosted on Github are working like that. For example this one: https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout
If the host application is a native application, take a look into Xamarin forms embedding
Finally, I seem to solve the problem by enabling visual studio to build Nuget packages for the chat app project (summing up to 3 nuget packages) on project build.
Thanks #Rudy Spano and #Micah Switzer for your contributions

Cross Platform Applications written in Visual Basic .NET

As I have seen there is a way through Xamarin and Visual Studio to develop cross platform applications in C#.
Is there a way to write cross platform applications with VB.net?
Is it possible Visual Studio 2017 to include this possibility?
Thank you!
You can use VB.net in a xamarin forms project. You have to use a vb.net PCL for the project. There is an article on the Xamarin site on how to do this.
https://developer.xamarin.com/guides/cross-platform/application_fundamentals/pcl/portable_visual_basic_net/xamarin-forms/
Please note there are a lot of limitations on this.
Custom Renderers cannot be written in Visual Basic, they must be written in C# in the native platform projects.
Dependency Service implementations cannot be written in Visual Basic, they must be written in C# in the native platform projects.
XAML pages cannot be included in the Visual Basic project - the code-behind generator can only build C#. It is possible to include XAML in a separate, referenced, C# portable class library and use databinding to populate the XAML files via Visual Basic models (an example of this is included in the sample).
Xamarin does not support the Visual Basic.NET language.

Any changes needed to Visual Basic PCL for Xamarin Unified API?

I have a Visual Basic PCL for Xamarin. Will I need to make any changes to the PCL to be able to use it in a Xamarin Unified API project? Or just recompile perhaps?
I read that Visual Basic code requires no changes for 64 bits unless you are using the fact that it's 64 bits, which I am not.
You don't need to do any changes to PCL projects. The only projects who needs updating is iOS and Mac. For more information on updating that see the documentation: http://developer.xamarin.com/guides/cross-platform/macios/updating_ios_apps/

Can I use my own DLLs with my Xamarin iOS and Android projects?

Can I use my own DLLs with a Xamarin iOS or Android project?
The reason I'm asking is because I want to compile dlls from Clojure CLR, and use them with my Xamarin mobile projects.
Currently the answer for this is 'No' - you cannot use your own existing assemblies but must instead recompile those projects as Xamarin.iOS or Xamarin.Android (MonoTouch or MonoDroid) libraries.
This is because the Xamarin twins are based on old Silverlight profile code and not on full .Net.
This situation is changing currently - Xamarin is rebasing on Mono3/.Net4.5 and Xamarin is working towards PCL support.
However, even with these recent changes I think it is still advisable to rebuild your assemblies for the specific platforms at this time.

Version information missing from .NET assembly (Compact Framework 3.5/VS2008)

I am building an executable using VS2008 and .NET compact framework 3.5, targetting Windows Mobile 6 professional, but whenever I compile the project, everything that I have specified in the AssemblyInfo.cs file is ignored.
I have done this many times in other projects and it works without problem, but for some reason I cannot get the AssemblyTitle/AssemblyProduct/AssemblyVersion attributes etc to show up (I am trying to view them using Windows Explorer, I am able to see these properties in the details tab for any other assembly that I have built - even other projects in the same solution).
Any suggestions?
That info is looking at the native version info, which on the desktop is set using the AssemblyFileVersionAttribute. The AssemblyFileVersionAttribute is unsupported in the CF, so the only way to set the version info out of the box is to command-line compile. There is a workaround in this blog.
I know this is old, but there's a simpler solution posted here:
Version number in .NET Compact Framework application
You have to use reflection.
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Revision
in tag PlatformFamilyName; rather that PocketPC, change to add WindowsCE
in csproj