- Home
- Forum
- Xamarin.Forms
- Preview doesn't work for SfButton on Visual Studio Mac
Preview doesn't work for SfButton on Visual Studio Mac
When I have SfButton in my XAML the previewer stop working with the following error, this happening on Visual Studio Mac.
MonoTouch.Design.Client.InvalidSessionException: Error in the application.
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x000ac] in /Users/vsts/agent/2.142.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:239
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse] (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/vsts/agent/2.142.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:243
at MonoTouch.Design.Client.ServerProcessConnection.RenderXamls (MonoTouch.Design.DesignSession session, MonoTouch.Design.XamlRenderContext context) [0x0000e] in /Users/vsts/agent/2.142.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:177
at Xamarin.Designer.Forms.Preview.iOSXamlRenderer+<>c__DisplayClass3_0.<RenderXamls>b__0 (MonoTouch.Design.Client.ServerProcessConnection c) [0x00000] in /Users/vsts/agent/2.142.1/work/1/s/Xamarin.Designer.Forms/Xamarin.Designer.Forms.Preview/iOS/iOSXamlRenderer.cs:56
at MonoTouch.Design.Client.IPhoneDesignerSession+<>c__DisplayClass268_0`1[TResult].<EnsureSession>b__0 () [0x002bb] in /Users/vsts/agent/2.142.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:2023
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-06/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:545
at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-06/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2344
--- End of stack trace from previous location where exception was thrown ---
at Xamarin.Designer.Forms.Preview.iOSXamlRenderer.RenderXamls (MonoTouch.Design.XamlRenderContext context, System.Threading.CancellationToken token) [0x00210] in /Users/vsts/agent/2.142.1/work/1/s/Xamarin.Designer.Forms/Xamarin.Designer.Forms.Preview/iOS/iOSXamlRenderer.cs:56
SIGN IN To post a reply.
7 Replies
MS
Mugundhan Saravanan
Syncfusion Team
February 7, 2019 03:50 PM UTC
Hi Almis,
Greeting from Syncfusion.
We have prepared the simple SfButton sample and we have deployed the sample in Visual Studio Mac. On checking the xaml design with previewer we were unable to reproduce the exception. We have provided the sample with the screenshot of the previewer in iOS. Please check the screenshot as reference from the below link.
Screenshot:
Please try our sample and check whether you could reproduce the reported issue in previewer. If not please let us know in which scenario you could reproduce the issue. It will help us to provide exact solution for your requirement.
Regards,
Mugundhan S.
Mugundhan S.
RO
Roy
April 29, 2020 12:01 AM UTC
I'm also having the same issue on Visual Studio Enterprise 2019 running on Windows 10 (see my configuration at the end of this message).
I was getting the MonoTouch error whenever a SyncFusion control was added to the solution. Then I read somewhere to reinstall XCode on the Mac to install the latest version of MonoTouch. After doing that, I was prompted on Visual Studio (Windows 10) to reinstall MonoTouch because there was a discrepancy on the MonoTouch version on the Mac. I clicked YES to reinstall MonoTouch, I believe Visual Studio forced an updated on the Mac.
After that, I started getting
An exception occurred while rendering the control.
System.IO.FileNotFoundException was thrown.
Could not load the file 'Xamarin.Forms.Platform.iOS'
Has anybody found a solution for this problem? The preview works fine if I use the original Xamarin controls.
Microsoft Visual Studio Enterprise 2019
Version 16.5.4
VisualStudio.16.Release/16.5.4+30011.22
Microsoft .NET Framework
Version 4.8.03752
ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools
ASP.NET and Web Tools 2019 16.5.236.49856
ASP.NET and Web Tools 2019
ASP.NET Web Frameworks and Tools 2019 16.5.236.49856
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 16.5.236.49856
Azure Data Lake Node 1.0
Azure Data Lake Tools for Visual Studio 2.4.5000.0
Microsoft Azure Data Lake Tools for Visual Studio
Azure Functions and Web Jobs Tools 16.5.236.49856
Azure Stream Analytics Tools for Visual Studio 2.4.5000.0
C# Tools 3.5.0-beta4-20153-05+20b9af913f1b8ce0a62f72bea9e75e4aa3cf6b0e
Common Azure Tools 1.10
Extensibility Message Bus 1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
Fabric.DiagnosticEvents 1.0
IntelliCode Extension 1.0
Microsoft Azure HDInsight Azure Node 2.4.5000.0
Microsoft Azure Hive Query Language Service 2.4.5000.0
Microsoft Azure Service Fabric Tools for Visual Studio 16.0
Microsoft Azure Stream Analytics Language Service 2.4.5000.0
Microsoft Azure Stream Analytics Node 1.0
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30207.1
Microsoft Continuous Delivery Tools for Visual Studio 0.4
Microsoft JVM Debugger 1.0
Microsoft Library Manager 2.1.25+gdacdb9b7a1
Microsoft MI-Based Debugger 1.0
Microsoft Visual C++ Wizards 1.0
Microsoft Visual Studio Tools for Containers 1.1
Microsoft Visual Studio VC Package 1.0
Mono Debugging for Visual Studio 16.5.514 (c4f36a9)
NuGet Package Manager 5.5.0
Office Developer Tools for Visual Studio 16.0.29724.00
ProjectServicesPackage Extension 1.0
Snapshot Debugging Extension 1.0
SQL Server Data Tools 16.0.62003.05170
Syncfusion UWP Project Templates 18.1.0.42
Syncfusion Xamarin Project Templates 13.4.0.53
Syncfusion Xamarin Toolbox 16.2.0.19
Syncfusion.VSExtension.Troubleshooter 18.1.0.42
SyncfusionMenu Extension 1.0
SyncfusionXamarinMenu Extension 1.0
ToolWindowHostedEditor 1.0
TypeScript Tools 16.0.20225.2001
Visual Basic Tools 3.5.0-beta4-20153-05+20b9af913f1b8ce0a62f72bea9e75e4aa3cf6b0e
Visual F# Tools 10.8.0.0 for F# 4.7 16.5.0-beta.20181.6+85af456066acd4e76d2bc7821b44a325e46f2fca
Visual Studio Code Debug Adapter Host Package 1.0
Visual Studio Container Tools Extensions (Preview) 1.0
Visual Studio Tools for Containers 1.0
Visual Studio Tools for Kubernetes 1.0
VisualStudio.DeviceLog 1.0
VisualStudio.Foo 1.0
VisualStudio.Mac 1.0
Workflow Manager Tools 1.0 1.0
Xamarin 16.5.000.533 (d16-5@9152e1b)
Xamarin Designer 16.5.0.470 (remotes/origin/d16-5@681de3fd6)
Xamarin Templates 16.5.49 (0904f41)
Xamarin.Android SDK 10.2.0.100 (d16-5/988c811)
Mono: c0c5c78
Java.Interop: xamarin/java.interop/d16-5@fc18c54
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.28.0@46204c4
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-5@9f4ed4b
Xamarin.iOS and Xamarin.Mac SDK 13.16.0.13 (b75deaf)
RO
Roy
April 29, 2020 12:25 AM UTC
I just noticed that there's a new SyncFusion update available (on 28-Apr-2020).
After updating SyncFusion controls, I was able to render in the iOS simulator.
To update SyncFunsion:
- In Visual Studio, choose from the menu Tools > NuGet Package Manager > Manage NuGet Packages for Solution...
- At the top, click on the Updates tab
- Select all packages, then click Update.
RO
Roy
April 29, 2020 12:27 AM UTC
I celebrated too early. It worked for a few minutes, until other NuGet Packages appeared on the update list. After updating those packages, the iOS preview was broken again.
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> MonoTouch.Design.Client.InvalidSessionException: Error in the application.
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning) in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 235
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse](CommandRequest req, Boolean throwIfNotRunning) in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession() in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 111
at MonoTouch.Design.Client.ServerProcessConnection.<CreateSessionAsync>b__28_0() in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 116
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass289_1`1.<EnsureSession>b__1(Task`1 t) in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 2072
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass289_0`1.<EnsureSession>b__0() in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 2146
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Xamarin.Designer.Forms.Preview.iOSXamlRenderer.<RenderXamls>d__3.MoveNext() in E:\A\_work\283\s\Xamarin.Designer.Forms\Xamarin.Designer.Forms.Preview\iOS\iOSXamlRenderer.cs:line 72
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> MonoTouch.Design.Client.InvalidSessionException: Error in the application.
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning) in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 235
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse](CommandRequest req, Boolean throwIfNotRunning) in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession() in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 111
at MonoTouch.Design.Client.ServerProcessConnection.<CreateSessionAsync>b__28_0() in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 116
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass289_1`1.<EnsureSession>b__1(Task`1 t) in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 2072
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) MonoTouch.Design.Client.InvalidSessionException: Error in the application.
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning) in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 235
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse](CommandRequest req, Boolean throwIfNotRunning) in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession() in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 111
at MonoTouch.Design.Client.ServerProcessConnection.<CreateSessionAsync>b__28_0() in E:\A\_work\283\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 116
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---
<---
AS
Anandraj Selvam
Syncfusion Team
April 29, 2020 11:03 AM UTC
Hi Roy,
We have checked that reported issue again with our end and it seems like a framework level issue, could you please ensure or follow up this with below mentioned Xamarin support
Please let us know if you need any further assistance.
Regards,
Anand Raj S.
RO
Roy
April 29, 2020 09:45 PM UTC
I found a workaround. You need to use Xamarin.Forms Version 4.5.0.356 in your projects.
I posted the steps in the Xamarin.Forms Forum:
SJ
Suyamburaja Jayakumar
Syncfusion Team
April 30, 2020 07:26 AM UTC
Hi Roy,
Thanks for your suggestion. we are glad to hear that your requirement has been achieved.
Please let us know if you need any further assistance on this.
Regards,
Suyamburaja J.
SIGN IN To post a reply.
- 7 Replies
- 5 Participants
-
AB Almis B
- Feb 6, 2019 10:50 PM UTC
- Apr 30, 2020 07:26 AM UTC