We are experiencing a strange problem with a software we already developed few month ago, today we had to reopen the app for the customer to make some improvement. But a strange exception start to show up. it seem that is coming from the ScatterView
. But the strange thing the app is working on production and the code is the same what could be the cause?
Here the exception.
System.TypeInitializationException was unhandled
HResult=-2146233036
Message=The type initializer for 'Microsoft.Surface.Presentation.Input.InteractiveSurface' threw an exception.
Source=Microsoft.Surface.Presentation
TypeName=Microsoft.Surface.Presentation.Input.InteractiveSurface
Here you can find the full stack trace http://pastebin.com/y3vVurfm
Thanks I forgot to say the app is developed on .net 4.5
I encountered the same problem and finally found a solution:
The exception is thrown by a function in
GetItemOrientation
inMicrosoft.Surface.Presentation.Controls.ScatterCanvas
.You can omit the failing function call in
GetItemOrientation
by setting theOrientation
property on theScatterViewItem
yourself or by settingScatterViewItem.CanRotate = false
.The runtime exception you are facing might be the result that you are compiling for Any CPU and are now using an x64 operating system. You can overcome this by recompiling for x86 only.
Please note: on Windows 8 there are some other restrictions in regard to have an application running that targets Microsoft Pixelsense / Samsung SUR40 (touch events not being reported). The Pixelsense SDK was created when Microsoft Windows 8 wasn't released yet, so don'T expect this being supported.
If you want to have support for both platforms see https://blogs.sevensteps.com/Lists/Posts/Post.aspx?ID=10 for an idea on how to achieve this.