Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to connect SFML.NET to Visual Studio 2012?  (Read 4928 times)

0 Members and 1 Guest are viewing this topic.

First

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • Email
How to connect SFML.NET to Visual Studio 2012?
« on: August 24, 2013, 05:09:54 pm »
Hello. When I plug in the VS2012 project SFML.NET library, displaying the error that the file is not available.

(RUSSIAN)- The library is not connected)


How to connect SFML.NET in VS2012? Tell me, please.

AleVerDes

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Re: How to connect SFML.NET to Visual Studio 2012?
« Reply #1 on: August 24, 2013, 05:21:57 pm »

First

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • Email
Re: How to connect SFML.NET to Visual Studio 2012?
« Reply #2 on: August 24, 2013, 07:11:40 pm »
Tried it, does not work.  Writes:

Could not load file or assembly "sfmlnet-graphics-2, Version = 0.0.0.0, Culture = neutral, PublicKeyToken = null" or one of its dependencies. Attempt was made to load a program with an incorrect format.

First

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • Email
Re: How to connect SFML.NET to Visual Studio 2012?
« Reply #3 on: August 24, 2013, 07:21:46 pm »
Ray I fixed the problem. We had to use the x86

Curlybrace

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to connect SFML.NET to Visual Studio 2012?
« Reply #4 on: August 28, 2013, 08:58:26 pm »
Bump.

I cannot resolve this issue even with x86.

Seems its a standart problem. What i am doing wrong? I can't add external libraries to my probject. I am using C#.

Should i rebuild this libs or something?

SymegPL

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: How to connect SFML.NET to Visual Studio 2012?
« Reply #5 on: August 28, 2013, 09:14:44 pm »
csfml-window2.dll, csfml-graphics2.dll and csfml-audio2.dll are NATIVE dll's. You should add to references only MANAGED libraries (sfmlnet-window2.dll, sfmlnet-graphics2.dll and sfmlnet-audio)2.dll . NATIVE dlls must be in working directory.
Quote
http://www.sfml-dev.org/download/sfml.net/

(...)Since it's a .Net library, there's only one archive per architecture, which works for any OS and compiler. However, since the name of CSFML libraries appear in the source code, and are different on each OS, for OS X and Linux you will have to write a special configuration file which maps the names of the CSFML DLLs to the names of the corresponding CSFML shared libraries on your OS (for example, "csfml-graphics-2.dll" -> "libcsfml-graphics.so.2"); see the Mono documentation for more details.(...)

Curlybrace

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to connect SFML.NET to Visual Studio 2012?
« Reply #6 on: August 28, 2013, 09:39:42 pm »
csfml-window2.dll, csfml-graphics2.dll and csfml-audio2.dll are NATIVE dll's. You should add to references only MANAGED libraries (sfmlnet-window2.dll, sfmlnet-graphics2.dll and sfmlnet-audio)2.dll . NATIVE dlls must be in working directory.
Thanks. Solved.

Actually i don't underastand dll mapping,

I added all libs to my project, at extlib folder and made them always copy.
Added config file.
Map to /extlib/ (<dllmap dll="csfml-graphics-2.dll" target="/extlibs/csfml-graphics-2.dll"/>
???
Still Error.

So i just added this 5 libs tothe root of my project and made them copy themselfs as a content.

Drakmyth

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: How to connect SFML.NET to Visual Studio 2012?
« Reply #7 on: September 16, 2013, 06:52:46 am »
Looks like you're all set up and running but I wanted to post this here in case people come across it with the same problem. Since it looks like the other SFML.NET Project Template published in the gallery dropped support for VS2012, I went ahead and made one myself. It's not terribly hard to set it up yourself if you know what to do, but I thought I'd share this for a little extra convenience.

http://visualstudiogallery.msdn.microsoft.com/9b4ad5fc-e786-4cc2-9e48-9d3ced32d496

 

anything