1

Is there a way I can tell what framework I've been using as I need to access machine.config?

Framework or Framework 64 under C:\Windows\Microsoft.NET\ directory both have the file.

bluish
  • 26,356
  • 27
  • 122
  • 180
TeaDrinkingGeek
  • 1,995
  • 5
  • 34
  • 52

2 Answers2

2

From within the code? In C# 4.0 Environment.Is64BitProcess, in < 4.0 IntPtr.Size. And read How to detect Windows 64-bit platform with .NET?

Community
  • 1
  • 1
xanatos
  • 109,618
  • 12
  • 197
  • 280
2

have a look at this article: If you are using .NET 4, it has two properties in the Environment class, Is64BitOperatingSystem and Is64BitProcess. give them a try.

and have a look on this article, it's really useful: How to detect programmatically whether you are running on 64-bit Windows

Mohammed Swillam
  • 9,119
  • 4
  • 36
  • 47