.NET, “Any CPU/64Bit (x64)/32Bit (x86)” Best Practices, Tips and Tricks

If a .NET program directly or indirectly needs to call platform dependent/native/unmanaged code it might crash.

This 32-bit/64-bit theme came into my mind after I got a new laptop with Windows 7 64-bit installed and tried to develop with the SQLite database.

System.Data.SQLite contains managed code plus unmanaged code. There is a 32-bit version and a 64-bit, both have the same filename but different size and your EXE must use the right one.

To make it more complicated: My Visual Studio 2010 debugger is a 32-bit application, so I cannot debug when using "System.Data.SQLite-64bit" from the GAC!

As .NET developpers we need guidelines/know-how/best practices.

And the best place to collect this kind of information that I know of is this site (https://stackoverflow.com/).

So please, share your ideas and known issues which could serve as best practices or guidelines чтобы выжить в мире 32/64 / anyCPU dotnet.

Я бы предпочел одну проблему / трюк за «ответ» так что его можно легко комментировать / обновлять / ссылаться. - смело дайте несколько «ответов».

Я тоже поделюсь своими знаниями в качестве ответа на этот вопрос.

8
задан Community 23 May 2017 в 10:27
поделиться