Unresolved assembly reference: CrystalDecisions.ReportAppServer.DataDefModel (third party assembly)

Topics: Developer Forum
Oct 19, 2012 at 3:22 PM
Edited Oct 19, 2012 at 3:23 PM

Hi Everyone,

I am having an issue with building help documentation. I know this has been asked a lot and i did go thru all that i could find. However non of those seem to apply. Here is my situation.

I have a web application dll that i have included in documentation. After I added it I am getting this error when building

MREFBUILDER : error : Unresolved assembly reference: CrystalDecisions.ReportAppServer.DataDefModel (CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304) required by CrystalDecisions.CrystalReports.Engine [D:\Projects\Documentation\Help\Working\GenerateRefInfo.proj]

The error actually does make sense because I have no such library on my box nor do I even want it or use it. Initially I was getting this error and I decided to add all Crystal assemblies that our web dll references to References section which did not help.

However the web project itself compiles fine in visual studio and does not seem to require DataDefModel. However the problem is that I do not care about documenting or even referencing Crystal in my help documentation and there is no way to ignore this error. Can anyone suggest any solutions?

Thanks in advance!

Coordinator
Oct 19, 2012 at 7:23 PM

If you remove all of the Crystal Reports assemblies as references, does your project build?  If not, will it build if you add just the ones it complains about?  If that doesn't work, add the Assembly Binding Redirection plug-in to the project, configure it, and just check the Use GAC option.  If the assembly is in the GAC, it should find it.  If not, I can let you know how to modify the MRefBuilder.config file template to ignore the missing assembly.  I haven't exposed that configuration option in the binding redirection plug-in configuration yet but will in a future release.

Eric

 

Oct 19, 2012 at 7:41 PM

If you are referring to the actual web project then I can not remove the Crystal assembliesbecause our application does use them (CrystalDecisions.CrystalReports.Engine, CrystalDecisions.ReportSource and CrystalDecisions.Web) for reports which are part of the web project. If you are talking about the sandcastle project then removing still produces that error (this was actually my starting point). That assembly (DataDefModel) actually does not exist on my box. It is not in C:\Windows\assembly and not in C:\Windows\Microsoft.NET\assembly. But i do have all other Crystal assemblies in C:\Windows\assembly.

Thanks

Coordinator
Oct 19, 2012 at 9:52 PM

I meant from the SHFB project.  Follow the other suggestions with regard to adding the ones it complains about and trying the assembly binding redirection plug-in with Use GAC checked.  If that doesn't work, I'll post info on how to update the template file to ignore it.

Eric

 

Oct 19, 2012 at 9:59 PM

Thanks, I will try that. But out of curiosity, how is it going to help if I do not even have the assembly in the GAC. Also as I mentioned removing Crystal assemblies from SHFB does not help and still shows same error.

Oct 19, 2012 at 10:58 PM

The particular reference to DataDefModel is the core for working with Reports and defines everything in regards to data structuring and handling so your web app if its displaying and working with reports correctly must contain this assembly or be getting it somewhere. Just because its not in GAC does not mean its not resolving in the application itself. After all it is integrated in earlier versions of visual studio so it could be anywhere on your system.

http://msdn.microsoft.com/en-us/library/ms227116(v=vs.80).aspx

Make sure you have installed rather than copied the dlls to your system. http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp

There maybe newer downloads somewhere else.

Ensure that in the web app itself, that the files are not copied to your bin for debugging by checking the properties for the references "copy local=false" and for releasing you will probably need to run the installer on the server as well or try using copy local = true.

To sum up, the library not found is required by the Engine!

It must be

  1. Version 13.0.2000.0
  2. Named CrystalDecisions.ReportAppServer.DataDefMode.dll
  3. and have a PublicKeyToken of 692fbea5521e1304

Because there is so many paths we could go down its nearly impossible for anyone to work this out for you but this is my suggestion if the above is to much for now. Find a copy of this exact assembly and add it to you project! have a look again and see where the project is referencing the Engine library from and then check this folder for hidden assembly's (files).

Also note that Crystal Reports was dropped some time by Microsoft and supper-seeded by SQL Server Reporting Services. Maybe something to look into.

