Convert Figma logo to code with AI

dotnet logosdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI

2,882
1,118
2,882
2,872

Top Related Projects

14,660

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

16,206

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.

21,236

.NET news, announcements, release notes, and more!

19,370

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

22,629

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.

Quick Overview

The dotnet/sdk repository is the central hub for the .NET SDK, which includes the .NET CLI, MSBuild, and the core set of MSBuild targets and tasks used to build .NET projects. It provides the essential tools and components needed for developing, building, and managing .NET applications across various platforms.

Pros

  • Cross-platform compatibility, supporting Windows, macOS, and Linux
  • Comprehensive toolset for .NET development, including CLI tools and build systems
  • Regular updates and improvements, keeping pace with the evolving .NET ecosystem
  • Strong community support and extensive documentation

Cons

  • Learning curve for newcomers to the .NET ecosystem
  • Occasional breaking changes between major versions
  • Large installation size compared to some other development environments
  • Some features may be Windows-centric, despite cross-platform support

Getting Started

To get started with the .NET SDK:

  1. Download and install the .NET SDK from https://dotnet.microsoft.com/download
  2. Open a terminal and verify the installation:
dotnet --version
  1. Create a new console application:
dotnet new console -n MyFirstApp
cd MyFirstApp
  1. Build and run the application:
dotnet build
dotnet run

For more detailed instructions and advanced usage, refer to the official documentation at https://docs.microsoft.com/dotnet/core/sdk.

Competitor Comparisons

14,660

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.

Pros of dotnet

  • More comprehensive, covering the entire .NET ecosystem
  • Includes documentation and resources for the broader .NET platform
  • Serves as a central hub for .NET-related information and updates

Cons of dotnet

  • Larger and potentially more complex to navigate
  • May include more general information, making it harder to find specific SDK-related details
  • Updates might be less frequent due to the broader scope

Code Comparison

sdk:

public class Program
{
    public static void Main(string[] args)
    {
        Console.WriteLine("Hello from SDK!");
    }
}

dotnet:

using System;

namespace DotNetExample
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello from .NET!");
        }
    }
}

Summary

While sdk focuses specifically on the .NET SDK, dotnet provides a more comprehensive overview of the entire .NET ecosystem. The sdk repository is likely more suitable for developers working directly with the SDK, offering more targeted information and potentially more frequent updates. On the other hand, dotnet serves as a central resource for all things .NET, making it valuable for those seeking a broader understanding of the platform or working across multiple .NET technologies.

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Pros of aspnetcore

  • More focused on web development, providing specialized tools and frameworks
  • Includes built-in middleware and components for common web scenarios
  • Offers a comprehensive ecosystem for building modern web applications

Cons of aspnetcore

  • Larger repository size due to more specialized components
  • Steeper learning curve for developers new to web development
  • May include unnecessary features for non-web projects

Code Comparison

aspnetcore:

app.UseRouting();
app.UseEndpoints(endpoints =>
{
    endpoints.MapControllers();
});

sdk:

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.Run();

Key Differences

  • aspnetcore focuses on web development, while sdk provides a broader set of tools for .NET development
  • sdk is more lightweight and suitable for various project types, whereas aspnetcore is tailored for web applications
  • aspnetcore offers more out-of-the-box features for web development, while sdk requires additional packages for web-specific functionality

Use Cases

  • Choose aspnetcore for web-centric projects requiring advanced features and middleware
  • Opt for sdk when building general-purpose .NET applications or when a minimal setup is preferred

Community and Support

Both repositories have active communities and regular updates, but aspnetcore may have more web-specific discussions and contributions.

16,206

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.

Pros of runtime

  • More comprehensive, covering core runtime components and libraries
  • Provides lower-level control and customization options
  • Larger community and more frequent updates

Cons of runtime

  • Steeper learning curve due to its complexity
  • Requires more in-depth knowledge of .NET internals
  • Potentially overwhelming for developers focused on higher-level application development

Code Comparison

runtime:

public static int Main(string[] args)
{
    Console.WriteLine("Hello World!");
    return 0;
}

sdk:

dotnet new console
dotnet run

The runtime example shows a basic C# program, while the sdk example demonstrates CLI commands for creating and running a project.

runtime focuses on the core functionality and execution of .NET applications, providing developers with more control over the underlying systems. sdk, on the other hand, offers a higher-level abstraction, simplifying project creation and management for developers.

While runtime is more suitable for advanced developers and those working on performance-critical applications, sdk is ideal for rapid development and those new to .NET ecosystem. The choice between the two depends on the specific needs of the project and the developer's expertise level.

21,236

.NET news, announcements, release notes, and more!

Pros of core

  • Broader scope, encompassing the entire .NET Core runtime and framework
  • More comprehensive documentation and community resources
  • Includes more extensive samples and examples for developers

Cons of core

  • Larger repository size, potentially slower to clone and navigate
  • More complex structure due to its broader scope
  • May be overwhelming for developers focused on specific SDK-related tasks

Code Comparison

core:

// Example from core's samples
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        Console.WriteLine("Hello World!");
    }
}

sdk:

// Example from sdk's test projects
using System;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;

namespace Microsoft.DotNet.Cli.Utils
{
    public class ExampleTask : Task
    {
        public override bool Execute()
        {
            // Task implementation
        }
    }
}

The code examples highlight the difference in focus between the two repositories. core provides more general-purpose samples, while sdk contains more specialized code related to build tasks and CLI utilities.

19,370

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

Pros of Roslyn

  • Focuses on compiler and language services, providing deeper insights into C# and VB.NET
  • Offers powerful APIs for code analysis, refactoring, and generation
  • Enables creation of custom analyzers and code fixes

Cons of Roslyn

  • Steeper learning curve due to its complexity and specialized focus
  • May require more setup and configuration for specific use cases
  • Less suitable for general .NET development tasks

Code Comparison

Roslyn (analyzing code):

var tree = CSharpSyntaxTree.ParseText("class C { }");
var root = tree.GetRoot();
var classDeclaration = root.DescendantNodes().OfType<ClassDeclarationSyntax>().First();
Console.WriteLine(classDeclaration.Identifier.Text);

SDK (creating a new project):

dotnet new console -n MyProject
cd MyProject
dotnet run

The Roslyn example demonstrates code analysis capabilities, while the SDK example shows project creation and execution. Roslyn is more focused on language services, whereas the SDK provides a broader set of tools for .NET development.

22,629

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.

Pros of MAUI

  • Enables cross-platform development for mobile and desktop applications
  • Provides a unified UI framework for multiple platforms
  • Offers native performance and access to platform-specific features

Cons of MAUI

  • Steeper learning curve for developers new to cross-platform development
  • Limited third-party library support compared to platform-specific SDKs
  • May have performance overhead for complex applications

Code Comparison

MAUI:

using Microsoft.Maui;
using Microsoft.Maui.Controls;

public class App : Application
{
    public App()
    {
        MainPage = new ContentPage { Content = new Label { Text = "Hello, MAUI!" } };
    }
}

SDK:

using System;

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Hello, .NET SDK!");
    }
}

The MAUI code snippet demonstrates creating a simple cross-platform UI, while the SDK example shows a basic console application. MAUI focuses on UI development, whereas the SDK provides a broader set of tools for various application types.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Welcome to dotnet sdk

This repository contains core functionality needed to create .NET projects that are shared between Visual Studio and the .NET CLI.

See dotnet/project-system for the project system work that is specific to Visual Studio.

Common project and item templates are found in template_feed.

Build status

VisibilityAll jobs
PublicStatus
Microsoft InternalStatus

Installing the SDK

You can download the .NET SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). The .NET SDK contains both the .NET runtime and CLI tools.

[!NOTE] When acquiring installers from the latest builds table, be aware that the installers are the latest bits. With development builds, internal NuGet feeds are necessary for some scenarios (for example, to acquire the runtime pack for self-contained apps). You can use the following NuGet.config to configure these feeds. See the following document Configuring NuGet behavior for more information on where to modify your NuGet.config to apply the changes.

For .NET 10 builds

<configuration>
  <packageSources>
    <add key="dotnet10" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json" />
  </packageSources>
</configuration>

For .NET 9 builds

<configuration>
  <packageSources>
    <add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
  </packageSources>
</configuration>

For .NET 8 builds

<configuration>
  <packageSources>
    <add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
  </packageSources>
</configuration>

Debian package dependencies

Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing the SDK from the .deb file (via dpkg or similar), then you'll need to install the corresponding dependencies first:

Looking for dotnet-install sources?

Sources for dotnet-install.sh and dotnet-install.ps1 are in the install-scripts repo.

How do I engage and contribute?

We welcome you to try things out, file issues, make feature requests and join us in design conversations. Be sure to check out our project documentation

This project has adopted the .NET Foundation Code of Conduct to clarify expected behavior in our community.

How do I build the SDK?

Start with the Developer Guide.

How do I test an SDK I have built?

To test your locally built SDK, run eng\dogfood.cmd after building. That script starts a new Powershell with the environment configured to redirect SDK resolution to your build.

From that shell your SDK is available in:

  • any Visual Studio instance launched via & devenv.exe
  • dotnet build
  • msbuild

How do I determine the timeline I must follow to get my changes in for a specific version of .NET?

Please see the Pull Request Timeline Guide.

How we triage and review PRs

With the SDK repository being the home for many different areas, we've started trying to label incoming issues for the area they are related to using Area- labels. Then we rely on the codeowners to manage and triages issues in their areas. Feel free to contact the owners listed in that file if you're not getting a response on a particular issue or PR. Please try to label new issues as that'll help us route them faster.

For issues related to the central SDK team, typically they are assigned out to a team member in the first half of each week. Then each member is asked to review and mark those needing further discussion as "needs team triage" and otherwise setting a milestone for the issue. Backlog means we will consider it in the future if there is more feedback. Discussion means we have asked for more information from the filer. All other milestones indicate our best estimate for when a fix will be targeted for noting that not all issues will get fixed. If you are not getting a quick response on an issue assigned to a team member, please ping them.

The example query used for triage of .NET SDK issues can be viewed here

For PRs, we assign a reviewer once a week on Wednesday, looking only at PRs that are green in the build. If you are contributing:

  • Get the PR green.
  • Include a test if possible.
  • Mention @dotnet-cli if you want to raise visibility of the PR.

License

The .NET SDK project uses the MIT license.

The LICENSE.txt and ThirdPartyNotices.txt in any downloaded archives are authoritative.