The TargetFramework element specifies the. NET version that the app depends on. You can edit the project file to add additional targets and tasks specific to the project. MSBuild and the. For more information, see Using.
NuGet is an open-source package manager designed for. A NuGet package is a. Developers with code to share create packages and publish them to nuget. Developers who want to use shared code add a package to their project and can then call the API exposed by the package in their project code.
For more information, see NuGet documentation. The CLR handles memory allocation and management. The CLR is also a virtual machine that not only executes apps but also generates and compiles code using a just-in-time JIT compiler. JIT compilation happens on the same machine that the code is going to run on. Since JIT compilation occurs during execution of the application, the compilation time is part of the run time.
Therefore, JIT compilers have to balance time spent optimizing code against the savings that the resulting code can produce. But a JIT compiler knows the actual hardware and can free developers from having to ship different implementations for different platforms. NET JIT compiler can do tiered compilation , which means it can recompile individual methods at run time.
This feature lets it compile quickly while still being able to produce a highly tuned version of the code for frequently used methods. For more information, see Managed execution process and Tiered compilation. The default experience for most. The garbage collector GC manages the allocation and release of memory for applications. Each time your code creates a new object, the CLR allocates memory for the object from the managed heap.
As long as address space is available in the managed heap, the runtime continues to allocate space for new objects. When not enough free address space remains, the GC checks for objects in the managed heap that are no longer being used by the application. It then reclaims that memory. A program is memory safe if it accesses only allocated memory. For instance, the runtime ensures that an app doesn't access unallocated memory beyond the bounds of an array.
For more information, see Automatic memory management and Fundamentals of garbage collection. Sometimes code needs to reference unmanaged resources. Unmanaged resources are resources that aren't automatically maintained by the. NET runtime. For example, a file handle is an unmanaged resource. A FileStream object is a managed object, but it references a file handle, which is unmanaged. When you're done using the FileStream , you need to explicitly release the file handle.
NET, objects that reference unmanaged resources implement the IDisposable interface. When you're done using the object, you call the object's Dispose method, which is responsible for releasing any unmanaged resources. For more information, see Cleaning up unmanaged resources. Publishing an app as self-contained produces an executable file that includes the. NET runtime and libraries , and the application and its dependencies.
Users of the application can run it on a machine that doesn't have the. NET runtime installed. Self-contained apps are platform-specific, and they can optionally be published using a form of AOT compilation. Publishing an app as framework-dependent produces an executable file and binary files. Users of the application have to separately install the. The executable file is platform-specific, but the. You can install multiple versions of the runtime side by side to run framework-dependent apps that target different versions of the runtime.
For more information, see Target frameworks. Executables are produced for specific target platforms, which you specify with a runtime identifier RID. NET application publishing overview and Introduction to. NET and Docker. NET has an expansive standard set of class libraries, known as runtime libraries , framework libraries , or the base class library BCL. These libraries provide implementations for many general-purpose and workload-specific types and utility functionality.
For more information, see the Runtime libraries overview. Libraries for some commonly used application functionality aren't included in the runtime libraries but are made available in NuGet packages, such as the following:. EF Core lets you work with a database by referring to. NET objects in code. It reduces the amount of data-access code you would otherwise need to write and test. EF Core supports many database engines.
Language-integrated query LINQ lets you write declarative code for operating on data. To understand. NET documentation, it can help to know how the usage of some terms has changed over time. In , Microsoft released. NET Framework , a development platform for creating Windows apps. NET Framework is at version 4.
In , Microsoft introduced. NET Core as a cross-platform, open-source successor to. Sign Up Forgot Password? Microsoft 49 Technology. Net Framework 4 About. Net Framework 2 Assemblies 2. Azure 1 Cloud 1. Sql Server 2 Bussiness Intelligence 2. Net 8 Intro to ADO. Net 2 Objects in ADO.
Other 1 Programming 1. Sensor 1 Ultransonic Sensor 1. Docker 3 Docker Images and Containers 3. Kubernetes 1 Kubernetes 1. General 3 General 3. Linux 1 Linux 1. Virtual Machine 1 IOS 1. NodeJs 3 NodeJs 3. Table of Contents. Improve Article.
Save Article. Like Article. Next C. Recommended Articles. Article Contributed By :. Easy Normal Medium Hard Expert. Writing code in comment? Please use ide. Load Comments. What's New. Most popular in C. Split Method in C with Examples. More related articles in C.
0コメント