ActiveReports for .NET 3.0 Support

Started by adamthomas at 09-10-2007 2:35 PM. Topic has 8 replies.

Print Search Rate
Sort Posts:    
   09-10-2007, 2:35 PM
adamthomas is not online. Last active: 9/11/2007 1:32:19 AM adamthomas

Not Ranked
Joined on 09-11-2007
Posts 1
ClickOnce Deployment
I have been using clickonce for a year now updating an appication that uses Active Reports .Net 3.0. I just updated my software with version 5.2.0.397 and now when my users try to get the update, it tells them that assembly ActiveReports.Interop 5.2.0.397 is required and is not installed in the Global Assembly Cache. I have never used the .Interop reference so I don't know where this message is coming from? Any help would be greatly appreciated!
   Report 
   09-11-2007, 2:06 AM
AntonM is not online. Last active: 10/4/2007 9:47:14 AM AntonM

Top 25 Posts
Joined on 01-10-2007
Posts 622
Re: ClickOnce Deployment
Hello,

The ActiveReports.Interop.DLL is the auxiliary COM interop assembly. Unsafe C# code for OLE object hosting, SystemPrinter object using and other COM functions. Please try to include this assembly to your deployment.

   Report 
   06-09-2009, 1:00 PM
jpierson is not online. Last active: 10/19/2011 4:19:44 PM jpierson

Top 75 Posts
Joined on 04-10-2009
Posts 151
Re: ClickOnce Deployment
I've just noticed the same error after trying to deploy my ClickOnce app for the first time after adding in a few ActiveReports references to some auxiliary assemblies in our project.

My question is how are we to distribute ActiveReports in this type of situation? Both SQL Server Reporting Services as well as Crystal Reports seem to provide a prerequisite installer which can be included for the app but I don't see one of these prerequesite installers for ActiveReprots after installing it. I don't mind including the dlls directly with our app but I'm not really sure how to do it for our ClickOnce app and could use a little guidance.

My project currently looks something like structure below:
  • MySmartClient.exe
    • MyReportsLibrary.dll
      • ActiveReports.Viewer3.dll
      • ActiveReports3.dll
Any suggestions on how to best achieve this would be greatly appreciated.



   Report 
   06-10-2009, 8:22 AM
SandeepS is not online. Last active: 6/22/2009 9:57:37 PM SandeepS

Top 50 Posts
Joined on 12-11-2008
Posts 269

DDStaff
Re: ClickOnce Deployment

Attachment: UsingMergeModule.txt
Hello,

You can use the Merge Module to include the Dll's in your setup project.

You can download the merge module for the build you are using from the location given below:
http://www.datadynamics.com/forums/72/ShowForum.aspx

To know how to use merge module to include the Dll's with your project,please go through the steps mentioned in the attached text file.

Regards,
Sandeep
   Report 
   06-10-2009, 9:30 AM
jpierson is not online. Last active: 10/19/2011 4:19:44 PM jpierson

Top 75 Posts
Joined on 04-10-2009
Posts 151
Re: ClickOnce Deployment
Unfortunately ClickOnce applications don't use the concept of a "setup project" we do however generally have a setup.exe bootstrapper that contains selected prerequisites which generally would be installed the first time the user attempts to run the ClickOnce installer. In order to get this method to work with ClickOnce I believe I would have to create a custom prerequisite and then include it in my ClickOnce application project.

Two down sides to this methodology:
  1. If we need to update the ActiveReports assemblies we won't be able to do it as a regular ClickOnce update which normally happens quite automatically. Instead we would have to inform all users to reinstall the prerequisite bootstrapper otherwise we they would likely recieve a quite cryptic error upon attempted auto update when launching the installed ClickOnce application.
  2. I will have to go through the extra work to create a setup project with the contents of the ActiveReports .msm merge module and to create a custom prerequisite and then I would have to have each of our developers setup this custom prerequisite in Visual Studio. When ever there is a new release of ActiveReports that we would like to deploy we will have to repeat all of these steps again.
After thinking about these two steps, I'm beginning to think that using the CopyLocal option, if I can get it to work, would be the most simplistic way to deploy ActiveReports to our customers because it would bypass the issues described above as well as require only a minimal set of ActiveReports assemblies to be downloaded/installed in order to get the application working.

The only down side would be that the ActiveReports assemblies wouldn't be placed in the GAC and therefore wouldn't have the potential to be shared with other applications. This really isn't a concern for us as it would likely be quite rare that a customer actually has other applications installed that also rely on ActiveReports and the three main DLLs we would need would only constitute about 4 to 5 MB of space total.

I think the preference as described above at this point would be to get the CopyLocal option working however based on some research it appears that the problem I have is the intendend behavior. This however, doesn't explain why for example the WPFToolkit.dll installed in the GAC and set to CopyLocal true seems to work fine and is included within our ClickOnce deployment with no problem but the ActiveReports assemblies which are referenced in the same exact way do not.

