Xamarin Forms Java.Interop error while debugging on IPad Mini - c#

I have a Xamarin Forms app that I am trying to debug on I Pad mini connected to a Mac Book Pro.
Using Versions
Microsoft Visual Studio Community 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01055
Installed Version: Community
Xamarin 4.1.1.3 (34a92cd)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android 6.1.1.1 (7db2aac)
Visual Studio extension to enable development for Xamarin.Android.
Xamarin.iOS 9.8.1.4 (3cf8aae)
Visual Studio extension to enable development for Xamarin.iOS.
The Mac Book Pro is running Simulator 9.3.
When I use the emulator the application runs fine, but when I try and run it on The Ipad Mini I get the Error
Error Failed to resolve assembly: 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'Client.UI.iOS C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 681
It makes me want to point the finger at Newtonsoft.Json but we have tried to remove that (which is required) and it still doen't work
This doesn't happen on all Apps, but now it will start to be a blocker as I need to write functions that require the use of the camera.
**** UPDATE ****
My College came back from holiday and discovered that it was because in the UI project we had a reference to Mono.Android,k removing this fixed the build

This is irritating I know! I faced this too
are you dealing with JSON data? try to comment it and run to locate the exact line where you get the error.
Probably you are dealing with it in a wrong way or any other java object.

Related

Xamarin forms development on LinuxMint

Is there any way that we can build/debug and run xamarin forms app on linuxMint?
Alternatively is there any way that we can run visual studio 2019 on Linux apart from using vine?
Is there any way that we can build/debug and run xamarin forms app on linuxMint?
Sorry , there is no way to build /debug a xamarin froms app on Linux OS from officail supports.
However , about Xamarin.Android on Linux , you can have a look at that .Although that not tested on linuxMint , also can have a try whther it also works on linuxMint .
Alternatively is there any way that we can run visual studio 2019 on Linux apart from using vine?
(Hoping that Microsoft will release Visual Studio for Linux soon)
But Microsoft hasn’t made it’s Visual Studio Open Source. So it isn’t Available for Linux Systems.
You can only Install Visual Studio Code for Linux Systems , which is an amazing Code editor for Programmers.
More reference: Visual Studio Code on Linux

I can't find cross platform app Xamarin on visual studio 2017

I have installed visual studio 2017 community properly with mobile development packge and I can't find cross platform app in c#
What can I do to install it ?
You should review the installation procedure documented by Microsoft.
If you don't have the Xamarin menu under Help then you may have missed something. You can re-run the installer and change workflows to confirm you have all the required pieces. Note that additional steps are needed to build and deploy, although you see stuck at just the installation step if templates are missing.
The problem was that some files was corrupted because of a faild complete unistallation of xamarin ... so i prefered a speed and smart solution that can help me to continue my work so i installed a new os windows in new partition i tried to install those files , they worked on the new os so it's clear that xamarin will be installed properly finaly i installed the hole visual studio and that worked for me ...

Q: Does VS2015 Community Update 3 compile Windows UWP Apps for Win10 Build 10586 on Win7SP1?

I have a PC with Windows 7 SP1 (64bit) that I have been using to build a Windows store app. I've been using Visual Studio 2015 Community Edition Update 2. This worked great until I applied Visual Studio Update 3 and the latest Windows SDK (14393).
When I target the previous release (10586), I get the following error when I try to compile a C# project:
Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2151,5): error APPX0002: Task 'GenerateAppxPackageRecipe' failed. 0x7F - Failed to load MRM support library.
(I have a C++ UWP project in the same solution and it compiles into a DLL without any issues.)
I've tried reinstalling VS2015 Update 2, reinstalling VS2015 Update 3, repairing Visual Studio, repairing the Windows SDK for 10586. None of these worked.
I know the latest Windows 10 SDK does not support Windows 7 SP1; however, does this apply to all previous Windows 10 SDK's?
Finally, after days of repairing and re-installing, I finally fixed this.
Step 1: Assuming you installed Visual Studio in the default location, goto the following folder: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage
Step 2: Rename Microsoft.AppxPackage.Targets to something else. I added "-old" after Package.
Step 3: Clean the solution.
Step 4: Confirm you are targeting Windows 10 Build 10586.
Step 5: Build the solution.
My targets file is dated May 31, 2016 before I even installed Visual Studio 2015. Before I did these steps, I also deleted everything in the bin/Debug folder but I'm not sure if this helped or not.
Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2151,5): error APPX0002: Task 'GenerateAppxPackageRecipe' failed. 0x7F - Failed to load MRM support library.
This is a known issue in Windows 10 SDK (ver. 10.0.14393.33) which is included in Visual Studio 2015 with Update 3. And it has been fixed in QFE Build 10.0.14393.795.
This non-security update includes quality improvements:
Addressed issue where developers could not build UWP apps on Windows 7 because MRMSupport.dll failed to load.
Addressed issue where MidlRT and MDMerge failed to run on Windows 7
Addressed issue where SDK setup failed to install on Windows
Addressed issue where deploying a legacy Store app to a 8.1 Phone caused Visual Studio to crash
Addressed issue where application data was not preserved across remote debugging sessions when apps were getting un-registered
For more info, please see Windows SDK and emulator archive.
To solve this problem, please go to Add/Remove Programs and Uninstall Windows Software Development Kit - Windows 10.0.14393.33. Then reinstall the 10.0.14393.795 version from Windows SDK and emulator archive. After this, you should be able to build the UWP app with no error.
However, on Windows 7, with Visual Studio 2015, the official support for Windows Universal is "Build only". A lot of other Visual Studio features are degraded. So if you are developing Windows Universal Apps, Windows 10 is strongly recommended. For more info, please see this answer.

