Compiling with 32-bit flag

Phalanger Tools for Visual Studio [?] is complete PHP/Phalanger integration into Visual Studio development environment.

Compiling with 32-bit flag

Postby mlavinder » November 5th, 2013, 5:53 pm

Is there a way to setup Visual Studio to mark the assembly as requiring 32-bit without having to run a separate command? When I compile the project DEBUG it is fine, but as RELEASE I get a message saying:

Unhandled Exception: PHP.Core.PhpNetInternalException: Guarded call
InnerException: Native extension support is not available in 64-bit processes.
Please run this process on 32-bit OS or mark it as X86 using 'corflags.exe'.


I used corflags to mark it, but that seems like the Tool should have a way to do this but I cannot figure out how.
mlavinder
 
Posts: 3
Joined: November 5th, 2013, 5:50 pm

Re: Compiling with 32-bit flag

Postby Jakub Misek » November 5th, 2013, 7:01 pm

Hi,

Thanks for the question.

In debug, assemblies are compiled as x86 to allow integration with Visual Studio debugger.

In release, assemblies are marked as AnyCPU. As you noticed, the only issue is the native extensions support which works only in x86.

Currently there isn't any option for that. For web sites, you can configure Application Pool to "Run 32 bit application" as True. For console/winform apps, corflags is the only option.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Compiling with 32-bit flag

Postby mlavinder » November 5th, 2013, 7:59 pm

I had seen that post-build events had been disabled. Is that still the case? Any idea when they will be re-enabled?
mlavinder
 
Posts: 3
Joined: November 5th, 2013, 5:50 pm

Re: Compiling with 32-bit flag

Postby Jakub Misek » November 5th, 2013, 10:49 pm

They should work, there is just no UI for them. I think if you add post build directly to .phpproj file, it should work.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to Phalanger Tools

Who is online

Users browsing this forum: No registered users and 20 guests

cron

User Control Panel

Login

Who is online

In total there are 20 users online :: 0 registered, 0 hidden and 20 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 20 guests