Skip to Content
avatar image
Former Member

WPF.Viewer not being included with ClickOnce Application

Hi all,

I'm trying to deploy my application written in C# with Visual Studio and Crystal Reports. It works fine on the development machine, but when I try and publish it as a ClickOnce application I get the following error:

Problem signature:

Problem Event Name:CLR20r3

Problem Signature 01:FGMInventory.exe

Problem Signature 02:

Problem Signature 03:582f28d7

Problem Signature 04:SAPBusinessObjects.WPF.Viewer

Problem Signature 05:

Problem Signature 06:57613507

Problem Signature 07:234

Problem Signature 08:0

Problem Signature 09:System.InvalidCastException

OS Version:6.1.7601.

Locale ID:1033

Additional Information 1:0a9e

Additional Information 2:0a9e372d3b4ad19135b953a78882e789

Additional Information 3:0a9e

Additional Information 4:0a9e372d3b4ad19135b953a78882e789

I have the "SAP Crystal Reports Runtime Engine for .Net Framwork" marked as a prerequisite to download from the vendor's website, which it does on install (as far as I can tell successfully). But whenever the application is opened the error it thrown.

It looks like the wpf viewer dll isn't being included? But I have no idea how to manually include this with the clickonce application.

Attached is a stack trace I tried to pull with a debugger.

Any insight is much appreciated! Thank you in advance!

error.txt (29.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 18, 2016 at 09:16 PM

    Hi Mark,

    The important part of the error is

    Object reference not set to an instance of an object.

    That usually means the app cannot find the report it's trying to open. Either it doesn't exist or permissions are required to get to it.

    Wrap your Open() statement in a try/catch and see if it logs anything else.

    Make sure you set the Project for X86 and not AnyCPU, the MSIExec installer will detect a 64 bit OS and install the 64 bit runtime.

    Check the Programs and Features to confirm the 32bit runtime was installed.


    Add comment
    10|10000 characters needed characters exceeded