0

If I develop a 64 bit webpart DLL does it work with SharePoint 2007 32 bit?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
sahil
  • 1

2 Answers2

0

No can do. You can't load 64-bit DLL in a 32-bit process.

Franci Penov
  • 74,861
  • 18
  • 132
  • 169
  • 1
    Nope, you can't force 64-bit dll in a 32-bit process. I would rather focus on ArjanP's question of why is your web-part 64-bit only? Can you install a 32-bit version of it? – Franci Penov Jan 11 '10 at 18:04
  • Then you have to build two versions of your web part - one 32-bit and one 64-bit. Even if there was a magic setting that would allow 32-bit SharePoint to load 64-bit webparts, I would assume that it's under the control of the SP admin, not yours. – Franci Penov Jan 12 '10 at 06:35
0

By default a .NET assembly will target "Any CPU" (see Build > Configuration manager in Visual Studio).

This means that the Intermediate Language (IL) code produced will be Just In Time (JIT) compiled into 32bit code when running on a 32 bit OS and 64 bit code when running on a 64 bit OS.

Unless you are doing something very funky (which is unlikely in a SharePoint web part) then you should leave it as "Any CPU" and simply not worry about it any more - it will just automagically work.

Community
  • 1
  • 1
Ryan
  • 23,871
  • 24
  • 86
  • 132