Uno Platform - xamarin No Virtual method getTargetState() - xamarin.android

I recently updated Visual Studio 2019 to 16.9. When it updated- there was a message indicating that the Android SDK was updated. When I go to run the IOS version of my Uno Project- it runs fine. However- when I go to run it on the Android version- I have had a few issues. At first it would not compile- but after doing some web searches I found I needed to reenable AAPT. I am now able to compile it- but I get an exception when I run the app on my android device. It says no virtual method getTargetState()- and then lists the library as the picture shows. I checked Nuget for any package updates and applied them- but still have the same error. It is showing a method missing- that presumably was there earlier. I am not sure how to resolve this- so any help would be appreciated.

I started thinking about what Leo Zhu said above and it made me think- there was no update to the package mentioned. Maybe there was a breaking change in the package that was installed? So- I downgraded it to 2.2.0.3- and it is working again. One point to make is I was using the latest alpha release- so a breaking change is not surprising. I hope this helps someone else that encounters this issue or a similar issue.

Related

Visual Studio for Mac won't update - Xamarin

Weird issue here. I have Visual Studio for Mac. My mac is fully upto date on the mac sidel. I have updated to Xcode 12.5. I have selected the check for updates option in VSMac. I see that there are a bunch of updates for xamarin on my mac. I selected for it to update and restart, and then nothing happens. VSMac just closes. I'm assuming I have something on my system that VSMac doesn't like. Is there a way to just get the downloads and manually install them?
Here was the way that I solved the problem. I went and downloaded the various pieces that I knew I had specific problems with. This was VSMac, Xamarin.iOS, and Xamarin.Mac. I downloaded those, and then installed the iOS and Mac versions. Everything was still good. Then I installed the most up to date VSMac. It detected the old versions of Mono, Android, and some other stuff, and downloaded and installed them. Now, my current problem is solved. There may still be others, but this got my immediate problem resolved.
Hopefully, this helps someone else in the future.

Problem when publishing an application on the App Store [Non-public API usage]

