Tuesday, March 8, 2016

The calling thread must be STA, because many UI components require this.


  // Create a thread  
       Thread newWindowThread = new Thread(new ThreadStart(() =>  
       {  
         // You can use your code  
         // Create and show the Window  
         FaxImageLoad obj = new FaxImageLoad(destination);  
         obj.Show();  
         // Start the Dispatcher Processing  
         System.Windows.Threading.Dispatcher.Run();  
       }));  
       // Set the apartment state  
       newWindowThread.SetApartmentState(ApartmentState.STA);  
       // Make the thread a background thread  
       newWindowThread.IsBackground = true;  
       // Start the thread  
       newWindowThread.Start();  

Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file

In my Xamarin form application their was dependency Restclient on Microsoft.Bcl.Build Microsoft.Bcl. i just remove all using nuget and ...