An error occurred after compiling on iOS.
I am using mac OS on virtualbox to open the iOS emulator.
Xamarin.Forms adds WCF service.
could not be compiled.
Code in reference file
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
ServiceGolf.CheckLoginResponse ServiceGolf.ServiceGolfSoap.CheckLogin(ServiceGolf.CheckLoginRequest request)
{
return base.Channel.CheckLogin(request);
}
Error Messages
System.InvalidOperationException: 'MonoTouch does not support dynamic proxy code generation. Override this method or its caller to return specific client proxy instance'
enter image description here
Pictures show all information https://ibb.co/p4m7z59
Related
I recently tried to implement Microsoft.AppCenter.Crashes to help track down crashes in my team's Xamarin.Forms app. However, when a crash happens on our iOS project, AppCenter never detects it. I've created the following function for setup and checking, which gets called near the start of our central project's App.xaml.cs App constructor:
private async Task CheckForPreviousCrash()
{
//Setup AppCenter
await Xamarin.Forms.Device.InvokeOnMainThreadAsync(() =>
{
//Keys changed in StackOverflow post for security reasons.
AppCenter.Start("ios=########-####-####-####-############;android=########-####-####-####-############;uwp=########-####-####-####-############", typeof(Crashes));
AppCenter.IsNetworkRequestsAllowed = false; //Prevents sending user data to Microsoft. Required by company
});
//Make sure AppCenter is working
bool isEnabled = await Crashes.IsEnabledAsync();
if (!isEnabled)
{
_logger.LogError("AppCenter could not be started");
}
else
{
//Check for memory leak warnings
bool memoryIssue = await Crashes.HasReceivedMemoryWarningInLastSessionAsync();
if (memoryIssue)
{
_logger.LogError("AppCenter detected a memory warning in the last session");
}
//Check for crash info
bool crashed = await Crashes.HasCrashedInLastSessionAsync();
if (crashed)
{
var report = await Crashes.GetLastSessionCrashReportAsync();
_logger.LogCrashReport(report);
}
//If AppCenter detected no issues in the last session, log an "all clear" message
if (!memoryIssue && !crashed)
{
_logger.LogInformation("AppCenter did not detect a crash in the last session");
}
}
}
I've tested this code using the Crashes.GenerateTestCrash() function, one of the crashes my team is trying to resolve, and a simple recursive function that calls itself forever. When run on iOS, our logs will always show the "AppCenter did not detect a crash in the last session" message, regardless of if a crash occurred. Any help determining what could be causing this would be appreciated.
Notes:
The iOS project is always run without a debugger attached. I'm aware of the rule that crash reports will not be generated if iOS has a debugger attached
This has been seen when built using both Debug and Release mode
This code works as expected on our Android and UWP projects
The iOS project always passes the isEnabled check
This is running AppCenter and AppCenter.Crashes version 4.5.0
This is running on a 7th gen iPad on iOS 15.2.1
EDIT: Extra notes in response to a suggested answer:
The Mac used to build the iOS project is running macOS 11.6.2
Project is built using XCode 13.2.1
The Xamarin Forms project is built in Visual Studio 2019 16.11.7, and sent to the connected mac via Visual Studio's "Pair to Mac" feature
There are no other libraries used for crash reporting (the closest used is Serilog, which should only be handling logging)
We do not use CocoaPods to integrate AppCenter
You can check if you meet the requirements as following shows:
-Your iOS project is set up in Xcode 11 or later on macOS version 10.14.4 or later.
-You're targeting devices running on iOS 9.0 or later.
-You're not using any other library that provides Crash Reporting functionality (only for App Center Crashes).
-If you are using CocoaPods to integrate App Center, you need CocoaPods version 1.10 or later.
App Center SDK Analytics and Crashes are compatible with Mac Catalyst via XCFramework or SwiftPM.
Here are more detail about appcenter crashed on ios https://learn.microsoft.com/en-us/appcenter/sdk/getting-started/ios
I am trying to create app package for a UWP app (side loading) in release mode it fails with below error. It works fine for debug mode
Severity Code Description Project File Line Suppression State
Error ILT0021: Could not resolve type
'System.Security.SecurityZone' MyApp.ModuleName
Project Properties
When I enable Compile with .NET Native tool chain, I get following error
Severity Code Description Project File Line Suppression State
Error ILT0005:
'C:\Users\username.nuget\packages\runtime.win10-x86.microsoft.net.native.compiler\2.1.8\tools\x86\ilc\ilc.exe
--gatekeeper #"C:\Projects......\obj\x86\Release\ilc\intermediate\gkargs.rsp"'
returned exit code 1 MyApp.Module
When I try to do build on Azure DevOps I get this error
(BuildNativePackage target) -> 2019-02-06T15:14:28.4996296Z
C:\Program Files (x86)\Microsoft
SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.1\tools\Microsoft.NetNative.targets(792,5):
error : ILT0021: Could not resolve type 'System.Security.SecurityZone'
[D:\a\1\s\ProjectFolder\MyApp.ModuleName.csproj]
Update 02/14/2019
Problem was with bunch of Powershell packages I installed from nuget, I removed it all now I am able to create the package. But the package fails to pass App Certification Kit test with the following errors
Windows security features test
FAILED Binary analyzer Error Found: The binary analyzer test detected
the following errors: File C:\Program
Files\windowsapps\myapp.module.subver_1.0.21.0_x64__7p23rrj50tgdp\clrcompression.dll
has failed the AppContainerCheck check.
Supported API test
FAILED Supported APIs Error Found: The supported APIs test detected
the following errors: API sysctl in libc.dll is not supported for this
application type. Microsoft.DotNet.PlatformAbstractions.dll calls this
API. API RtlGetVersion in ntdll.dll is not supported for this
application type. Microsoft.DotNet.PlatformAbstractions.dll calls this
API. API LoadLibraryExW in kernel32.dll is not supported for this
application type. clrcompression.dll calls this API. API
RtlCaptureContext in kernel32.dll is not supported for this
application type. clrcompression.dll calls this API. API
RtlVirtualUnwind in kernel32.dll is not supported for this application
type. clrcompression.dll calls this API. API UnhandledExceptionFilter
in kernel32.dll is not supported for this application type.
clrcompression.dll calls this API. API ExecuteAssembly in uwphost.dll
is not supported for this application type.
MyApp.Subver.exe calls this API. API
DllGetActivationFactory in uwphost.dll is not supported for this
application type. Myapp.subver.exe has an export that
forwards to this API.
I am developing a VR application using Unity 2018.2.8f1 and the TrinusVR lib (a framework that does serverside rendering). When I press play in the editor or build for Linux it works as expected. However, when using the Windows build, only about one frame gets transmitted to the client, then the connection is reset. On the client it shows the errors:
Error streaming video error: java.net.SocketException: Connection reset
Error Error delivering sensor data: java.net.SocketException: Connection reset
Digging into into the logs of the server it seems that this reset is caused by a null reference exception:
Disconnected (Reason: ERROR:ERR_IMG_PROC:Could not deliver frame to client.
System.TypeInitializationException: The type initializer for 'ManagedToNativeWrapper' threw an exception. --->
System.NullReferenceException: Object reference not set to an instance of an object
at System.Drawing.ComIStreamMarshaler+ManagedToNativeWrapper..cctor () [0x00049] in :0`
Does somebody know, what is wrong here? Has anybody seen this problem before?
You can find the complete log files (Windows 10 server and android 7 client) here:
https://transfernow.net/419cp2m92898
Thank you
Turns out that it actually is a problem of the .NET version on Windows as the trinus lib is made for an older version. Setting the right parameters in Edit > Project Settings > Player, section Other Settings, resolves:
Scripting Runtime Version: .NET 3.5 Equivalent
Api Compatibility Level: .NET 2.0
I am trying run a Xamarin iOS app on a device with Visual Studio. However I get the following error:
Error MT4116: Could not register the assembly 'Xamarin.Auth.iOS':
error MT4118: Cannot register two managed types
('Xamarin.Controls.ProgressLabel, Xamarin.Auth.iOS' and
'Xamarin.Controls.ProgressLabel, Xamarin.Auth') with the same native
name ('Xamarin_Controls_ProgressLabel'). (MT4116)
The ProgressLabel class seems to be defined in Xamarin.Auth.iOS and Xamarin.Auth twice.
Does anyone have an idea how to solve this?
I created form as webpart for Sharepoint Foundation 2010 with custom PickerEntity (used for pick IDs from MS SQL).
When I deployed webpart to development environment (through right-click on project -> deploy), everything worked fine.
When I deployed this webpart as .wsp Package to test or production environment (Release build config), I got error when in form in PickerEntity was saved wrong (non-exist) ID.
Error:
Message: System.MissingMethodException: Method not found: 'Microsoft.SharePoint.WebControls.PickerEntity[] Microsoft.SharePoint.WebControls.EntityEditor.ResolveErrorBySearch(System.String)'.
It should write error message on form "No exact match was found. Click the item(s) that did not resolve for more options.", but in runs to this error and fails to load rest of the form.
Class with method:
public class VendorEditor : EntityEditorWithPicker
{
.....
protected override PickerEntity[] ResolveErrorBySearch(string unresolvedText)
{
return base.ResolveErrorBySearch(unresolvedText);
}
.....
}
The error is "method not found"
What may be happening is:
It cannot find the method because it cannot find the dll
It cannot find the dll since a feature is not turned on
Check what is activated on your development machine compared with what is activated in production.