Facebook SDK error loading on Windows 10 app (XAML, C#)

This is very odd, yesterday this project loaded fine and today it doesn't want to.
Here is the error message:
C:\Dailymotion\dailymotion-windows-universal\Libs\winsdkfb-master\FBWinSDK\FBSDK-UWP\FBSDK-UWP\FBSDK-UWP.vcxproj : error : The method or operation is not implemented.
Project 'Facebook' could not be loaded because it's missing install components. To fix this launch Visual Studio setup with the following selections:
Install Universal Windows Platform Tools
C:\Dailymotion\dailymotion-windows-universal\Libs\winsdkfb-master\FBWinSDK\FBSDK-UWP\FBSDK-UWP\FBSDK-UWP.vcxproj : error : The method or operation is not implemented.
What is crazy is that i already have "Install Universal Windows Platform Tools" installed because i am developing a Windows 10 app! anyone have any idea?
did you upgrade your UWP tools?
I'm using VS 2015 Update 1 with UWP Tools 1.2 and I'm able to build https://github.com/Microsoft/winsdkfb/tree/master/FBWinSDK/FBSDK-UWP without errors.
Thank you for reporting this issue with using Visual Studio 2015 RTM to open C++ UWP apps, and our apologies for introducing this error.
We've released a fix for this issue. While we encourage you to install Update 1, you do not need to do so to get this fix. VS will automatically download the fix
If you have an internet connection, and
Once every 24 hours upon restarting Visual Studio.
So, if you wait until 24 hours from now, you’ll get the fix. If you want to force it sooner, here’s instructions:
Close Visual Studio
Open %appdata%\Microsoft\VisualStudio\14.0\FeedCache
Copy all the files out to a new folder
Make sure you have in internet connection and restart Visual Studio
Wait a few minutes and you’ll see a new file appear in the FeedCache folder
You can copy the old files back into the folder if you want
If you can’t successfully open your project with a pre-Update 1 Visual Studio, please let us know.
Thanks!
-Paul Chapman
Visual Studio PM

Vector2 types in Win2D drawing method inconsistency

I'm making my first steps into the UAP world in Windows 10.
I'm trying to write a small app that displays graphics on an IoT / R-PI2-device using the Win2D library.
I have a drawing method that displays a single line:
private void Canvas_Draw(CanvasControl sender, CanvasDrawEventArgs args)
{
var a = new System.Numerics.Vector2(10,10);
var b = new System.Numerics.Vector2(100,100);
args.DrawingSession.DrawLine(a,b,Colors.Yellow);
}
VS2015 community ed. IntelliSense is telling me that I'm supplying incompatible vector2-types with the arguments 'a' and 'b'. It's expecting Windows.Foundation.Numerics.Vector2 instead of System.Numerics.Vector2.
However, the program compiles and runs just fine on desktop as well as on the r-pi.
Parts of my app are based on this tutorial where the method clearly takes System.Numeric.Verctor2 arguments.
I read in another post, that there have been made changes to the API between Windows 8.1 and 10, as well as this GitHub issue.
I also imported the package mentioned in this post but it didn't change anything.
I don't know if this post has something to do with my problem but at least it mentions a problem with this two namespaces.
Why is IntelliSense highlighting this code as an error? Is there a bug in VS?
Am I doing anything wrong here?
The Project: https://github.com/chrisi/IoTCanvas
Some System / IDE Specs in case that is relevant:
Microsoft Visual Studio Community 2015 Version 14.0.23107.0 D14REL
Microsoft .NET Framework Version 4.6.00079
Installed Version: Community
Visual Basic 2015 00322-20000-00000-AA366
Visual C# 2015 00322-20000-00000-AA366
Visual C++ 2015 00322-20000-00000-AA366
Windows Phone SDK 8.0 - ENU 00322-20000-00000-AA366
Application Insights Tools for Visual Studio Package 1.0
JetBrains ReSharper Ultimate 2015.2 Build 103.0.20150818.200216
Microsoft Azure Mobile Services Tools 1.4
NuGet Package Manager 3.2.0
PreEmptive Analytics Visualizer 1.2
SQL Server Compact &SQLite Toolbox 4.3.0
Visual Studio Tools for Universal Windows Apps 14.0.23309.00 d14oob
System.Numerics.Vectors ships with Windows 10 and you do not need to install it separately.
The reason you are seeing references to Windows.Foundation.Numerics is because Windows.Foundation.Numerics is the name of the WinRT type. This is projected in .NET as System.Numerics.Vector2. Other languages may project it differently - in C++/CX it is Windows::Foundation::Numerics::float2, for example.
I strongly suspect that you are running into an issue with ReSharper - see https://github.com/Microsoft/Win2D/issues/145. The word from there is:
This one is fixed in R#10 and the fix will be available in one of the next EAP builds.

Categories