Hope this helps you find some pace on resolving this issue.

 

 

Oct 20, 2012 at 12:38 AM

Thanks for such a detailed response. I really appreciate it. However that's the thing, it is absolutely possible that reports do not even work on my box, and at this time my aim is not to fix the application but to make the help builder work. I haven't opened reports section since my box was reinstalled and actually I do not remember last time I opened it (however clients in production environment do use it a lot). So it is absolutely possible that reports simply do not work either on my development box. 

Also moving to reporting services is not an option in near future because this is large solution (i have not counted but at least 100 projects, not including legacy C++ with roughly 50 or so different reports).

I have indeed simply GACed DLLs to make sure my web project compiles. This is obviously why I am getting the error. However just as I mentioned the error itself makes perfect sense. Installing or GACing missing DLLs would most likely fix this but I would prefer not to in this particular case or at least long term plans would come back to this anyway.

Thanks

Oct 20, 2012 at 1:18 AM

Ok well running sandcastle will throw this error because its looking for the references (ie: class's, members etc) so without the dll your in a pickle.

 

Hopefully Eric can post on how to exclude members from the particular dll but I am sure there will be a few you will need to exclude and in this case your documentation will not be complete when it does build! So what would the point of that be??

Anyway....

Short term your best approach is to follow best practices and install the re-distributable version of CrystalReports you need. You should keep a copy with the project for next time :-)

 

Best Regards.

Coordinator
Oct 20, 2012 at 2:05 AM

Well, if you haven't installed the necessary tools, that is going to cause problems. However, since they are only reference assemblies, it shouldn't affect much beyond the member list pages which either won't show the missing inherited members or will but with no member info. To bypass the assemblies, edit the Templates\MRefBuilder.config file in the SHFB installation folder (%ProgramFiles(x86)\EWSoftware\Sandcastle Help File Builder unless you installed it somewhere else).

Add a new ignoreIfUnresolved element for each of the missing assemblies that gets reported.  You'll see one in there already for the Crystal Reports keycode assembly which is not distributed.  Just replace the assembly name with the one reported:

        <assemblyIdentity name="CrystalDecisions.ReportAppServer.DataDefModel" />

Eric

 

Oct 20, 2012 at 2:21 AM

:-) Thanks!

Depending on the complexity of the exclusion configuration I will decide either use it or simply exclude web dll altogether. Since most of the crystal calls are done from reports in web dll I would not mind simply excluding whole reports section. Our business logic resides in separate assembly anyway. Web dll is used only to display it, so I can live with that. Also this solution is used inhouse and not for distribution, so having incomplete documentation is not big deal.

I also hope Eric can provide some insight into this magic exclusion :-) This way I can decide what to do next.

Thanks for your suggestions though, I appreciate it.

Oct 20, 2012 at 2:24 AM
EWoodruff wrote:

Well, if you haven't installed the necessary tools, that is going to cause problems. However, since they are only reference assemblies, it shouldn't affect much beyond the member list pages which either won't show the missing inherited members or will but with no member info. To bypass the assemblies, edit the Templates\MRefBuilder.config file in the SHFB installation folder (%ProgramFiles(x86)\EWSoftware\Sandcastle Help File Builder unless you installed it somewhere else).

Add a new ignoreIfUnresolved element for each of the missing assemblies that gets reported.  You'll see one in there already for the Crystal Reports keycode assembly which is not distributed.  Just replace the assembly name with the one reported:

        <assemblyIdentity name="CrystalDecisions.ReportAppServer.DataDefModel" />

Eric

 

Thank you! I will give it a try over the weekend or on Monday and will let you all know how it went.

Thanks again Eric!

Oct 22, 2012 at 4:30 PM

Works like a charm!

I also had to add these in case someone will have same issue

<assemblyIdentity name="CrystalDecisions.ReportAppServer.DataDefModel" />
<assemblyIdentity name="CrystalDecisions.ReportAppServer.CommLayer" />
<assemblyIdentity name="CrystalDecisions.ReportAppServer.ClientDoc" />
<assemblyIdentity name="CrystalDecisions.ReportAppServer.Controllers" /> 



Thank you!!