When trying to add SharpSVN to my C# project, compiling with SharpSVN related calls gives me this error:
FileLoadException was Unhandled Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
What I did was add the References from the downloaded SharpSVN zip file and added the
using SharpSvn;
When I compile that it works fine, but when I add:
string targetPath = "https://bobl/svn/ConsoleApplication1";
SvnTarget target;
SvnTarget.TryParse(targetPath, out target);
It breaks with that error. I've searched this error and have had no luck in finding a solution.
The SharpSVN assembly is a mixed assembly built against version 2.0 of the CLR.
Therefore, it cannot be loaded in CLR version 4.0.
You need to change your project to target .Net 3.5 (or earlier) in Project Properties.
Since .Net 2.0, .Net 3.0, and .Net 3.5 all use version 2.0 of the CLR, it will work in any of those versions.