Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to develop and deploy 64-bit programs in Visual Studio 2010

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to develop and deploy 64-bit programs in Visual Studio 2010. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Today we will discuss the development and deployment of 64-bit programs in Visual Studio 2010. In general, using 64-bit applications and operating systems can greatly improve performance. This is mainly because it provides greater memory access. Like a normal 32-bit application, memory can only support up to 4G, including the memory needed for the operating system to run. For this reason, if the memory occupied by the application is increased, it is bound to be at the cost of reducing the memory occupied by the operating system. Because the total memory size remains the same, it must be a situation of growth and decline.

What advantages the 64-bit application degree can bring is not the focus of the author here. It's just an introduction to the problem of 64-bit application development and deployment. So how should program developers develop and deploy 64-bit applications? The author takes the Visual Studio platform as an example to talk about this issue.

I. the method of deploying 64-bit applications

In the Visual Studio platform, it mainly provides two kinds of application deployment methods, which are ClickOnce and Windows Installer technology. Each of the two technologies has its own characteristics. The core function of ClickOnce, if summed up in one sentence, is point-to-point deployment. For example, in practical work, the administrator can publish the application to a central location in the enterprise network, and then the user can install or run the application from this location. There is no need to copy the installation file. This strategy is used for automatic patch updates under Microsoft operating systems. And Windows Installer technology is the kind of application software that we often use setup.exe as the installation file. The source code is compiled and packaged into a file in setup.exe and distributed to the user. The user then runs this file to install and deploy the application.

There is no difference between the two deployment methods, but they are suitable for different situations. In practical work, program developers often need to consider factors such as the type of application, the location of the application, the frequency of application updates and so on. If the application software still needs to be updated frequently in the development and testing stage, or if it needs to be constantly updated for other reasons, it is better to adopt ClickOnce mode at this time. Because in this way, the application can be updated automatically. If only the application package in the central location is updated, the application deployed on each client will be updated automatically. So this approach is a better choice for applications that change frequently (such as during testing or patching). However, one drawback of this deployment is that flexibility does not have Windows Installer technology. The package deployed by Windows Installer gives us the most intuitive impression that users can choose the features they need to install, such as when Office software is installed. The absence of Windows Installer technology is that it will not be updated automatically. For example, when an application needs to be changed, recompile and package the file into a setup file, or update it in the form of a patch. Applications that have been deployed on the client are not automatically updated.

Therefore, the author said that these two deployment methods have no advantages and disadvantages, but are suitable for different occasions. When using the Visual Studio platform to develop and deploy 64-bit applications, developers first need to choose which way to deploy applications. Technically, both deployments can support 64-bit applications. It mainly depends on the type of application (such as whether it needs to be updated) and so on.

II. Steps to deploy 64-bit applications

Generally speaking, both Microsoft applications are deployed in ways that support 64-bit applications. Of course, the Visual Studio platform also supports third-party software to deploy applications. At this point, program developers need to pay attention to whether these third-party professional tools can well support 64-bit applications. Sometimes although the application software developed through the Visual Studio platform supports 64-bit, but the third-party deployment software does not support it, an error will occur. Therefore, if program developers want to develop 64-bit applications, the author still recommends to use Microsoft's own deployment tools, which is not only free but also compatible. Unless the user has some other special requirements.

It is relatively easy to deploy 64-bit applications using ClickOnce technology. You only need to follow the following four steps to complete. The first step is to click the node of the project, and then select the properties to open the Project designer. Or you can open the project's properties window through solution Explorer. However, according to the author's experience, the latter sometimes the property window may be gray, unable to open the project designer. The author still likes to use the project node to open the project designer. Then select compile, Advanced compilation options in the open window, and an Advanced compilation Settings dialog box opens. * in this dialog box, select the type of target CPU, just select X64 and so on. It is important to note here that you can also select any CPU when choosing CPU. This means that it can support both 64-bit and 32-bit platforms. However, the author does not recommend this way. Because this may bring some stability or other problems. If you really need application packages for both platforms, you might as well compile both at the same time. Then choose different packages according to different platforms. In fact, this principle is similar to that of drivers. Although some graphics cards can use some general-purpose drivers, they are not as stable or performance as professional drivers. Microsoft also offers the option "any CPU" mainly because of compatibility considerations. When using this option, program developers still need to consider compatibility and performance.

If the deployment of 64-bit applications using Windows Install technology is basically the same as the process of deploying 32-bit applications, the author will not elaborate too much here. Just to explain some of these differences. In general, 32-bit and 64-bit MSI packages are treated the same way, except that folder variables are handled slightly differently. In addition, there are different ways to write components to the registry. However, these differences are not the focus of the 64-bit application deployment process. Because these content systems will be completed automatically, there is no need for manual intervention by program developers.

Considerations for deploying 64-bit applications

When program developers are deploying 64-bit applications, the author thinks that they should pay attention to the following.

One is to generate different packages for different platforms. No matter which deployment method is adopted above, Visual Studio supports 32-bit and 64-bit platforms, and users can choose "any CPU" to improve the compatibility of application packages. But this is not a choice. In general, some of the more experienced program developers will advise you to generate different application packages for different platforms. If there is an application that needs to be published on 32-bit and 64-bit platforms respectively, * generates two MSI packages for 32-bit and 64-bit computer platforms. In this way, some negative effects on stability and performance caused by mixed code can be avoided.

Second, it should be noted that some MSI packages may not be friendly to 64-bit platforms. Although Windows Installer technology can support 64-bit computer platforms in most cases, the generated MSI packets may conflict with 64-bit computer platforms in some special cases. For example, an error will occur during the installation, or it will not start normally after the installation is completed. It is important to note at this point that an additional startup condition should be added at deployment time. There is another point that developers should pay attention to when it comes to MSI packages, that is, 64-bit MSI packages cannot be created in a simplified version of Visusal Studio. For MSI packages, you also need to pay attention to compatibility issues. 64-bit MSI packages can support 32-bit and 64-bit DLL or EXE to perform custom actions, but 32-bit MSI packages cannot support 64-bit DLL or EXE to perform custom actions.

Overall, Visual Studio has high support for 64-bit platforms. As long as its own application deployment method is adopted, the application software supporting 64-bit computer platform can be generated normally in most cases. However, the compatibility of Visual Studio applications with 64-bit platforms cannot be guaranteed if a third-party deployment method is used. Therefore, the author suggests that it is better for everyone to adopt their own deployment plan. After all, it can already meet most of the needs of enterprises, and it is free. There is no need for enterprises to look beyond the near and far away.

About Visual Studio 2010 how to develop and deploy 64-bit programs to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report