 |
|  |
| Author |
Message |
Absalom
Indie License

Age: 37
Joined: 15 May 2009
Posts: 47

|
|
I have learned a very valuable lesson today (it may already be posted here somewhere but I didn't see it). It all started when I decided that instead of writing my own Log class, I would just use the one in NeoAxis, for a database test project. So, I added it. I then compiled everything and ran it. BOOM! It blew up complaining that Log.dll was not in the correct format. So I surfed the internet for the exact error that I received (System.BadImageFormatException). I found this page:
http://forums.xna.com/forums/t/4377.aspx#22601
Here is the post by Stephen Styrchak:
| Quote:
|
In VC# Express, this property is missing, but you can still create an x86 configuration if you know where to look.
It looks like a long list of steps, but once you know where these things are it's a lot easier. Anyone who only has VC# Express will probably find this useful. Once you know about Configuration Manager, it'll be much more intuitive the next time.
1. In VC# Express 2005, go to Tools -> Options.
2. In the bottom-left corner of the Options dialog, check the box that says, "Show all settings".
3. In the tree-view on the left hand side, select "Projects and Solutions".
4. In the options on the right, check the box that says, "Show advanced build configuraions."
5. Click OK.
6. Go to Build -> Configuration Manager...
7. In the Platform column next to your project, click the combobox and select "<New...>".
8. In the "New platform" setting, choose "x86".
9. Click OK.
10. Click Close.
There, now you have an x86 configuration! Easy as pie!
I also recommend using Configuration Manager to delete the Any CPU platform. You really don't want that if you ever have depedencies on 32-bit native DLLs (even indirect dependencies).
|
This solution may save some of you some time if you are developing on Windows 7, 64-bit or Windows Vista 64-bit. This only started occurring when I started using the precompiled DLLs in NeoAxis after I moved from Windows XP 32-bit to Windows 7 Ultimate 64-bit. I didn't know about those settings in Visual Studio Express, mainly because I am still an express noob and I just thought it was a missing feature only available in pro (which I used previously).
Anywho, I hope someone finds this useful.
|
|
|
|
|
|
 |
    |
 |
Absalom
Indie License

Age: 37
Joined: 15 May 2009
Posts: 47

|
|
| I also found out that by changing the target CPU, it breaks all of your assembly references, so just be aware of that.
|
|
|
|
|
|
 |
    |
 |
Wecoyote
Indie License

Age: 20
Joined: 06 Oct 2008
Posts: 117
Location: Vladivostok, Russia

|
|
Absalom, thanks, it may will be useful. I'm jumped up on a chair, when it "BOOM!" after compilie.
|
|
|
|
_________________ Sorry for my english...
|
|
 |
     |
 |
angrywasp
Commercial License


Age: 27
Joined: 15 Jun 2007
Posts: 128
Location: Between my chair and my computer

|
|
| Hey guys. i just wanted to add some info here. the reason the references are broken is that when you change the target cpu, it changes the output directory for the assembly when building under the x86 configuration. so it can't find the engine references in the new output directory. you need to go to the properties for the project and change the output path back to the NA bin directory and your references will be fixed.
|
|
|
|
|
|
 |
     |
 |
|
|
|
View next topic
View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
All times are GMT
|
|