[Tip]Project Setting Diff for C++/C#

來源:互聯網
上載者:User

1. VS project setting regards with platform

For native c++ project, there are debug | win32, debug | x64, release | win32, release | x64 configurations. Note:

"debug" / "release" can be renamed while "win32" / "x64" can't.

For .net project, the intended configurations should be debug | AnyCPU, debug | x64, release | AnyCPU, release | x64. AnyCPU matches win32 here.

More from MSDN about platform for C#:

 

備忘
  1. x86 將程式集編譯為由相容 x86 的 32 位通用語言執行平台運行。

  2. Itanium 將程式集編譯為由採用 Itanium 處理器的電腦上的 64 位元通用語言執行平台運行。

  3. x64 將程式集編譯為由支援 AMD64 或 EM64T 指令集的電腦上的 64 位元通用語言執行平台運行。

  4. anycpu(預設值)將程式集編譯為在任意平台上運行。

在 64 位元 Windows 作業系統上:

  1. /platform:x86 編譯的程式集將在運行於 WOW64 下的 32 位 CLR 上執行。

  2. /platform:anycpu 編譯的可執行檔將在 64 位元 CLR 上執行。

  3. /platform:anycpu 編譯的 DLL 將在載入該進程的同一 CLR 上執行。

More about AnyCPU:

In .NET, the 'Platform Target: Any CPU' compiler option allows a .NET assembly to run as 64bit on a x64 machine, and 32bit on an x86 machine. It is also possible to force an assembly to run as x86 on an x64 machine using the 'Platform Target: x86' compiler option. 

2. C# project setting tips

a. Decide your target framework. If it's targeted to dotNet 3.5, you can add references of .net assembly from 1.0 to 3.5.

b. By default, resx's design.cs contains a internal class for visiting its resource. It's NOT public.

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.