Reputation: 81
I have created a class library (dll) and I want to use this in Coldfusion. The library works great when running it from a test console app, but when I try to load it into Coldfusion I get the error "Integration.Microsoft.Exchange.Email not found in the specified assembly list.". I'm very new to C# so I'm assuming I have done something wrong, but I'm lost as to what it is.
Coldfusion code:
<cfobject
action = "create"
type = ".net"
name = "DotNetObject"
class = "Integration.Microsoft.Exchange.Email"
assembly = "path\to\my\folder\Integration.Microsoft.Exchange.dll"
>
C# Code Structure:
namespace Integration.Microsoft.Exchange
{
public class Email
{
public static void New ()
{
}
}
}
I have tried a different dll (still specified through the assembly attribute) and it works fine. Is there something wrong with the way I've built my class?
The actual two C# class files are available here: http://www.seedata.co.uk/samples/csharp-exchange-integration/Classes.zip
Thanks!
Upvotes: 0
Views: 788
Reputation: 81
For anyone else that has issues with CF and .net, the solution to my problem in the end was very simple.
So a simple upgrade from .net 3.0 to 3.5 on the development server (you can't use anything higher than 3.5 on CF8) and changing my Visual Studio project to also compile to 3.5 solved the problem.
For anyone battling with this and thinking of giving up, the functionality is really quite good once you get it working!
Upvotes: 2