0 votes
by (180 points)

I have my project working in .NET 4.0 and when I upgraded to .NET 4.5.2 the Rebex Mail is causing the following error.

A first chance exception of type 'System.TypeInitializationException' occurred in my.app

If I remove reference to the Rebex controls, it works.

Has anyone else had any luck with .NET 4.5.2 OR do you know what I can do to fix this?

Applies to: Rebex Secure Mail

1 Answer

+1 vote
by (180 points)

I got it figured out. The problem was on my side, the Rebex DLL's were not being copied to the output directory. Changed copy to local and it works. Not sure how it got changed, but all is good.

by (58.9k points)
edited by
Thanks for letting us know that the issue is resolved.

For other users - the .NET4.5.x Framework is supported by Rebex components, just use the assemblies from the 'net-4.0' folder of your Rebex component installation.
by (180 points)
The other problem I came across: I needed to add the Rebex.Common.dll
by (58.9k points)
So is everything working for you now?
by (180 points)
Yes, it is working great.

I just wanted to update my answer to include what I had to do differently for .NET 4 VS .NET 4.5.2