The only difference I've noticed between the two are that the WPFToolkit <Reference> element in the project file contains a <HintPath> and has no <Private> element at all, wheras after setting the ActiveReports assemblies to CopyLocal creates a <Private> element with the value of True and contains no <HintPath>. After manually fiddling around with settings in my project file I wasn't able to get any changes in behavior with regard to copying the secondary assemblies referenced assemblies to my main project bin folder as described in my original post. So far this is all I have to go off of, so it looks like WPFToolkit.dll is beign treated differently than say ActiveReports3.dll or ActiveReports.Viewer.dll and I can't figure out why.

   Report 
   06-16-2009, 9:08 AM
SandeepS is not online. Last active: 6/22/2009 9:57:37 PM SandeepS

Top 50 Posts
Joined on 12-11-2008
Posts 269

DDStaff
Re: ClickOnce Deployment
Hello,

I would like to tell you that I tested this issue at my end but was not able to replicate it. Given below are the steps that I performed:
1.Created a windows application that uses the ActiveRpeorts3.dll and ActiveReports.Viewer3.dll (5.2.1236.2).
2.Set the CopyLocal property of the Dll’s to true.
3.Deployed it using Click Once Deployment (Published it).
4.Opened the link in another system in which ActiveReports is not installed.
5.Got the option to Install it.
6.Uninstalled the build 5.2.1236.2.Installed build 5.2.1255.2.
7.Add the Dll’s according to the build 5.2.1255.2 and set the CopyLocal to true.
8.Published it again.
9.Run the application again and this time got a message box that the application is updated. Clicked on OK

If I am missing something, please modify the steps mentioned above.
Any further information to narrow down the issue would be highly appreciated.

Regards,
Sandeep

   Report 
   06-16-2009, 9:52 AM
jpierson is not online. Last active: 10/19/2011 4:19:44 PM jpierson

Top 75 Posts
Joined on 04-10-2009
Posts 151
Re: ClickOnce Deployment
First of all, thanks for looking into this issue. The main difference that I can see is that in your test in step one you describe the Windows Application as using ActiveReports3.dll and ActiveReports.Viewer3.dll. However if you look at my assembly hierarchy (re-posted below) it shows a Windows Application without any direct references to ActiveReports assemblies but instead has a reference to another class library in my project which contains the references to these Active Reports assemblies.
  • MySmartClient.exe
    • MyReportsLibrary.dll
      • ActiveReports.Viewer3.dll
      • ActiveReports3.dll
      • WPFToolkit.dll

A shortcut to testing without involving ClickOnce is just to look in the output folder of the main application MySmartClient.exe after building the solution and you will see that there are no sign of ActiveReports.Viewer3.dll or ActiveReports3.dll. If there are not here they won't be included in the ClickOnce deployment either.

MySmartClient\Debug\bin\
MySmartClient.exe
MyReportsLibrary.dll
WPFToolkit.dll


The good news is that after directly referencing the ActiveReports libraries in my main application I was able to successfully deploy my ClickOnce application as you also described. The problem is however that this really isn't the way dependencies are supposed to be resolved. I shouldn't have to hunt through all assemblies used by my main application to find out their dependencies in order to also add these same dependencies to my main application simply for deployment purposes. The crux of the problem is that Microsoft at some point decided that during a build that assemblies in the GAC on the development machine would be assumed to be in the GAC as well on client machines and thus the assemblies are not copied local even when they are specified to do so. This means that the other solution would be to remove the ActiveReports assemblies from the GAC on my development/build machine in order to create my deployment but this also isn't feasible.

So after reading resources on MSDN I guess that even though it is unfortunate, this behavior is by design and thus should be expected however I think it is less than desirable and more importantly it still doesn't explain why the WPFToolkit dll doesn't seem to be plagued by the same problem. So I've been using the WPFToolkit case as example that there may be hope that this can work the way I want it to.


   Report 
   06-17-2009, 5:59 AM
SandeepS is not online. Last active: 6/22/2009 9:57:37 PM SandeepS

Top 50 Posts
Joined on 12-11-2008
Posts 269

DDStaff
Re: ClickOnce Deployment
Hello,

I also tested it at my end and it seems that this behavior is by design and there is nothing much we can do except for adding the Active Reports assemblies in the main application.

Regards,
Sandeep
   Report 
   06-17-2009, 8:52 AM
jpierson is not online. Last active: 10/19/2011 4:19:44 PM jpierson

Top 75 Posts
Joined on 04-10-2009
Posts 151
Re: ClickOnce Deployment
 SandeepS,

Thanks for looking at this specific scenario. I agree that it looks like this is due to the design of Visual Studio however I guess the open question still is, how does the WPFToolkit get around this and could the same technique be used by ActiveReports? In the mean time we can hope that Microsoft sees the light and decides to change this default behavior.

Thanks again for your time.

   Report 
GrapeCity » Product Support » ActiveReports f... » Re: ClickOnce Deployment

Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.