Compiling 32bit app on 64bit machine - asp.net

I want to convert my 32bit application to 64bit so I could compile it and keep working on it on my 64bit machine. How can it be done?

To compile at 64bit:
Inside Visual Studio go to Build > Configuration Manager
Then you can specify CPU by selecting the Platform column and choosing between X86 and x64.
Then you can explicitly compile at 64bit.
That said Any CPU should be good enough for you to keep working on it. My carry around is 64bit, but the buildserver can output the projects as either 32bit or 64bit depenedent on the release template.
Also dependent on your Visual Studio version, there is the Prefer 32bit flag which may be of use dependent on your exact requirements.

Related

How do I decide what runtime id to use?

I am used to the dot net framework building a .exe file that I can release
However in .Net Core 2.0 I need to specify a runtime id when creating the .exe
for example
dotnet publish --runtime win7-x84
where the runtime id is win7
What factors should I consider when choosing the run time id?
Do I need to be releasing multiple .exe versions to cater for my clients on different operating systems?
I have looked at the document here
What factors should I consider when choosing the run time id?
Well, the main factor you should consider is a target Operating System, where the application will be launched. Everything became much simpler after .NET Core 2.0 added support of portable RIDs. Portable RIDs do not include OS details, e.g.: win-x64 or linux-x86. If operating systems belong to one platform (Windows or Linux) you could publish one version of application that will run on all OS from the family. So to build application for whole family of x64 Windows OS run the following publish command:
dotnet publish --configuration Release --runtime win-x64
Do I need to be releasing multiple .exe versions to cater for my
clients on different operating systems?
According to above explanation, there is no need in separate versions for different OS within one family. You don't need to build new versions for win7, win8, win10, etc. However you still need to publish two application versions for support of x86 and x64 architectures. It is possible to build only one x32 version that will run on both x32 and x64. However it will run in 32-bit mode on x64 OS, which should be avoided.
This question contains a lot of other details about compatibility between different RIDs and OS. Much of this outdated since portable RIDs were introduced but there is still plenty of useful info.

Installing Qt and getting it to work - must you install MSVC2012 IDE?

So, like many others I've found on the net, I have installed Qt (Qt 5.2.1 for Windows 64-bit (VS 2012, OpenGL, 553 MB)) and realized that I do not have the MSVC2012 compiler that was used to build this version of Qt.
I come here to ask, is it necessary to literally install the entire MSVC2012 IDE in order to get this version of Qt to work, or can I somehow just install the needed compiler? If so, where might that be available for download? I have done searches and cannot find just the compiler. I have found the compiler bundled with various other software that I do not think I need, but I do not want to go through great effort to find out that I made another mistake.
Alternatively, Qt compiled with minGW is also available, but only for 32 bit. I understand that some 32 bit programs will run on 64 bit machines, but how can you know for sure?
You can install Visual Studio 2012 Express which is free and contains the necessary compiler. After that, you have to also install Windows Kits to get the standalone debugger. Alternatively, you can install Windows 7.1 SDK which does not come with IDE but with compilers and debuggers. Windows 7.1 SDK correspond to Visual Studio 2010. But beware, Windows 7.1 SDK has many bugs, and I would not recommend it unless you are targeting Windows XP.
As for MinGW, yes you can also run 32bit programs on 64 bit, but I personally advise you against MinGW. Its integration with Windows is flaky, and its compile speed is far inferior to MSVC's.

Building a 64-bit application with Qt

I have only been using Qt (version 4.8) for about a week, and it is working like a charm. So far I have only built 32-bit applications with Qt creator, however I would like to build my application as a 64-bit application because it handles large data sets and requires lots of RAM. Can someone please tell me what are the steps involved to build a project from Qt creator as a 64-bit application ? Please note that my OS is Widows 7 Ultimate 64-bit, i also have Visual Studio 2010 Pro on the same machine. Thanks in advance
From the Start Menu (MSVS2010 - VS Tools) start the "Visual Studio x64 Win64 Command Prompt" and then compile from the command line. It worked for me without problems but it takes a long time.
I don't know if Qt supply a 64bit build but it's easy to do your own
Just fire up the visual studio 64bit tools cmd prompt, download the Qt source.
Then type configure -debug-and-release -opensource -platform win32-msvc2010 and nmake
Simply Add Kit for 64 bit target and build for that target.

Change x86 to x64 dlls in production environment for ASP.NET application

I have an ASP.NET application that I am currently developing in C#.
The application needs a set of reference (dlls) to work. At development phase I need to use the x86 (32 bits) libraries but when I put the application in production I need to substitute the libraries with the x64 (64 bits) version.
Is it correct and safe to deploy the sytem in my IIS7 (Server 2008) as it is in Visual Studio (so working with x86 libraries) and then change the x86 libraries with the x64 directly in production environment (by copy pasting)? If that is not the case may you please suggest a more clean way?
In all cases you should test/develop with the same version as you deploy on production. So in development you should compile for x64 if your production server is x64. Otherwise you have the risk of error when you go to production. For example you can use a x86 lib which you do not compile yourself. The you will only notice this on production, which is a little late.
The way to go is to make all environments the same.

How to configure an InstallShield 2009 project to run on 32- and 64-bit systems

I have a 32-bit application that I'm packaging with InstallShield 2009 Premier. I would like to be able to install it on 32- and 64-bit machines, but the InstallShield installer doesn't seem to be able to automatically detect that it's being run on a 64-bit machine and consequently redirect the creation of registry keys to HKLM\Software\Wow6432Node... and the creation of files to C:\Program Files (x86)... Despite my best googling, I can't seem to find out how to configure the InstallShield project to account for this.
Any ideas?
Since you have a 32-bit application, you need to leave its installer the way it is.
Wow6432Node and Program Files (x86) were specifically designed for 32-bit applications. On a 64-bit machine Program Files and HKLM\Software are for 64-bit applications only.
A mixed 32/64-bit installer can be used only for an AnyCPU application.

Resources