Forum Visual Studio

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

System.Runtime.InteropServices.COMException (0x80070032)

I have a .NET app that runs and compiles fine in VS2013 and Compiles fine in Xamarin 4.2.2 but when I try to run it, I get the error below.
I have tried setting the project to release and 32bit (although I do not see these options being saved when I go back into the project properties) and nothing works. I believe this is a straight up bug.

System.Runtime.InteropServices.COMException (0x80070032): The request is not supported. (Exception from HRESULT: 0x80070032)
at Microsoft.Samples.Debugging.CorDebug.NativeApi.ICorDebug.CreateProcess(String lpApplicationName, String lpCommandLine, SECURITY_ATTRIBUTES lpProcessAttributes, SECURITY_ATTRIBUTES lpThreadAttributes, Int32 bInheritHandles, UInt32 dwCreationFlags, IntPtr lpEnvironment, String lpCurrentDirectory, STARTUPINFO lpStartupInfo, PROCESS_INFORMATION lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags, ICorDebugProcess& ppProcess)
at Microsoft.Samples.Debugging.CorDebug.CorDebugger.CreateProcess(String applicationName, String commandLine, SECURITY_ATTRIBUTES processAttributes, SECURITY_ATTRIBUTES threadAttributes, Boolean inheritHandles, Int32 creationFlags, IntPtr environment, String currentDirectory, STARTUPINFO startupInfo, PROCESS_INFORMATION& processInformation, CorDebugCreateProcessFlags debuggingFlags)
at Microsoft.Samples.Debugging.CorDebug.CorDebugger.CreateProcess(String applicationName, String commandLine, String currentDirectory, IDictionary`2 environment, Int32 flags)
at MonoDevelop.Debugger.Win32.CorDebuggerSession.<>c__DisplayClass5.b__4()
at MonoDevelop.Debugger.Win32.MtaThread.Run(Action ts)
at MonoDevelop.Debugger.Win32.CorDebuggerSession.OnRun(DebuggerStartInfo startInfo)
at Mono.Debugging.Client.DebuggerSession.<>c__DisplayClass10.b__e()

Posts

  • mhutchmhutch USMember, Xamarin Team Xamurai

    This is bug 753. Our debugger for the MS.NET runtime does not support debugging 64-bit processes. Try setting the architecture of your exe to 32-bit.

  • chicaneLLCchicaneLLC USMember

    I realize that it is a bug but I seem to not be able to set the solution or individual projects to 32 bit. I tried setting them but they do not seem to save as 32 bit.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    You need to check that this is set: Build->Compiler->Platform target->x86

  • chicaneLLCchicaneLLC USMember

    I did that. And in each of my projects the only option I have when I pull the dropdown is Any CPU.

  • chicaneLLCchicaneLLC USMember

    Ok, I changed all projects within the solution to x86 and I get the same exact error.

  • chicaneLLCchicaneLLC USMember

    OK, I created a fresh ASP.NET solution directly from Xamarin Studio. I changed everything to x86. When i try to run it in debug mode I get THE EXACT SAME ERROR. I really don't know how you guys can expect developers to make the leap from a polished product like Visual Studio to a product like Xamarin which simply is not that mature.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Ah, you didn't say it was ASP.NET. That makes it bug 11207.

    You can work around it by using the Mono runtime.

    Be aware that ASP.NET support in Xamarin Studio is not a Xamarin-supported feature. I do what I can to maintain it in my spare time and sometimes people contribute fixes to MonoDevelop, which then get integrated into XS.

  • chicaneLLCchicaneLLC USMember

    Whoa, what do you mean ASP.NET is not a supported feature? If .NET apps are not supported what is the reason for Xamarin Studios existence? ASP.NET project templates are built into Xamarin Studio I start Xamarin, select ASP.NET and click run. I should get the same result as I do with Visual Studio. And my earlier bug was related to a WCF service and MVC 4 app that I was trying to run. That STILL doesn't work in Xamarin.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Xamarin Studio is based on MonoDevelop, which is an open-source project. Xamarin does most of the development on MonoDevelop, but is focused on the core features that are directly relevant to developing apps in C# using Xamarin's products Xamarin.iOS, Xamarin.Android and Xamarin.Mac.

    MonoDevelop features for developing using other languages and frameworks such as ASP.NET, VB.NET, C/C++ etc. are somewhat reliant on community contributions.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    Given @chicaneLLC's experiences, I wonder if maybe it'd be best if we moved some of these addins (such as ASP.NET, VB.NET, C/c++, etc) out of the core product and into a optional/downloadable add-in to prevent users who are new to Xamarin Studio from thinking that those project types are representative of the overall quality of Xamarin Studio.

    Unfortunately @chicaneLLC is not the first (nor likely to be the last) user who has run into these issues and gotten a bad first impression of Xamarin Studio because of it.

    Might be something for us to think about...

  • chicaneLLCchicaneLLC USMember

    I've got a better idea, how about you just fix the bugs so that Xamarin Studio works correctly with .NET.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    We would happily accept patches to improve the free, open-source, community-contributed parts of MonoDevelop.

    We do what we can, but obviously we have finite resources and have to prioritize work on our commercial products - Xamarin.Android, Xamarin.iOS and Xamarin.Mac.

  • chicaneLLCchicaneLLC USMember

    One of the hallmarks of Xamarin/Mono is the ability to build and run .NET apps. If I can create a blank .NET project and immediately run it then you guys have a serious problem with your product.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    ASP.NET is not part of any Xamarin product. Mono's open-source ASP.NET support is included in Xamarin Studio as a convenience, not as a supported feature.

    Apologies for any confusion. I'm not sure how we could make this clearer, except for removing it entirely.

  • ChrisBarrChrisBarr USMember

    How exactly do you "You can work around it by using the Mono runtime."?
    Obviously a new Xamarin user that doesn't know every setting by heart.

  • ChrisBarrChrisBarr USMember

    Although I agree completely that whatever the core product ships with, should have core support. If C#.NET web applications do not have core support in Xamarin, it should not ship with it.

    Although only 30 days for R&D evaluation in Visual Studio is miserably short as well where you cannot always commit enough time to R&D. It would be much easier if the compiled app would only run on the emulator for free. That is why I tried doing web dev in Xamarin to see if it's usable as an IDE at all and then find that it can't debug.
    Kinda leaves a horrible taste in my mouth for the product.

Sign In or Register to comment.