{"id":41879133,"url":"https://github.com/shashinvision/dotnet_angular_cli_cheatsheet","last_synced_at":"2026-01-26T18:01:15.468Z","repository":{"id":252855573,"uuid":"841544313","full_name":"shashinvision/dotnet_angular_cli_cheatsheet","owner":"shashinvision","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-15T13:12:03.000Z","size":638,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T17:21:56.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shashinvision.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-12T16:06:20.000Z","updated_at":"2026-01-15T13:12:10.000Z","dependencies_parsed_at":"2025-05-27T20:28:08.480Z","dependency_job_id":"b47e6f6e-c5a1-416c-bac8-0f0b26ab1390","html_url":"https://github.com/shashinvision/dotnet_angular_cli_cheatsheet","commit_stats":null,"previous_names":["shashinvision/dotnet_angular_cli_cheatsheet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shashinvision/dotnet_angular_cli_cheatsheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shashinvision%2Fdotnet_angular_cli_cheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shashinvision%2Fdotnet_angular_cli_cheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shashinvision%2Fdotnet_angular_cli_cheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shashinvision%2Fdotnet_angular_cli_cheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shashinvision","download_url":"https://codeload.github.com/shashinvision/dotnet_angular_cli_cheatsheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shashinvision%2Fdotnet_angular_cli_cheatsheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28784093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-25T13:00:20.519Z","updated_at":"2026-01-26T18:01:15.460Z","avatar_url":"https://github.com/shashinvision.png","language":null,"readme":"# .NET and Angular CLI Cheat Sheet 📋\n\nA comprehensive guide for full-stack developers working with .NET and Angular. This cheat sheet covers everything from initial setup to advanced testing strategies.\n\n## Table of Contents\n- [.NET Core Setup](#net-core-setup) 🛠️\n- [.NET CLI Commands](#net-cli-commands) 🖥️\n- [Entity Framework Core](#entity-framework-core) 🗃️\n- [.NET Testing Guide](#net-testing-guide) 🧪\n- [Angular CLI](#angular-cli) ⚡\n- [Development Tools](#development-tools) 🧰\n\n---\n\n## .NET Core Setup 🛠️\n\n### Linux/Mac Development Environment\n\n#### Fix OmniSharp Issues (Linux/Mac)\n```bash\n# Ubuntu/Debian\nsudo apt update\nsudo apt install mono-complete\n\n# macOS\nbrew install mono\n\n# Manual OmniSharp installation\ngit clone https://github.com/OmniSharp/omnisharp-roslyn.git\ncd omnisharp-roslyn\n./build.sh\n```\n\n#### Multiple .NET SDK Versions Setup\n```bash\n# Create dotnet directory\nmkdir ~/.dotnet\n\n# Download and install .NET 8\nwget https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.408/dotnet-sdk-8.0.408-linux-x64.tar.gz\ntar -zxf dotnet-sdk-8.0.408-linux-x64.tar.gz -C ~/.dotnet\n\n# Download and install .NET 6\nwget https://builds.dotnet.microsoft.com/dotnet/Sdk/6.0.425/dotnet-sdk-6.0.425-linux-x64.tar.gz\ntar -zxf dotnet-sdk-6.0.425-linux-x64.tar.gz -C ~/.dotnet\n\n# Verify installations\ndotnet --list-sdks\n\n# Delete \n\nsudo rm -rf /usr/local/share/dotnet/sdk/6.0.*\nsudo rm -rf /usr/local/share/dotnet/sdk/7.0.*\nsudo rm -rf /usr/local/share/dotnet/sdk/8.0.403\n\n## optional delete runtimes\n\nls /usr/local/share/dotnet/shared/Microsoft.NETCore.App\nsudo rm -rf /usr/local/share/dotnet/shared/Microsoft.NETCore.App/6.*\nsudo rm -rf /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.*\n\n# Verify \ndotnet --list-sdks\n\n```\n\n#### Environment Configuration\nAdd to your `.zshrc` or `.bashrc`:\n```bash\nexport DOTNET_ROOT=$HOME/.dotnet\nexport PATH=$HOME/.dotnet:$PATH\nexport DOTNET_ROLL_FORWARD=Major  # Use latest major version\n```\nReload configuration:\n```bash\nsource ~/.zshrc  # or source ~/.bashrc\n```\n\n#### SSL Certificate Issues (Linux)\n```bash\n# Install and configure dev certificates\ndotnet tool update -g linux-dev-certs\ndotnet linux-dev-certs install\n\n# Clean and recreate certificates\ndotnet dev-certs https --clean\ndotnet dev-certs https --trust\n```\n\n---\n\n## .NET CLI Commands 🖥️\n\n### Project Creation and Management\n\n#### Basic Project Setup\n```bash\n# Create solution directory\nmkdir MyApp \u0026\u0026 cd MyApp\n\n# Create solution file\ndotnet new sln -n MyApp\n\n# Create Web API project\ndotnet new webapi -controllers -n MyApp.Api\n\n# Add project to solution\ndotnet sln add MyApp.Api/MyApp.Api.csproj\n\n# Verify solution structure\ndotnet sln list\n```\n\n#### Multi-Project Solution Setup\n```bash\n# Create organized solution structure\ndotnet new sln -n MyApp\nmkdir MyApp.Api\nmkdir MyApp.Core\nmkdir MyApp.Infrastructure\nmkdir MyApp.Tests\nmkdir MyApp.IntegrationTests\n\n# Create projects\ncd MyApp.Api \u0026\u0026 dotnet new webapi \u0026\u0026 cd ..\ncd MyApp.Core \u0026\u0026 dotnet new classlib \u0026\u0026 cd ..\ncd MyApp.Infrastructure \u0026\u0026 dotnet new classlib \u0026\u0026 cd ..\ncd MyApp.Tests \u0026\u0026 dotnet new xunit \u0026\u0026 cd ..\ncd MyApp.IntegrationTests \u0026\u0026 dotnet new xunit \u0026\u0026 cd ..\n\n# Add projects to solution\ndotnet sln add MyApp.Api/MyApp.Api.csproj\ndotnet sln add MyApp.Core/MyApp.Core.csproj\ndotnet sln add MyApp.Infrastructure/MyApp.Infrastructure.csproj\ndotnet sln add MyApp.Tests/MyApp.Tests.csproj\ndotnet sln add MyApp.IntegrationTests/MyApp.IntegrationTests.csproj\n\n# Add project references\ncd MyApp.Api \u0026\u0026 dotnet add reference ../MyApp.Core/MyApp.Core.csproj \u0026\u0026 cd ..\ncd MyApp.Infrastructure \u0026\u0026 dotnet add reference ../MyApp.Core/MyApp.Core.csproj \u0026\u0026 cd ..\ncd MyApp.Tests \u0026\u0026 dotnet add reference ../MyApp.Core/MyApp.Core.csproj \u0026\u0026 cd ..\n```\n\n### Essential CLI Commands\n\n#### Project Operations\n```bash\n# List available templates\ndotnet new --list\n\n# Create projects with specific templates\ndotnet new webapi -controllers -n MyApi\ndotnet new classlib -n MyLibrary\ndotnet new console -n MyConsoleApp\n\n# Restore dependencies\ndotnet restore\n\n# Build project\ndotnet build\n\n# Run project\ndotnet run\n\n# Run on specific port\ndotnet run --urls \"http://127.0.0.1:5001\"\n\n# Watch for changes (development)\ndotnet watch\ndotnet watch --no-hot-reload  # Disable hot reload\ndotnet watch --no-hot-reload --project MyApi/MyApi.csproj\n```\n\n#### Package Management\n```bash\n# Add NuGet package\ndotnet add package Microsoft.EntityFrameworkCore\ndotnet add package Microsoft.AspNetCore.Authentication.JwtBearer\n\n# Remove package\ndotnet remove package PackageName\n\n# List packages\ndotnet list package\n\n# Update packages\ndotnet restore --force\n```\n\n#### Version Management\n```bash\n# Check installed SDKs\ndotnet --list-sdks\n\n# Check current version\ndotnet --version\n\n# Get system information\ndotnet --info\n\n# Create global.json for project-specific SDK\ndotnet new globaljson --force\n```\nExample `global.json`:\n```json\n{\n  \"sdk\": {\n    \"version\": \"8.0.408\",\n    \"rollForward\": \"latestMinor\"\n  }\n}\n```\n\n#### Utilities\n```bash\n# Create .gitignore\ndotnet new gitignore\n\n# Clean build outputs\ndotnet clean\n\n# Publish application\ndotnet publish -c Release\n\n# Create NuGet package\ndotnet pack\n\n# Install global tools\ndotnet tool install --global dotnet-ef\ndotnet tool list -g\ndotnet tool update -g dotnet-ef\n```\n\n---\n\n## Entity Framework Core 🗃️\n\n### Installation and Setup\n```bash\n# Install EF Core tools globally\ndotnet tool install --global dotnet-ef --version 8.0.3\n\n# Verify installation\ndotnet ef --version\n\n# View available commands\ndotnet ef --help\ndotnet ef migrations --help\ndotnet ef database --help\n```\n\n### Migration Commands\n```bash\n# Create initial migration\ndotnet ef migrations add InitialCreate -o Data/Migrations\n\n# Add subsequent migrations\ndotnet ef migrations add UserEntityUpdated\ndotnet ef migrations add AddProductTable\n\n# Remove last migration\ndotnet ef migrations remove\n\n# Apply migrations to database\ndotnet ef database update\n\n# Update to specific migration\ndotnet ef database update InitialCreate\n\n# Drop database\ndotnet ef database drop\n\n# Generate migration script\ndotnet ef migrations script\n\n# View migration history\ndotnet ef migrations list\n```\n\n### Common EF Core Patterns\n```bash\n# Create migration with custom output folder\ndotnet ef migrations add AddAuditFields -o Data/Migrations/Audit\n\n# Create migration for specific context\ndotnet ef migrations add UpdateUserModel --context UserDbContext\n\n# Update database for specific environment\ndotnet ef database update --environment Production\n```\n\n---\n\n## .NET Testing Guide 🧪\n\n### Testing Frameworks Setup\n\n#### xUnit (Recommended)\n```xml\n\u003cPackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"17.8.0\" /\u003e\n\u003cPackageReference Include=\"xunit\" Version=\"2.4.2\" /\u003e\n\u003cPackageReference Include=\"xunit.runner.visualstudio\" Version=\"2.4.5\" /\u003e\n\u003cPackageReference Include=\"Moq\" Version=\"4.20.69\" /\u003e\n\u003cPackageReference Include=\"FluentAssertions\" Version=\"6.12.0\" /\u003e\n\u003cPackageReference Include=\"Microsoft.AspNetCore.Mvc.Testing\" Version=\"8.0.0\" /\u003e\n```\n\n#### NUnit (Alternative)\n```xml\n\u003cPackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"17.8.0\" /\u003e\n\u003cPackageReference Include=\"NUnit\" Version=\"3.13.3\" /\u003e\n\u003cPackageReference Include=\"NUnit3TestAdapter\" Version=\"4.5.0\" /\u003e\n\u003cPackageReference Include=\"coverlet.collector\" Version=\"3.2.0\" /\u003e\n```\n\n#### xUnit/NUnit packages\n```bash\ndotnet add package xunit\ndotnet add package xunit.runner.visualstudio\n```\n\n#### NUnit packages\n```bash\ndotnet add package NUnit\ndotnet add package NUnit3TestAdapter\ndotnet add package Microsoft.NET.Test.Sdk\n```\n\n#### Shared packages\n```bash\ndotnet add package Moq\ndotnet add package FluentAssertions\ndotnet add package AutoFixture\ndotnet add package Microsoft.EntityFrameworkCore.InMemory\n```\n\n### Essential Testing Packages\n```bash\n# Add testing packages\ndotnet add package xunit\ndotnet add package xunit.runner.visualstudio\ndotnet add package Moq\ndotnet add package FluentAssertions\ndotnet add package AutoFixture\ndotnet add package Microsoft.EntityFrameworkCore.InMemory\n```\n\n### Testing Patterns and Examples\n\n#### NUnit Basic Test Example\n```csharp\n[TestFixture]\npublic class CalculatorTests\n{\n    private Calculator _calculator;\n\n    [SetUp]\n    public void Setup()\n    {\n        _calculator = new Calculator();\n    }\n\n    [Test]\n    public void Add_ShouldReturnSum()\n    {\n        var result = _calculator.Add(2, 3);\n        Assert.AreEqual(5, result);\n    }\n\n    [TestCase(4, true)]\n    [TestCase(5, false)]\n    public void IsEven_ShouldReturnExpectedResult(int number, bool expected)\n    {\n        var result = _calculator.IsEven(number);\n        Assert.That(result, Is.EqualTo(expected));\n    }\n\n    [Test]\n    public void Divide_ByZero_ShouldThrow()\n    {\n        Assert.Throws\u003cDivideByZeroException\u003e(() =\u003e _calculator.Divide(10, 0));\n    }\n}\n```\n\n#### Basic Unit Test Structure\n```csharp\n// AAA Pattern: Arrange, Act, Assert\npublic class CalculatorTests\n{\n    private readonly Calculator _calculator;\n    \n    public CalculatorTests()\n    {\n        _calculator = new Calculator();\n    }\n    \n    [Fact]\n    public void Add_WithTwoPositiveNumbers_ShouldReturnSum()\n    {\n        // Arrange\n        var a = 5;\n        var b = 3;\n        \n        // Act\n        var result = _calculator.Add(a, b);\n        \n        // Assert\n        result.Should().Be(8);\n    }\n    \n    [Theory]\n    [InlineData(4, true)]\n    [InlineData(5, false)]\n    [InlineData(0, true)]\n    public void IsEven_WithDifferentNumbers_ShouldReturnExpectedResult(int number, bool expected)\n    {\n        // Act\n        var result = _calculator.IsEven(number);\n        \n        // Assert\n        result.Should().Be(expected);\n    }\n    \n    [Fact]\n    public void Divide_ByZero_ShouldThrowException()\n    {\n        // Arrange\n        var a = 10.0;\n        var b = 0.0;\n        \n        // Act \u0026 Assert\n        Action action = () =\u003e _calculator.Divide(a, b);\n        action.Should().Throw\u003cDivideByZeroException\u003e();\n    }\n}\n```\n\n#### Mocking with Moq\n```csharp\npublic class UserServiceTests\n{\n    private readonly Mock\u003cIUserRepository\u003e _mockRepository;\n    private readonly UserService _service;\n    \n    public UserServiceTests()\n    {\n        _mockRepository = new Mock\u003cIUserRepository\u003e();\n        _service = new UserService(_mockRepository.Object);\n    }\n    \n    [Fact]\n    public async void GetUser_UserExists_ShouldReturnUser()\n    {\n        // Arrange\n        var userId = 1;\n        var expectedUser = new User { Id = userId, Name = \"John\" };\n        \n        _mockRepository.Setup(r =\u003e r.GetByIdAsync(userId))\n                      .ReturnsAsync(expectedUser);\n        \n        // Act\n        var result = await _service.GetUserAsync(userId);\n        \n        // Assert\n        result.Should().NotBeNull();\n        result.Should().BeEquivalentTo(expectedUser);\n        _mockRepository.Verify(r =\u003e r.GetByIdAsync(userId), Times.Once);\n    }\n}\n```\n\n#### Integration Testing\n```csharp\npublic class UsersControllerIntegrationTests : IClassFixture\u003cWebApplicationFactory\u003cProgram\u003e\u003e\n{\n    private readonly WebApplicationFactory\u003cProgram\u003e _factory;\n    private readonly HttpClient _client;\n    \n    public UsersControllerIntegrationTests(WebApplicationFactory\u003cProgram\u003e factory)\n    {\n        _factory = factory;\n        _client = _factory.CreateClient();\n    }\n    \n    [Fact]\n    public async Task GetUsers_ShouldReturnSuccessStatusCode()\n    {\n        // Act\n        var response = await _client.GetAsync(\"/api/users\");\n        \n        // Assert\n        response.Should().BeSuccessful();\n        var content = await response.Content.ReadAsStringAsync();\n        content.Should().NotBeNullOrEmpty();\n    }\n}\n```\n\n### Test Execution Commands\n```bash\n# Run all tests\ndotnet test\n\n# Run tests with specific framework\ndotnet test --framework net8.0\n\n# Run tests with detailed output\ndotnet test --verbosity detailed\n\n# Run specific test project\ndotnet test MyApp.Tests/\n\n# Filter tests by name\ndotnet test --filter \"UserServiceTests\"\n\n# Filter NUnit tests\ndotnet test --filter \"FullyQualifiedName~CalculatorTests\"\n\n# Run tests with code coverage\ndotnet test --collect:\"XPlat Code Coverage\"\n\n# Generate coverage \ndotnet tool install -g dotnet-generator-globaltool\ngenerator -s:\"coverage.cobertura.xml\" -targetdir:\"coverage\" -types:Html\n\n# Run tests in parallel\ndotnet test --parallel\n\n# Run tests with custom settings\ndotnet test --settings test.runsettings\n```\n\n## REPORT TEST: \n### coverlet.collector\n```bash\ndotnet add package coverlet.collector\n```\n```bash\ndotnet test --collect:\"XPlat Code Coverage\" --p:Threshold=70 --p:ThresholdStat=Total\n```\n### reportgenerator\n```bash\ndotnet tool install -g dotnet-reportgenerator-globaltool\n```\n```bash\nreportgenerator -reports:\"./TestResults/**/coverage.cobertura.xml\" -targetdir:\"coverage\" -reporttypes:Html\n```\n```bash\nopen coverage/index.html\n```\n### Para excluir del reporte y Coverage usa este decorador\n```bash\n    [ExcludeFromCodeCoverage]\n```\n```bash\nusing System.Diagnostics.CodeAnalysis;\n\npublic class OrdenService\n{\n    [ExcludeFromCodeCoverage]\n    public OrdenService()\n    {\n        // Constructor solo para DI / configuración\n    }\n}\n```\n```bash\n[ExcludeFromCodeCoverage]\npublic class MapperProfile\n{\n}\n```\n\n### Automatizar el TEST con un archivo test-coverage.sh, recuerda colocar chmod +x test-coverage.sh y para ejecutar ./test-coverage.sh\n\n\n```bash\nchmod +x test-coverage.sh\n```\n```bash\n./test-coverage.sh\n```\n#### Archivo test-coverage.sh\n```bash\n#!/bin/bash\n\n# Limpiar\nrm -rf TestResults/ coverage/\n\n# Tests con cobertura\ndotnet test --collect:\"XPlat Code Coverage\" --p:Threshold=70 --p:ThresholdStat=Total --settings coverlet.runsettings\n\n# Reporte ignorando archivos generados\nreportgenerator \\\n  -reports:\"./TestResults/**/coverage.cobertura.xml\" \\\n  -targetdir:\"coverage\" \\\n  -reporttypes:Html \\\n  -filefilters:\"-**/obj/**\"\n\necho \"✅ Reporte generado en coverage/index.html\"\n\n```\n---\n\n## Angular CLI ⚡\n\n### Installation and Version Management\n```bash\n# Install latest Angular CLI globally\nnpm install -g @angular/cli\n\n# Install specific version\nnpm install -g @angular/cli@17\nnpm install -g @angular/cli@16.2.0\n\n# Uninstall current version\nnpm uninstall -g @angular/cli\n\n# Check version\nng version\n```\n\n### Project Creation\n```bash\n# Create new standalone project (Angular 17+)\nng new MyApp\ncd MyApp\nng serve\n\n# Create modular project (traditional structure)\nng new MyApp --standalone=false\n\n# Create project with specific options\nng new MyApp --routing --style=scss --skip-tests --package-manager=npm\n\n# Serve application\nng serve\nng serve -o  # Open browser automatically\nng serve --port 4201  # Custom port\n```\n\n### SSL Configuration\n\n#### Using mkcert (Recommended)\n```bash\n# Install mkcert (macOS)\nbrew install mkcert\nmkcert -install\n\n# Create SSL certificates\nmkdir ssl\ncd ssl\nmkcert localhost\n\n# Configure Angular CLI\n```\n\nAdd to `angular.json`:\n```json\n{\n  \"serve\": {\n    \"builder\": \"@angular-devkit/build-angular:dev-server\",\n    \"options\": {\n      \"ssl\": true,\n      \"sslCert\": \"./ssl/localhost.pem\",\n      \"sslKey\": \"./ssl/localhost-key.pem\"\n    }\n  }\n}\n```\n\n#### Using Angular's built-in SSL\n```bash\nng serve --ssl\nng serve --ssl --host localhost --port 4200\n```\n\n### Code Generation\n```bash\n# Get help for generators\nng generate --help\nng generate component --help\n\n# Component generation\nng generate component nav --skip-tests\nng g c shared/header --skip-tests\n\n# Service generation\nng g s services/user --skip-tests\nng g s core/services/auth --skip-tests\n\n# Other generators\nng g interface models/user\nng g enum enums/user-role\nng g pipe pipes/capitalize\nng g directive directives/highlight\nng g guard guards/auth\nng g interceptor interceptors/error --skip-tests\n\n# Module generation (for non-standalone apps)\nng g module shared\nng g module feature/user --routing\n\n# Environment files\nng g environments\n```\n\n### Advanced Angular CLI Commands\n```bash\n# Build for production\nng build --prod\nng build --configuration production\n\n# Analyze bundle size\nng build --stats-json\nnpx webpack-bundle-analyzer dist/stats.json\n\n# Add dependencies\nng add @angular/material\nng add @ngrx/store\nng add @angular/pwa\n\n# Update dependencies\nng update\nng update @angular/core @angular/cli\n\n# Lint and format\nng lint\nng lint --fix\n\n# Test commands\nng test\nng test --watch=false --browsers=ChromeHeadless\nng e2e\n\n# Extract i18n messages\nng extract-i18n\n\n# Dry run (preview changes)\nng generate component nav --dry-run\n```\n\n---\n\n## Development Tools 🧰\n\n### Jupyter Notebooks with .NET\n\n#### Setup\n```bash\n# Install Python dependencies\npip install jupyterlab\n\n# Install .NET Interactive\ndotnet tool install -g Microsoft.dotnet-interactive\n\n# Register kernels with Jupyter\ndotnet interactive jupyter install\n\n# Verify installation\njupyter kernelspec list\n\n# Build and start Jupyter Lab\njupyter lab build\njupyter-lab\n```\n\n#### Alternative with X Tool\n```bash\n# Install X tool\ndotnet tool install --global x\ndotnet tool update -g x\n\n# Generate C# Jupyter notebooks\nx jupyter-csharp\nx jupyter-csharp https://techstacks.io FindTechStacks \"{Ids:[1,2,3],VendorName:'Google',Take:5}\"\n```\n\n### Productivity Tips\n\n#### LazyVim + Tmux Workflow\n```bash\n# Essential tmux commands for .NET development\ntmux new -s dotnet-dev\ntmux split-window -h\ntmux split-window -v\n\n# Window management\nCtrl+b + %  # Split horizontally\nCtrl+b + \"  # Split vertically\nCtrl+b + arrow  # Navigate panes\n```\n\n#### Git Integration\n```bash\n# Create comprehensive .gitignore\ndotnet new gitignore\n\n# Common additions for Angular projects\necho \"dist/\" \u003e\u003e .gitignore\necho \"node_modules/\" \u003e\u003e .gitignore\necho \".angular/\" \u003e\u003e .gitignore\n```\n\n### Performance and Debugging\n\n#### .NET Performance\n```bash\n# Enable detailed logging\nexport DOTNET_LOGGING_LEVEL=Debug\n\n# Memory profiling\ndotnet-trace collect --process-id \u003cPID\u003e\n\n# Performance counters\ndotnet-counters monitor --process-id \u003cPID\u003e\n```\n\n#### Angular Performance\n```bash\n# Bundle analysis\nng build --stats-json\nnpm install -g webpack-bundle-analyzer\nwebpack-bundle-analyzer dist/stats.json\n\n# Lighthouse CI\nnpm install -g @lhci/cli\nlhci autorun\n```\n\n---\n\n## Common Workflows\n\n### Full-Stack Development Setup\n```bash\n# Backend setup\nmkdir MyFullStackApp\ncd MyFullStackApp\n\n# Create .NET API\ndotnet new sln -n MyApp\ndotnet new webapi -controllers -n MyApp.Api\ndotnet sln add MyApp.Api/MyApp.Api.csproj\n\n# Frontend setup\nng new client --directory=client --skip-git\ncd client\nng serve --port 4200\n\n# Back to API\ncd ../MyApp.Api\ndotnet watch --no-hot-reload\n```\n\n### Docker Integration\n```dockerfile\n# Dockerfile for .NET API\nFROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base\nWORKDIR /app\nEXPOSE 80\n\nFROM mcr.microsoft.com/dotnet/sdk:8.0 AS build\nWORKDIR /src\nCOPY [\"MyApp.Api/MyApp.Api.csproj\", \"MyApp.Api/\"]\nRUN dotnet restore \"MyApp.Api/MyApp.Api.csproj\"\nCOPY . .\nWORKDIR \"/src/MyApp.Api\"\nRUN dotnet build \"MyApp.Api.csproj\" -c Release -o /app/build\n\nFROM build AS publish\nRUN dotnet publish \"MyApp.Api.csproj\" -c Release -o /app/publish\n\nFROM base AS final\nWORKDIR /app\nCOPY --from=publish /app/publish .\nENTRYPOINT [\"dotnet\", \"MyApp.Api.dll\"]\n```\n\n### CI/CD Pipeline Example\n```yaml\n# .github/workflows/dotnet.yml\nname: .NET Core CI\non: [push, pull_request]\njobs:\n  build:\n    runs-on: ubuntu-latest\n    \n    steps:\n    - uses: actions/checkout@v3\n    \n    - name: Setup .NET\n      uses: actions/setup-dotnet@v3\n      with:\n        dotnet-version: '8.0.x'\n    \n    - name: Restore dependencies\n      run: dotnet restore\n    \n    - name: Build\n      run: dotnet build --no-restore\n    \n    - name: Test\n      run: dotnet test --no-build --verbosity normal --collect:\"XPlat Code Coverage\"\n    \n    - name: Generate coverage report\n      run: |\n        dotnet tool install -g dotnet-reportgenerator-globaltool\n        reportgenerator -reports:\"**/coverage.cobertura.xml\" -targetdir:\"coveragereport\" -reporttypes:Html\n```\n### excluir con coverlet.runsettings\n```bash\ncoverlet.runsettings\n```\n```yaml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cRunSettings\u003e\n  \u003cDataCollectionRunSettings\u003e\n    \u003cDataCollectors\u003e\n      \u003cDataCollector friendlyName=\"XPlat Code Coverage\"\u003e\n        \u003cConfiguration\u003e\n          \u003cFormat\u003ecoverage\u003c/Format\u003e\n            \u003cExcludeByFile\u003e**/Infrastructure/Contexts/*\u003c/ExcludeByFile\u003e\n            \u003cExcludeByFile\u003e**/Models/*\u003c/ExcludeByFile\u003e\n            \u003cExcludeByFile\u003e**/Models/DTOs/*\u003c/ExcludeByFile\u003e\n            \u003cExcludeByFile\u003e**/Models/Entities/*\u003c/ExcludeByFile\u003e\n        \u003c/Configuration\u003e\n      \u003c/DataCollector\u003e\n    \u003c/DataCollectors\u003e\n  \u003c/DataCollectionRunSettings\u003e\n\u003c/RunSettings\u003e\n```\n```yaml\ndotnet test --collect:\"XPlat Code Coverage\" --p:Threshold=70 --p:ThresholdStat=Total --settings coverlet.runsettings\n```\n---\n\n## Troubleshooting\n\n### Common .NET Issues\n```bash\n# Clear NuGet cache\ndotnet nuget locals all --clear\n\n# Reset global tools\ndotnet tool uninstall -g dotnet-ef\ndotnet tool install -g dotnet-ef\n\n# Fix certificate issues\ndotnet dev-certs https --clean\ndotnet dev-certs https --trust\n\n# Check process using port\nlsof -i :5000\nkill -9 \u003cPID\u003e\n```\n\n### Common Angular Issues\n```bash\n# Clear npm cache\nnpm cache clean --force\n\n# Clear Angular cache\nng cache clean\n\n# Reset node_modules\nrm -rfv node_modules package-lock.json\nnpm install\n\n# Fix permissions (macOS/Linux)\nsudo chown -R $(whoami) ~/.npm\n```\n\n---\n\n## Best Practices\n\n### Project Structure\n```\nMyFullStackApp/\n├── src/\n│   ├── MyApp.Api/          # Web API\n│   ├── MyApp.Core/         # Business logic\n│   ├── MyApp.Infrastructure/ # Data access\n│   └── MyApp.Shared/       # Shared models\n├── tests/\n│   ├── MyApp.UnitTests/\n│   ├── MyApp.IntegrationTests/\n│   └── MyApp.AcceptanceTests/\n├── client/                 # Angular app\n├── docs/                   # Documentation\n├── scripts/                # Build scripts\n└── docker-compose.yml      # Local development\n```\n\n### Code Quality\n```bash\n# .NET code analysis\ndotnet add package Microsoft.CodeAnalysis.Analyzers\ndotnet add package StyleCop.Analyzers\n\n# Angular code quality\nng add @angular-eslint/schematics\nnpm install --save-dev prettier\nnpm install --save-dev husky lint-staged\n```\n\n### Security\n```bash\n# .NET security packages\ndotnet add package Microsoft.AspNetCore.Authentication.JwtBearer\ndotnet add package Microsoft.AspNetCore.DataProtection\n\n# Angular security\nng add @angular/cdk\nnpm install --save helmet\nnpm install --save express-rate-limit\n```\n\n---\n\n## Resources and References\n- [.NET Documentation](https://docs.microsoft.com/en-us/dotnet/) 📚\n- [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) 🗃️\n- [Angular Documentation](https://angular.io/docs) ⚡\n- [xUnit Testing](https://xunit.net/) 🧪\n- [Moq Framework](https://github.com/moq/moq4) 🧩\n- [FluentAssertions](https://fluentassertions.com/) ✅\n\n---\n\n*This cheat sheet is designed for intermediate to advanced full-stack developers working with .NET and Angular. Keep it handy for quick reference during development!* 🚀\n","funding_links":[],"categories":["Learning Resources"],"sub_categories":["Cheat Sheets"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshashinvision%2Fdotnet_angular_cli_cheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshashinvision%2Fdotnet_angular_cli_cheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshashinvision%2Fdotnet_angular_cli_cheatsheet/lists"}