将FreeImage .NET添加到解决方案中

编程入门 行业动态 更新时间:2024-10-27 14:27:58
本文介绍了将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添加到解决方案中

本文发布于:2023-11-01 23:37:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550736.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:解决方案   FreeImage   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!