2

I have a Solution I am upgrading to Visual Studio 2013 and I'm stuck trying to get the old web service working.

When I run it, I get an error complaining that I am trying to load a 32-bit Oracle .dll into a 64-bit process. Fair enough, except that there doesn't seem to be a way to change a web service into 32-bit/x86 mode.

How do you tell Visual Studio 2013 that a particular web project should be built as 32-bit?

For a normal project you just right-click, Properties, then change the CPU type to x86. But there aren't any properties for an old web project so I'm not sure how to set it to 32-bit!

EDIT: This question explains how to create a new solution platform, but when I do so, the web project will not change to 32-bit, as you can see from this screenshot:

Configuration manager screenshot

EDIT2: @jackjop: Here is a screenshot of the right-click menu, it looks quite different to yours:

Right-click menu

Community
  • 1
  • 1
Malvineous
  • 25,144
  • 16
  • 116
  • 151

2 Answers2

2

enter image description here

Change AnyCPU to x86 or check Prefer 32-bit in Project Properties.

Also, see this answer.

Edit:

Below I created two projects in one solution(web and desktop). When I click right to web project title there's Properties at the bottom and this opens the left panel, there you can see Compile tab, and after you can change the Target CPU to x86. (For bigger image --> left click image and Open In New Tab for if you don't know.)

enter image description here

Community
  • 1
  • 1
sertsedat
  • 3,490
  • 1
  • 25
  • 45
  • 1
    How do I access the Project Properties for a web project? For the desktop app I can right-click on the project and choose Properties and I see the window in your screenshot, but for the web project when I right click on it there is no Properties option, only "Properties Window" and "Property Pages", neither of which have any method for setting the target platform. I followed the instructions on your linked answer and created a new solution platform set to x86, but this only changes my desktop app to x86, the web service project still shows as "Any CPU" and there are no other choices listed. – Malvineous Jul 07 '15 at 23:26
  • @Malvineous you have two project, as desktop project being the main project when web project only provide a web service right? – sertsedat Jul 08 '15 at 10:49
  • That's correct. I've added another screenshot showing the right-click menu I see. I'm sure sure whether the "WebApplication" in your screenshot is different to the "WebService" in mine? Thanks a lot for your help :-) – Malvineous Jul 13 '15 at 04:27
  • @Malvineous can you add the properties window too? – sertsedat Jul 13 '15 at 08:27
  • Clicking on "Properties Window" just focuses the properties tab in the bottom-right of your screenshot. This only lists items like "Always Start When Debugging", "SSL Enabled", "Managed Pipeline Mode", etc. Can't see any options to do with platforms! – Malvineous Jul 15 '15 at 07:54
2

Just change the IIS version, that Visual Studio 2013 is using to 32bit.

TOOLS / OPTIONS / Projects and Solutions / Web Projects

Uncheck "Use the 64 bit version of IIS..." enter image description here

Wize
  • 1,040
  • 9
  • 20