2
votes

We have a solution built using C# on .NET 4 with Code Contracts. We are hoping to utilise Crystal Reports 13 but are encountering a major problem.

When we attempt to use crystal reports, the following exception occurs:

Assembly reference not resolved: BusinessObjects.Licensing.KeycodeDecoder, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304.

When Code Contracts runtime checking is disabled (unchecked), this exception does not occur; but code contracts complains the rewriter must be enabled. Unfortunately the codebase is littered with Contract.Requires<TException>(bool) calls, which would be a nightmare to change to the if-then-throws style.

Has anyone else encountered this incompatibility? And if so, how did they overcome it?

Thanks

1

1 Answers

0
votes

Have you tried adding an extra library path to the ContractProperties that points to the directory on your machine containing the missing dll? The rewriter sometimes chases more references than the C# compiler, causing this problem to surface.