views:

27

answers:

1

I'm trying to Build a .NET assembly which uses Crystal Reports on a build server without installing Visual Studio or the Crystal Reports Runtime.

The version of Crystal Reports we are targeting in our code is the one that came along with Visual Studio 2008 and we are using MSBuild to build this project.

I've copied what seems to be all of the referenced dlls in my project into a folder called Assemblies on the build server and I've tried setting the reference path in my csproj.user file and also by copying this same PropertyGroup into my project file but still no luck. The error I'm getting looks like the example below.

MyFile.cs(5,7): error CS0246: The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) [c:\MySolution\MyProject...]

Does anybody have any suggestions on how or whether I should be able to get this to work?

A: 

It looks like I may have figured out this one myself after experimenting around with the element for my references in the project file. My Crystal Reports assembly references now look like the example below.

<Reference Include="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
    <HintPath>$(MSBuildProjectDirectory)\..\Libraries\CrystalReports\CrystalDecisions.CrystalReports.Engine.dll</HintPath>
</Reference>
<Reference Include="CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
    <HintPath>$(MSBuildProjectDirectory)\..\Libraries\CrystalReports\CrystalDecisions.ReportSource.dll</HintPath>
</Reference>
<Reference Include="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
    <HintPath>$(MSBuildProjectDirectory)\..\Libraries\CrystalReports\CrystalDecisions.Shared.dll</HintPath>
</Reference>

And event more importantly it works!

jpierson