Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
HenricusMagnus  
#1 Posted : Thursday, August 13, 2009 5:26:15 PM(UTC)
HenricusMagnus

Rank: Member

Groups: Member
Joined: 10/21/2008(UTC)
Posts: 14

Was thanked: 1 time(s) in 1 post(s)
Hello Forum,

can anybody tell me what I have to do in order to generate a 64-bit-version of my current project?
I'm developing using VS2008 Professional (VB) under XP SP3 (32 bit). My testing environment for the 64bit versions is another machine which runs Windows7 Ultimate, 64 bit.

Will I have to manage two different projects, or is there a way to have only one project and to decide the target platform at build time?

Many thanks in advance.
Heinz-Jürgen
Alex Kon  
#2 Posted : Sunday, August 16, 2009 1:12:24 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups:
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello Heinz-Jürgen,

Yes, there is a way to keep single project file, but it will become a little tricky to handle. Let me explain in more detail: To generate 64-bit version of your project you should:
  • Set Properties->Compile->Advanced Compile Options->Target CPU to x64;
  • Add reference to 64-bit versions of Aurigma.GraphicsMill.dll / Aurigma.GraphicsMill.Codecs.AdvancedPsd.dll (if necessary)
There is no problem with the first point - you just should setup 2 separate configurations for different platforms (Build -> Configuration Manager -> Active Solution Platform combobox -> New). The most uncomfortable thing is that VS doesn't provide possibility to reference to different assemblies depending on current configuration/platform settings. At least, I don't know how to do this ;). So we have to handle references somehow.

Personally, I do this in a such way: in my projects I have 2 configuration for both platforms (one has x64 as target CPU, other - x86)
  • If I need to run/debug some project in both x86/x64 configurations on my development machine (I have Vista x64 on it) - it is faster for me to add references to the x86 version of GraphicsMill DLL, compile and check it. Then change configuration to x64, remove x86 version from project's references, add reference to x64 version and recompile all again.
  • If I need to test project on another machine, then it is no matter which DLL is referenced in VS. E.g. if you have x86 development machine - you can compile your project as usual (with x86 version of GraphicsMill). And just replace Aurigma DLLs with x64 versions before launching your project on x64 machine.
Note, that all this mess is required only for Aurigma.GraphicsMill.dll and Aurigma.GraphicsMill.Codecs.AdvancedPsd.dll. All other assemblies (WinControls, AjaxControls, VectorObjects) are written in C# and compiled with "AnyCPU" option. So there is actually one version of each of these DLLs which works on both x64 & x86 machines.

Edited by user Sunday, August 16, 2009 1:19:00 PM(UTC)  | Reason: Not specified

tcrosbie  
#3 Posted : Sunday, August 16, 2009 2:54:47 PM(UTC)
tcrosbie

Rank: Advanced Member

Groups: Member
Joined: 6/22/2008(UTC)
Posts: 27

Applause

Fanstastic question, and a great post. I've been running 2 projects, one with pointers to the source code files of the other and it's been a nightmare keeping that in synch.
Alex Kon  
#4 Posted : Sunday, August 16, 2009 6:54:28 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups:
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Glad it was helpful! ;)

I've just got an idea, that it may be better to use some PostBuild scripts in VS to perform all dull routine with copying appropriate versions of assemblies.

The problem is that I mainly deal with a great bunch of small test projects & samples. I create them quickly and most of them are deleted same day. So I just use these 2 ways and never thought about any optimizations in this area. I think that there is still a great room for improvements $)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.