简体   繁体   中英

Selecting target platform for visual studio 2015 installer project

I have created a installer project in visual studio 2015. Success fully build the application and installed in my system(I'm using Windows 10 64-bit). But when I try to install the same in a 32 - bit OS, I'm getting the error message saying "installation package is not supported by this processor" . I have checked the properties of the project But there is nothing related to this. All projects( I have 4 projects) inside the solution are build with AnyCPU mode.

When I open the configuration manager from there is options for choosing the configuration and platform for other projects, but we cannot choose the platform for the setup project. I'm attaching the screenshot.

在此处输入图片说明

Hope that someone will guide me to Create installer package which can be installed in both 32 bit and 64 bit OS using visual studio 2015.

The architecture for setup projects is in the Properties window (NOT Properties) of the setup project - select the setup project in Solution Explorer and press F4 (or choose View->Properties window), then it's TargetPlatform.

A 32-bit MSI will install on 32- and 64-bit systems, but the install won't let you deliver to 64-bit folder locations. Visual Studio will internally mark all the components as 32-bit so there are likely to be results you didn't expect. A 64-bit MSI can deliver both 32- and 64-bit components but Visual Studio doesn't let you pick which components are 32-bit and which are 64-bit.

In any case, different architectures require separate MSI files:

https://blogs.msdn.microsoft.com/heaths/2008/01/15/different-packages-are-required-for-different-processor-architectures/

and therefore people build completely 32-bit MSI setups (containing 32-bit code and registry data) for x86 systems and 64-bit MSIs (containing all 64-bit code and registry data) for 64-bit systems. With other tools you can build 64-bit MSIs that contain support for 32-bit systems (such as COM Dlls and registration for both architectures) but Visual Studio setups don't support that, so you may run into some of its limitations compared to WiX, InstallShield, Advanced Installer and so on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM