.NET is a free, cross-platform, open-source developer platform for building many kinds of applications. It can run programs written in multiple languages, with C# being the most popular. It relies on a high-performance runtime that is used in production by many high-scale apps.
The .NET platform has been designed to deliver productivity, performance, security, and reliability. It provides automatic memory management via a garbage collector (GC). It is type-safe and memory-safe, due to using a GC and strict language compilers. It offers concurrency via async/await and Task primitives. It includes a large set of libraries that have broad functionality and have been optimized for performance on multiple operating systems and chip architectures.
The runtime, libraries, and languages are the pillars of the .NET stack. Higher-level components, like .NET tools, and app stacks, like ASP.NET Core, build on top of these pillars. C# is the primary programming language for .NET and much of .NET is written in C#.
C# is object-oriented and the runtime supports object orientation. C# requires garbage collection and the runtime provides a tracing garbage collector. The libraries (and also the app stacks) shape those capabilities into concepts and object models that enable developers to productively write algorithms in intuitive workflows.
Support for doing multiple things at the same time is fundamental to practically all workloads. That could be client applications doing background processing while keeping the UI responsive, services handling many thousands of simultaneous requests, devices responding to a multitude of simultaneous stimuli, or high-powered machines parallelizing the processing of compute-intensive operations. Asynchronous programming support is a first-class feature of the C# programming language, which provides the async and await keywords that make it easy to write and compose asynchronous operations while still enjoying the full benefits of all the control flow constructs the language has to offer.
The type system offers significant breadth, catering somewhat equally to safety, descriptiveness, dynamism, and native interop. First and foremost, the type system enables an object-oriented programming model. It includes types, (single base class) inheritance, interfaces (including default method implementations), and virtual method dispatch to provide a sensible behavior for all the type layering that object orientation allows. Generic types are a pervasive feature that let you specialize classes to one or more types.
The .NET runtime provides automatic memory management via a garbage collector. For any language, its memory management model is likely its most defining characteristic. This is true for .NET languages. .NET has a self-tuning, tracing GC. It aims to deliver "hands off" operation in the general case while offering configuration options for more extreme workloads. The current GC is the result of many years of investment and learnings from a multitude of workloads.
Value types and stack-allocated memory blocks offer more direct, low-level control over data and native platform interop, in contrast to .NET's GC-managed types. Most of the primitive types in .NET, like integer types, are value types, and users can define their own types with similar semantics. Value types are fully supported through .NET's generics system, meaning that generic types like List can provide flat, no-overhead memory representations of value type collections.
Reflection is a "programs as data" paradigm, allowing one part of a program to dynamically query and invoke another, in terms of assemblies, types, and members. It's particularly useful for late-bound programming models and tools.
Exceptions are the primary error handling model in .NET. Exceptions have the benefit that error information does not need to be represented in method signatures or handled by every method. Proper exception handling is essential for application reliability. To prevent your app from crashing, you can intentionally handle expected exceptions in your code. A crashed app is more reliable and diagnosable than an app with undefined behavior.
App stacks, like ASP.NET Core and Windows Forms, build on and take advantage of low-level libraries, language, and runtime. The app stacks define the way that apps are constructed and their lifecycle of execution.
The SDK and other tools enable a modern developer experience, both on a developer desktop and for continuous integration (CI). The modern developer experience includes being able to build, analyze, and test code. .NET projects can often be built by a single dotnet build command, which orchestrates restoring NuGet packages and building dependencies.
NuGet is the package manager for .NET. It contains hundreds of thousands of packages that implement functionality for many scenarios. A majority of apps rely on NuGet packages for some functionality. The NuGet Gallery is maintained by Microsoft.
My setup is: I have a solution that had different dotnet4.6 applications (services) in it. Now we added a dotnet core project inside this solution. I can build and debug it, but this doesn't create an executable. In Visual Studio I can rightclick -> Publish... it. I created two profiles (x86 and x64) that should create nice binaries in /bin/Publish/x86 or /x64. In VS this works. The application is self-contained and works on different unprepared machines.
But now I Need to move that process to the buildserver. I messed around with dotnet publish but in the end i get stuck because other components of the solution are not clean dotnet core and so the build fails.So I need to stick with MSBuild.
This says it finished building successfully, but I don't see any results. Also it doesn't make any difference, if I remove all properties and just call msbuild and *.csproj. It just builds the new project in bin/Debug, as dll, not exe.
I read a few articles on SO, telling that VS doesn't just call msbuild with parameters but does internal API calls. Still, I need a solution. I need the build server to create an executable. Is there a way to trigger msbuild to create thath?
I think it was the dotnet build/publish command that wanted me to change TargetFrameworks to TargetFramework. But for MSBuild this is wrong. And dotnet wasn't working here, as the solution is mixing dotnet core and dotnet framework. So that had to be fixed.
I too had a nightmare with inconsistencies between builds from Visual Studio IDE and the dotnet publish command, that were only fixed by doing it using msbuild.exe instead. Also, using /p:PublishProfiles=theXMLthatVSgenerates.xml never worked, so I had to break out every option into the msbuild command line.
Facing some issues while registering DotNet Core Package on version 7.18. Currently all our development activities were performed in Windows OS and later we would have to package it and deploy in Client OS which is Linux.
So the blocker right now is we are getting error while registering our local instance and it gives 404 error. I understand that the Clio tool is compatible with DotNet Framework so would like to know if there is any other methodology for generating package in DotNet Core.
I tried replicating the same error message on my side, tried several configurations (including deleting Terrasoft.WebApp reference in IIS, different URLs with the / at the end and port numbers, localhost and actual domain name). I wasn't able to receive the same error:
Are you using the latest clio binary files (they can be found here)? Also can you login to the application from the browser directly? And have I understood you right that you are trying to login to the .NET Core app (localhost:5020)?
Yes I am using Dotnet core package and as it is not hosted on IIS and on Kestrel, I am wondering if that is the reason why I am getting 404. To check how the clio command works, I tried hosting dotnet framework package on IIS and the clio command responded successfully.
There shouldn't be any specific setting. Can you try re-deploying your local app using .Net Core and hosted on Linux? Also don't you receive any errors in the application logs at the moment of the connect? Logs of the .Net Core app are located in the Logs folder of the root application directory:
Now we are experiencing another issue. We are running the SonarQube in our project file to do a code quality analysis. So the package includes an Object Code along with the source Code and which is hindering the successful installation of the package.
I have two Ubuntu 22.04 systems with Dotnet 6.0. The one that has been continuously upgraded from older versions of Ubuntu runs my Dotnet Core 3.1 app without any trouble -- because it still has the old runtime (and libssl1.1) that are no longer available for 22.04.
It turns out the Ubuntu choices for SDK and runtime location are incompatible with Microsoft's. So, it's nice to have the dotnet6 package to pull in all the packages, but the ones you want are actually Microsoft's! The key is to first create an apt preferences file:
(which my working system already had based on instructions for making Dotnet 6.0 work, at Why don't any of these methods work for installing .Net Core SDK & runtime on 22.04 (Jammy Jellyfish)?. I actually didn't have a problem getting Dotnet 6 to work on this WSL installation, I just couldn't make it find the 3.1 runtime)
Because dotnet core supports ARMv7, but it doesn't say much clear about ARMv7M. So, I tried to port uCLinux from STM32F7 on my custom STM32H7 board. The OS boots fine but when I ran "dotnet --version", response is "sh: ./dotnet: No such file or directory".
Running a Linux on a microcontroller without MMU and virtual memory support already is a very bad idea. But running a .NET on such a crippled Linux in MCU is just insane. Do you even know how a .NET works internally? It allocates and reallocates everything dynamically! Every integer is a dynamically allocated object! Even if you get it to run, not only it will be slow, it will also have problems with memory fragmentation, which means it will be totally unreliable.
c80f0f1006