cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

log4net preventing setup project from completing.

Former Member
0 Likes
2,740

Hi,

When I attempt to build a setup project for my VB.net solution, I am getting the following ERROR.

  • File 'log4net.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86' S:\Projects\Development\VB.net\TestCRIssue\TestCRIssueSetup\TestCRIssueSetup.vdproj TestCRIssueSetup

This error is preventing the creation of the setup.exe files.

I am currently running the following setup

  • Windows 7 64 bit (fully updated)
  • Visual Studio 2010 (fully updated)
  • Crystal Reports for Visual Studio 13_0_4
  • Crystal Reports for Visual Studio redist 13_0_4 (32 bit)
  • Crystal Reports for Visual Studio redist 13_0_4 (64bit)

  • The target platform for the PROJECT solution is X86
  • The target platform for the INSALLER is X86

If I check the "exclude" option in the setup project dependencies, the error also goes away.  However, does excluding this file from the setup cause problems with the installer on the clients pc?

I can also change the target architecture to X64 in the INSTALLER project.  This works but creates an installer that will only work on x64 machines (so not very useful).

I can also uncheck the SAP Crystal Reports Runtime Engine for .NET Framework 4.0 listing in the prerequisites menu of the INSTALLER project, but I am note sure what this will accomplish.

We are experiencing the same problem on an other colleagues PC with a different project too.

I have setup a new project to test this issue (to remove all possibilities of interfearance from some DEV express add-on's).  If I simply creat a nre project with a crystal report and then create a setup project, the error occurs.

Somone please help.

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Hi Phill,

A couple of things you mentioned but could simply be terminology... VS Express is not supported, it doesn't support plug-ins.

Yes remove the dependencies, try searching there is a article on know configurations and work arounds.

If you are building for 32 bit only then no need to include or deploy the x64 package, not required for 64 bit OS that will be running a 32 bit app.

Don

Former Member
0 Likes

Hi Don,

Thanks for helping.  I am currently running Visual Studio 2010 Professional.  I was not attempting to create an x64 installer, just the 32 bit, but kept getting the error during the build stage of the setup project.  As this was an error (as apposed to a warning), it actually stopped Visual Studio from creating the Setup.exe files.

The only way I could get it to work was to change the installer project to target a x64, but that isn;t want I wanted.  No matter what I did, I couldn;t get it to build correctly.

Then I opened a project written by another colleage.  I did not run or build/rebuild simply opened it and suddenly the problem in my project was fixed.  I don't understand what has fixed the problem as I didn't do anything to fix it.

I now have 3 warnings when the setup project is built (but no errors).  I intend to create a new post on Monday to get some help.

I would still like to know what was causing the original error though.

0 Likes

Set your Project to x86 and not any CPU, I believe that is why it's asking for the x64 runtime.

As for why it works now no idea... I notice VS tends to have a mind of it's own sometimes. Could be some project build flag that was reset.

Thanks

Don

Former Member
0 Likes

Changing the compiler settings to X86 did resolve 1 of the 3 warnings.  I will open a new post for the remaining warnings.

Answers (1)

Answers (1)

Former Member
0 Likes

hi phill,

i have the same problem

os: 64 bit windows

vs: vs 2010

cr: 64bit run time

and i have to deliver the setup project to 32 bit client machines.

still i getting the log4net.dll error. pls help!

Former Member
0 Likes

Within your Visual Studio Setup project, expand the Detected Dependencies list and then right click log4net.dll and select exclude.  That worked for me.

Former Member
0 Likes

Use this search string; 'crystal log4net' in the search box at the top right corner of this web page. There is a number of KBAs that address the issue.

See if Phill's idea works out for you. If it does, please do let us know as that would be good to know - for us and the community.

If you are compiling as Any CPU, don't. Compile as either 32 or 64 bit.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Likes

Ludek, just curious, is there a particular reason this problem can't be fixed?  If log4net.dll isn't required, could you not remove if from the Crystal report add-in?  Also, is it not possible to get a 32/64 bit compatible version of it?

Former Member
0 Likes

Yes and yes. If you do the search I suggested in my previous post, you will find lots of info on the subject.

You may also want to do the following in your Visual Studio Setup project; expand the Detected Dependencies list and then right click log4net.dll and select exclude.

- Ludek