Today I started coding on a Mac, and got myself everything needed to play with Xamarin.Forms.
I imported my last project but in the shared project the assemblies folder is not there in the dependencies one.
I want to add a few assemblies references to my shared project but when I go to the edit references page, there are no assemblies showing. However, if I do it in my Android project, everything is fine.
You cannot add assemblies to a shared project. It has to be in your Xamarin.Android project. See: https://learn.microsoft.com/en-us/xamarin/cross-platform/app-fundamentals/ for further details about code sharing.
Related
I am trying to use not the nuget package but the project itself from the media plugin for xamarin forms.
I am adding all the references and upon build (or even clean) i get :
Error: The specified language targets for uap10.0.16299 is missing. Ensure correct tooling is installed for 'uap'. Missing: '/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/xbuild/Microsoft/WindowsXaml/v16.0/Microsoft.Windows.UI.Xaml.CSharp.targets' (Media.Plugin)
I beleive it is looking for the windows SDK which isnt isntalled on my mac and the project itself only supports android and ios.
Using the nuget package, I can check that I only want ios and Android and it works fine, but upon loading the project in as the project it gives me this error.
In the dependencies folder of the project it is still referencing this UAP 10.0.16299 but upon right click all I can do is "refresh".
How can I build my project and leave out this windows crap?
First include the whole project, then edit the CS proj file (right click on solution -> edit project file).
In the first few lines it says: <TargetFramworks...
Remove the unwanted dependencies. They will be gone in the main folder if you save.
Thats it.
I've just created a new xamarin form project, but couldn't find the folder dependencies folder under my shared project, this folder usually below the Getting Started file.
This lead to I can't add the nuget package for my shared project.
I'm using visual studio 2017 and xCode 10.3
So how can I find this folder on the xamarin-form project?
my project image
There are two types of xamarin forms code sharing strategy: .NET Standard and Shared Project. I guess that your project is of type Shared Project, which makes sense if there were no dependencies folder.
please read the following article:
https://medium.com/#daRochaPires/xamarin-pcl-vs-shared-project-a838806d5cc6
I'm using visual studio 2017, xamarin v2.5.1, I created a new xamarin forms project but I got this problem after build android project
The target "CssG" does not exist in the project.
what does this mean ?
after 3 days searching for the solution, I can't find it, any suggestions please ?
Closing Visual Studio and manually deleting the obj and bin folders worked for me! (my go-to move by the way)
I finally succeeded in solving this problem.
After building a NEW project using the Mobile App (Xamarin Forms) template, I first downgraded Xamarin.Forms to v2.5.0.280555 in all projects using Manage Nuget Packages on the references. Then I unloaded the Android project and opened the Android.csproj. In the Android.csproj I downgraded the Xamarin.Android.Support resources to 25.4.0.2, saved the document and Reloaded the Android project. After cleaning the solotion, closing it, deleting the (Android) obj and bin files and reopening the solution I could run it without errors.
I have inherited a Xamarin project (not Xamarin.Forms) and right now it has three major components.
An iOS project, an Android project and finally a Shared Project (not a PCL and not a .Net Standard project).
Despite the Shared Project, the application reads a json file included within the assets folders of each project. The file is a duplicate. I feel like this file should be in the Shared Project
To clarify, this is the structure:
Shared Project
No Assets
iOS
Resources/test.json
Android
Assets/test.json
I believe the test.json file should exist as one file in the Shared Project. My first step was to make this move and I changed the file to Build Action=Content which worked for the iOS project. It seems however the Android project does not get this file. I cannot find it anywhere in the compiled and archived .apk file.
Is there anything I can do about this, or do I need to accept this design flaw and build a .Net Standard library or PCL? If so, how exactly do you make a .Net Standard or PCL for a non-Xamarin.Forms project.
What is your use case? If you just need to read the test.json at runtime and parse it using .NET code, you can use embedded resources, details here: https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/files/
If you need the file to go into iOS reosurces / Android assets folder, you can keep the test.json file only once in the solution (either in shared project or as a solution item) and add it as link to both iOS and Android project - here is screen shot how to do it in Visual Studio.
You can do it also in Visual Studio for Mac - right click on the containing folder in solution explorer, choose Add Files and you will get the following prompt - choose Add a link to the file
I need to use Tesseract on a Windows 10 app for phones. Already found an intent made by Yoisel . I've tried to build the project for test, but i'm kinda new to Visual Studio dependencies and usage.
What i've done so far is to open the tesseract_winrt.sln on the VS2015 folder.
After that i copied leptonica project to root directory of tesseract_winrt so it can be loaded inside the solution. Once that everything is loaded i click build solution and get this errors:
I'm not sure what i'm doing wrong or how to properly set the dependencies
Any idea would be appreciated.
There are now binaries for the project that you can use:
https://github.com/yoisel/tesseract_winrt/releases/tag/v0.1-alpha
It is a set of Visual Studio Extension SDKs, you can install the one for UWP projects on your system and add a reference to it in your project using the "Extensions" tab:
Disclaimer: This project was merely a proof of concept and I strongly recommend not to use it as is in a production scenario