www.neoaxisgroup.com Forum Index Portal
 Main  •   Wiki  •  FAQ  •  Search  •  Preferences  •  Register  •  Profile  •  Log in to check your private messages  •  Log in
Calendar 
View next topic
View previous topic

Post new topicReply to topic View previous topicList users that have viewed this topicSave this Topic as filePrintable versionLog in to check your private messagesView next topic
Author Message
Absalom
Indie License
Indie License


Age: 37
Joined: 15 May 2009
Posts: 47

blank.gif
PostPosted: Sun Jan 03, 2010 5:45 am  Post subject:  Developing on a 64-bit system with VS C# Express Reply with quoteBottom of PageBack to top

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! Smile

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.


Virgo Gender:Male Buffalo OfflinePersonal Gallery of AbsalomView user's profileSend private message
Absalom
Indie License
Indie License


Age: 37
Joined: 15 May 2009
Posts: 47

blank.gif
PostPosted: Sun Jan 03, 2010 5:52 am  Post subject:  (No subject) Reply with quoteBottom of PageBack to top

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


Virgo Gender:Male Buffalo OfflinePersonal Gallery of AbsalomView user's profileSend private message
Wecoyote
Indie License
Indie License


Age: 20
Joined: 06 Oct 2008
Posts: 117
Location: Vladivostok, Russia
russia.gif
PostPosted: Sun Jan 03, 2010 2:34 pm  Post subject:  (No subject) Reply with quoteBottom of PageBack to top

Absalom, thanks, it may will be useful. I'm jumped up on a chair, when it "BOOM!" after compilie. Smile

_________________
Sorry for my english...

Pisces Gender:Male Horse OfflinePersonal Gallery of WecoyoteView user's profileSend private messageICQ Number
angrywasp
Commercial License
Commercial License


Age: 27
Joined: 15 Jun 2007
Posts: 128
Location: Between my chair and my computer
australia.gif
PostPosted: Tue Mar 09, 2010 6:26 am  Post subject:  (No subject) Reply with quoteBottom of PageBack to top

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.


Sagittarius Gender:Male Dog OfflinePersonal Gallery of angrywaspView user's profileSend private messageSend e-mail
Display posts from previous:      
Post new topicReply to topic View previous topicEmail to a Friend.List users that have viewed this topicSave this Topic as filePrintable versionLog in to check your private messagesView next topic

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
Powered by phpBB2 Plus