将FreeImage .NET添加到解决方案中 [英] Add FreeImage .NET to solution

查看:238
本文介绍了将FreeImage .NET添加到解决方案中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经遵循了这个职位,但我还没有走几步。我是C#的新手,这可能是一个问题。我会喜欢一点帮助(我一直在这一整夜)。



我可以在Visual Studio中打开FreeImage.NET解决方案(Win7 64位机器btw) 。 只提供了一个32位版本的DLL,因此要使用这个DLL,您将必须确保将项目版本设置为32位。要获得64位版本的FreeImage DLL,您将下载其源代码项目,并手动执行64位版本,如 blog


I have followed the posts on this, but i am still not getting a few steps. I am new to C#, and that is probably the issue. I would love a little help (I have been banging on this all day).

I can open the FreeImage.NET solution (Win7 64 bit machine btw) in Visual Studio. This post says i need to Build it to get the C# dll. When i build it, i get hundreds of errors "type or namespace 'Name' could not be found".

Does it need the C++ DDL added first? I dragged and dropped it onto the solution, but still the errors.

Am i doing something simple and wrong?

Specifically what i am trying to do is add FreeImage to project in C# Visual Studio Express 2012.

Thanks, Dan

解决方案

After downloading the version of FreeImage.NET , I opened the following VS2005 Solution File in VS2012.(Thats the only one I have)

FreeImage3154\FreeImage\Wrapper\FreeImage.NET\cs\FreeImage.NET.2005.sln

After upgrading the project and building it for the first time, I saw around 491 errors. If you open the references of the UnitTest.2005 project, you will see that the nunit.framework assembly is missing. If you have nuget installed , in VS2012 you can

Right Click references > Manage NuGet Packages > Search for NUnit and install it.

In the image below we see that the nunit.framework assembly is correctly linked.

After doing this there were only 50 errors remaining and they were all because the Xml Documentation file checks were enabled. You can disable this check as shown below in the Library.2005 project.

Build again, and it should succeed.

NOTE: The FreeImage website provides only a 32-bit version of the DLL, thus to use this DLL you will have to ensure that you set your project version to 32-bit. To obtain a 64-bit version of the FreeImage DLL you will have o download their source code project and manually do a 64-bit build as show in this blog.

这篇关于将FreeImage .NET添加到解决方案中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