VS 的编译选项 build下的platform -- Any CPU和x86有什么影响?

现在的问题是,我的一个assembly用Any CPU编译就不能在64位系统下运行了,但是用x86编译就ok

原因是如果用Any CPU编译,那么在64位机器默认的运行就是64位的,

而我的assembly需要调用一个32的COM库,所以就运行不起来

只要用x86编译,那么程序就是以32位的程序,依靠wow64来运行的,所以就ok

所以,如果assembly需要使用win32库的话,

那么编译选项就不能使用默认的Any CPU了需要注意
 
我去,ANY CPU的意思不是任何CPU都可以用,而是当前编译的这台机子的环境可用
 
 
大家可再了解一下
Mixed Platform vs Any CPU
 
 Team Build deals with solution configurations - these are the platforms (e.g. .NET or Win32) and configurations (e.g. Debug or Release) you typically see in combo boxes within Visual Studio when you have a solution loaded (if you hover over these boxes the tooltips will say "Solution Platforms" and "Solution Configurations", respectively).  When all of the projects in a solution are of the same type (e.g. C#/VB projects) the solution configurations will match up exactly with the project configurations.  Once you have projects in a solution that have mismatched configurations/platforms, Visual Studio creates the solution level configuration(s) "Mixed Platforms/Debug" and possibly "Mixed Platforms/Release".  These configurations are just mappings to individual project level configurations.

For example, if you have a C# project and a C++ project, typically "Mixed Platforms/Debug" will map to "Any CPU/Debug" for the C# project and "Win32/Debug" for the C++ project.

To see these mappings, open up the Configuration Manager (either through the Build menu or by clicking on the platform or configuration combo box and selecting Configuration Manager...).  You should see combo boxes for the Active solution configuration and the Active solution platform and then a table showing you the project level mappings.  This will show you the platform generated for each project under each solution configuration.

 

VS 的编译选项 build下的 platform target -- Any CPU和x86有什么影响?的更多相关文章

  1. 交叉编译中的build、host和target

    build.host和target    在交叉编译中比较常见的一些参数就是build.host和target了,正确的理解这三者的含义对于交叉编译是非常重要的,下面就此进行解释 --build=编译 ...

  2. 编程杂谈——Platform target x64

    在Visual Studio中选择.NET Framework框架并选用任意模板创建一个普通的Web应用工程,毫无疑问,此时应该是能够正常运行此工程的. 但是将工程属性->编译->Plat ...

  3. 交叉编译参数--build、host和target的区别

    build.host和target 在交叉编译中比较 常见 的一些参数就是build.host和target了,正确的理解这三者的含义对于交叉编译是非常重要的,下面就此进行解释 --build=编译该 ...

  4. Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'Info

    WARNING: The Copy Bundle Resources build phase contains this target's Info.plist file 'Info.plist'. ...

  5. HikariCP 脑火Failed to obtain JDBC Connection: You need to run the CLI build and you need target/classes in your classpath to run.

    测试了一下 HikariCP 连接池报错,无解 十一月 16, 2017 5:31:59 下午 org.apache.catalina.core.StandardContext loadOnStart ...

  6. Linux下OpenSSL的安装全过程(CentOS6.3 x86 + Openssl 1.1.0e)

    写在前面:安装前先查看下老的openssl版本 (使用  openssl version -a  命令查看来版本),和服务器操作系统版本(uname   -a),升级的原因是,老版的openssl已经 ...

  7. 02全志r58平台Android4.4.4下关闭内核中的CPU的开启关闭提示

    02全志r58平台Android4.4.4下关闭内核中的CPU的开启关闭提示 2017/8/18 13:53 版本:V1.0 开发板:SC5806(全志R58平台) SDK:android4.4.4 ...

  8. linux下查看动态链接库依赖关系的命令 x86: ldd *.so arm: arm-linux-readelf -d *.so 实际例子: 以项目中用到的库librtsp.so分析: lijun@ubuntu:~/workspace$ arm-hisiv100nptl-linux-ld -d librtsp.so arm-hisiv100nptl-linux-ld:

    linux下查看动态链接库依赖关系的命令 x86:ldd    *.so arm:arm-linux-readelf    -d    *.so 实际例子:以项目中用到的库librtsp.so分析:l ...

  9. STM32F103C8T6 在VSCode下使用Platform IO开发,基于库函数V3.5版本

    首先安装Platform IO插件,怎么安装的教程有很多,可以自行百度,就不在重复了. 本篇文章将会以正点原子的跑马灯例程作为移植对象,基于ST固件库3.5版本 将实现在VSCode上的程序编写与烧录 ...

随机推荐

  1. 安装 Ubuntu 后的个人常用配置

    在 ASA 猪队友的带领下,拥抱开源世界,用上了Ubuntu.资深强迫症现身说法,配置符合自己使用习惯的Ubuntu. 1. 窗口标题栏显示菜单项 打开系统设置->外观->行为,在[显示窗 ...

  2. C#添加dll引用后,添加命名空间出错的解决方案

    原因:类库dll的目标框架与项目的目标框架不一致造成的,右键单击项目project--〉属性 ---〉Application选项卡下有“目标框架”Target Framewiork,  遇到的是类库的 ...

  3. arcgis破解的时候,不能启动license manager的问题

    1.防火墙没关:(非常重要) 2.win+R,调出控制台,输入services.msc.然后手动开启ArcGIS license manager服务,关闭其余类似erdas,matlab影响该服务的开 ...

  4. 一维Poisson方程计算

    package com.smartmap.algorithm.equation.differential.partial.ellipsoidal; import java.io.FileOutputS ...

  5. [转]MOSS通过此命令注册模板,web应用程序可以根据stp模块生成网站集

    注:C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\bin          stsadm –o add ...

  6. OC NSNumber NSValue

    OC NSNumber NSValue iOS的集合对象不可以存储C语言基本类型,所有可以进行装箱和拆箱,来进行OC对象操作. NSNumber包装类 普通初始化 NSNumber * num1 = ...

  7. OC self = [super init] , 点语法 , @property

    OC self = [super init] , 点语法 , @property 构造方法为啥这么写? self = [super init]; [super init] 的结果可能有三种: 第一种: ...

  8. iOS 简单动画 序列帧动画

    - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ NSLog(@"旭宝爱吃 ...

  9. iOS之 HTTP、Socket、TCP的区别(易混

    一.HTTP 是一种超文本传输协议,全名hypertext transfer protocol,从字面意思上可以看出该协议用于规定客户端与服务端之间的传输规则, 传输的内容不限于文本(任意类型的数据) ...

  10. nodejs 小爬虫

    编写爬虫示例: var http = require('http'); var cheerio = require('cheerio'); var url = 'http://www.cnblogs. ...