Until three weeks ago, my application could upload it to the App Store without any problem. However, Apple has refused to upload the app with a new message about Non-public API usage.
The application is developed with Xamarin in Visual Studio for Mac and has updated all the libraries and packages. Can anybody help me? Because I can not find what the problem is, nor do I see any solution. It will be something new?
Thank you all.
Non-public API usage:
The app references non-public selectors in AppAytoSS.iOS:
addTemporaryAttribute:value:forCharacterRange:,
addTemporaryAttributes:forCharacterRange:, behaviorWithType:,
defaultBaselineOffsetForFont:, defaultLineHeightForFont:, finished,
greekingThreshold, horizontalCornerRadius,
initWithSource:convolutionState:weights:, initWithType:,
postSession:didAddPlayer:, postSession:didReceiveData:fromPlayer:,
postSession:didReceiveMessage:withData:fromPlayer:,
postSession:didRemovePlayer:,
postSession:player:didChangeConnectionState:,
postSession:player:didSaveData:, preferredMetalContext, removeData:,
removeTemporaryAttribute:forCharacterRange:, setGreekingThreshold:,
setHorizontalCornerRadius:, setIsPrimary:, setShouldAntiAlias:, setUUID:,
setVerticalCornerRadius:, shouldAntiAlias,
temporaryAttribute:atCharacterIndex:effectiveRange:,
temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:,
temporaryAttributesAtCharacterIndex:effectiveRange:,
temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:,
textContainerChangedTextView:, toolTip, usesBackgroundSession,
verticalCornerRadius
We had the (exactly) same problem with an Xamarin iOS Project and where able to fix it via Setting Build/iOS Build/Linker Behaviour: Link Framework SDKs only (before Don't link) - what Jack Hua link shows as solution.
We where not able, to figure out the problem behind though. Two different MacBooks where used, one with the most recent version of XCode, Visual Studio and Xamarin Libs, the other with slightly older versions. The latter was able to create an IPA without the above described error, the updated machine was not.
However the used NugGet Packages where the same, so I think this issue is not related to them.
After filling an internal issue with the Xamarin team, they advised doing the following
adding --linksdkonly to the Additional mtouch arguments on the iOS Build settings page
As it seems that Visual Studio ignores the settings in GUI
I have tested it and now get my build accepted by Apple without the above error
This is the issue filed on Xamarin
https://github.com/xamarin/xamarin-macios/issues/5913
I find a thread where people meet the same problem with you recently:build-status-has-changed-to-invalid-binary.
So, I guess some third part nuget packages you are using has updated and using these non-public selectors that Apple not allow.
I would suggest you to get you code three weeks ago and don't update any third part nuget packages. Then submit again to check if it is the problem.
You can also compare your reference with the references people listed in that thread and find something similar. And any nuget packages related to Player(As I can see some player selector in the non-public selectors list)?

How to connect to tfs from VSCode 1.17

I have tried to connect to TFS on my VSCode 1.17.2 by installing Visual studio team services.
Please help me to solve the problem
I test the latest VS Code Version 1.22.2 and everything works as expected.
There is a thread talking about the issue here : https://github.com/Microsoft/vsts-vscode/issues/245
It seems an environment issue based on BrianFarnhill's conclusion:
So based on that I've come to the conclusion that the issue I have
here is nothing related to you guys or your extension, but something
to do with this environment for my customer and it impacting on all
extensions.
So, you can try to troubleshoot the issue based on the discussion in that thread.
If that still not work, you can download the latest VS Code Version 1.22.2, then configure it following the guide here, then check if it works for you.
You can also reference my answer in another thread to do that.

Monogame: "could not load fbx model asset as a non-content file"

I recently changed operating systems on my laptop (went from 8.1 to Windows 7). I transferred my game project, and after having to rebuild it (due to Visual Studio 2013 stating it cannot open my project file), I managed to get it to run, but as soon as the code tries to load my cube.fbx model, I get the error in the title.
My settings for the model are as follows:
And the code for loading (which worked flawlessly before the transfer) is as follows:
modelCube = content.Load<Model>("Models/cube");
I have no idea what the issue is. All help points to setting the Build Action to "Content" and the Copy to Output Directory to "Always". The only clue I can think of is that originally, my project was made for Android, and on this iteration I remade it as a normal Windows project (as for whatever reason, I couldn't get an Android project to work this time).
Thanks in advance. This is really confusing.
While I doubt anyone else will have this problem, I figured out the issue. I think Monogame changed the way it loaded assets since the last time I used it. With my install of a newer version, I just had to follow the link below to get it working again.
http://rbwhitaker.wikidot.com/monogame-managing-content

DirectX Sample using DXUT Failed to create Direct3D device (Debug only)

Quite a strange problem I have here, I am trying to run the DXUT DirectX 10/11 tutorials from DirectX sample browser. They build fine, but cannot be run in Debug mode, as this triggers the error warning "Failed to create the Direct3D device". This is strange as I can run them in release mode. The strangest thing however is that they use to run in Debug mode, and I swear I changed nothing in the day it ran, and the next day that it didn't. A friend also has the same exact problem, which happened around the same time.
Has anyone ran into this problem and know of a solution, or perhaps know why its happening beyond the obvious, I have a DirectX 11 capable card if you didn't pick that up.
Thanks.
I literally just spent all day trying to fix this exact same problem. Here is the solution which should hopefully fix yours too...
I managed to find this article explaining that a recent update, (26th February 2013 to be exact), caused the older version to mess up:
http://blogs.msdn.com/b/chuckw/archive/2013/02/26/directx-11-1-and-windows-7-update.aspx
That explains why it was working fine a few weeks ago, and now it just suddenly stopped working I guess!
Following their advice, I downloaded a trial version of Visual Studio 2012, and after an hour and a half of installation time, and a system restart, you should have all the new DirectX SDK files that you need.
NOTE: You don't even have to use Visual Studio 2012. The new files should fix your issues for Visual Studio 2010 and older versions I presume!
(Before doing this I also installed all the latest drivers, but I don't think that did anything to help, but it's worth upgrading drivers whenever you can, as that has fixed a similar issue I had before).
Hope this helps!!! :)
Somewhere in your code you probably have something along the line of this
#if defined(DEBUG) || defined(_DEBUG)
createDeviceFlags |= D3D10_CREATE_DEVICE_DEBUG;
#endif
If you do take a look at the D3D10_CREATE_DEVICE_DEBUG; on the msdn you will see this
To use this flag, you must have D3D11_1SDKLayers.dll installed;
otherwise, device creation fails.
You should check that you do have that dll in your system or you should reinstall the DirectX SDK.
The automatic IE10 update is what caused my issue of automatic non support of directx development. Simplest solution is downloading standalone win8 sdk at...
http://msdn.microsoft.com/en-us/windows/desktop/hh852363
The directx debug layer dll has to be updated.

Resources