I have installed the .NET Framework 4.5 but I can only use .NET Framework 4.0 in my project, which doesn't support BigInteger. Do I need Visual Studio 2012 for 4.5 or is Visual Studio 2010 fine for 4.5?
The . NET Framework 4.5 includes enhancements for ASP.NET 4.5. Visual Studio 2012 also includes enhancements and new features for improved web development. This document provides an overview of many of the new features that are included in Visual Studio 2012.
The functionality of Visual Studio 2010, . NET Framework 4 and Silverlight 4 creates a powerful and unique combination, opening up new opportunities for developers to build applications that take advantage of new and existing devices, as well as emerging platforms like cloud services.”
The two products are different but intimately related. Visual Studio . NET is an application-development tool for writing applications; the . NET Framework provides the infrastructure required to run those applications.
You can install on: Starting with Visual Studio 2022, Visual Studio no longer includes . NET Framework components for . NET Framework 4.0 - 4.5. 1 because these versions are no longer supported.
Yes, you need VS 2012 to use .NET 4.5, however, BigInteger was introduced in .NET 4
Every modern version of Visual Studio (VS 2002 on) is keyed to a specific .NET Framework version, and cannot "see"/use newer versions released after that VS version. More recent VS versions, VS 2008 and beyond can "see" some older framework versions, but CANNOT "see" newer versions of .NET.
VS 2008 keyed to .NET 3.5 and can use 2.0 and 3.0. CANNOT use 4.0 or 4.5
VS 2010 keyed to .NET 4.0 and can use 3.5, 3.0 and 2.0. CANNOT use 4.5
VS 2012 keyed to .NET 4.5 and can use 4.0, 3.5, 3.0 and 2.0
If you need features introduced in .NET Framework 4.5, you need VS 2012.
As others have noted, BigInteger was introduced in .NET 4.0, not .NET 4.5. Through our exchange in the comments, it appears that you had not referenced System.Numerics.dll in your project.
VS project references tell the C# compiler which assemblies define the types that will be used in the C# code being compiled. The default Visual Studio project templates do not include references to the entire .NET framework. Several more specialized assemblies, such as System.Numerics, are omitted; if you want to use them, you have to add the reference yourself.
People frequently confuse the using directive (using System.Numerics;
) with the reference itself. The using directive only helps the compiler with resolving type names; it concerns a namespace. For the compiler to find the types themselves, you need a reference, which identifies an assembly.
That information should help clarify the error message "The type or namespace name 'Numerics' does not exist in the namespace 'System' (are you missing an assembly reference?)". This means that the compiler has examined all the referenced assemblies, and it has found no type or namespace called System.Numerics
.
To add an assembly reference in VS 2010:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With