cancel
Showing results for 
Search instead for 
Did you mean: 

visual studio 2022​ 64bits IISExpress 32bit

0 Kudos
2,537

I have visual studio 2022 and download SAP Crystal Reports for Visual Studio (SP32) installation package for Microsoft Visual Studio IDE (VS 2022 and above) all on 64bit.


At the end of the instalation process it asked to instal 32bit runtime, and i was agreed.


Now, I need to run a web project from visual studio, that run on IISExpress 32bits, and here become the problems, IISExpress (32bits) told me i got a system.BadimageFormatException loading CrystalDecisions.ReportAppServer.ClientDoc


So, i looked on the instalation folder and i saw the path: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet


but i need this path too: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet

Actually the path is created but only have one file: CrystalDecisions.Data.AdoDotNetInterop.dll

what can i do? thanks for your time and help

I read all the FAQ, i searched on google, i asked in the online chat, and here i am jeje

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Finally i got it. The problem was local copy option from the reference, i changed that to false and all the thing run very nice. Thanks for your valuable time Don Williams, i appreciate it man

Answers (4)

Answers (4)

0 Kudos

CR runtime is for your application and not the OS.

Run the installer again and check the option on to install the 32 bit runtime.

If you don't install it how do you expect your app to work?

0 Kudos

that's what i did the first time. But i did it again. I uninstalled all, and installed again only SAP Crystal Reports for Visual Studio (SP32) installation package for Microsoft Visual Studio IDE (V... file CRforVS6413SP32_0-80007712.EXE, and this time i check "yes, install 32-bit runtime". Compile, run and again the same error:

System.BadImageFormatException uploading CrystalDecisions.ReportAppServer.ClientDoc or a dependency

Maybe is the way i added the reference to my project, i just go to references, right click, select add reference, go to assemblies-extentions, and finally select CrystalDecisions.CrystalReports.Engine, CrystalDecisions.ReportSource, CrystalDecisions.Shared

i do something wrong?

0 Kudos

i uninstalled all Crystal Reports things

then i installed only SAP Crystal Reports for Visual Studio (SP32) installation package for Microsoft Visual Studio IDE (V... file CRforVS6413SP32_0-80007712.EXE

when it asked me this:

i said no, i dont want it, finish. Then i compiled again and is the same. Sorry, what am i doing wrong?

here is my visual studio configuration for the web project:

thanks for your time, i really appreciate it

0 Kudos

Did you uninstall and reinstall the correct EXE that supports VS 2022?

That is a must to do.

It also fills the x86 folder with the 32 bit runtime by using the proper installer.

0 Kudos

Hi Jesus,

VS 2022 is a 64 bit application so you need to install the CR for vS 64 bit Installer, doesn't matter what you want to run your app in. CR for VS is set to your application mode, not the OS.

So don't run the 32 bit EXE for VS 2022, it's not designed to fully integrate into VS 2022 and is only for those still using VS 2010->2019.

Uninstall the 32 bit runtime and the EXE and and the install the SP 32 for VS 2022: CR for Visual Studio SP32 64b installer (VS 2022 and above)

Note the name - CR for Visual Studio SP32 32b installer (VS 2019 and below)

In your web app change the properties for WEB and set IISExpress to run into 32 bit mode.:

Once you do that then you can use 32 bit IISExpress when you build the project and set accordingly.

Also, I highly recommend converting to 64 bit completely, it's that time now, I started when everything was 16 bit and 32 bit was new, same again, ALL motherboards support 64 bit so no reason any more to use 32 bit, except of course for those third party dependencies and still have not upgraded to 64.

See my WIKI for more info:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

0 Kudos

Hi Don thanks for helping me. Yes, i have some dll 32 bits dependencies, so i need to run my web in 32bits

i change the configuration this way:

build x86

web IISExpress Bitness x86

Run

and then, IIS Express show me a System.BadImageFormatException uploading CrystalDecisions.ReportAppServer.ClientDoc or a dependency

what i done wrong?