MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Dotnet-Framework

Dotnet-Framework是一款code方向的AI技能,核心价值是Guidance for working with ,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Guidance for working with .NET Framework projects. Includes project structure, C# language version, NuGet management, and best practices.

Last verified on: 2026-05-30
mkdir -p ./skills/dotnet-framework && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/dotnet-framework/SKILL.md -o ./skills/dotnet-framework/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# .NET Framework Development


Build and Compilation Requirements

- Always use `msbuild /t:rebuild` to build the solution or projects instead of `dotnet build`


Project File Management


Legacy and SDK-Style Project Structure

Many .NET Framework projects use the legacy non-SDK project format, which differs significantly from modern SDK-style projects. However, SDK-style project files can also target .NET Framework, such as `net48` or `net472`. Check the `.csproj` format before applying project-file guidance:


- **Legacy non-SDK projects**: All new source files **MUST** be explicitly added to the project file (`.csproj`) using a `<Compile>` element

- Legacy non-SDK projects do not automatically include files in the directory like SDK-style projects

- Example: `<Compile Include="Path\To\NewFile.cs" />`


- **SDK-style projects**: If the project file has an `Sdk` attribute, use SDK-style conventions even when it targets .NET Framework

- Example: `<Project Sdk="Microsoft.NET.Sdk">`

- Uses `<TargetFramework>` instead of `<TargetFrameworkVersion>`

- Example: `<TargetFramework>net48</TargetFramework>`


- **No Implicit Imports in legacy projects**: Unlike SDK-style projects, legacy non-SDK projects do not automatically import common namespaces or assemblies


- **Build Configuration in legacy projects**: Contains explicit `<PropertyGroup>` sections for Debug/Release configurations


- **Output Paths in legacy projects**: Explicit `<OutputPath>` and `<IntermediateOutputPath>` definitions


- **Target Framework in legacy projects**: Uses `<TargetFrameworkVersion>` instead of `<TargetFramework>`

- Example: `<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>`


NuGet Package Management

- Installing and updating NuGet packages in .NET Framework projects is a complex task requiring coordinated changes to multiple files. Therefore, **do not attempt to install or update NuGet packages** in this project.

- Instead, if changes to NuGet references are required, ask the user to install or update NuGet packages using the Visual Studio NuGet Package Manager or Visual Studio package manager console.

- When recommending NuGet packages, ensure they are compatible with .NET Framework or .NET Standard 2.0 (not only .NET Core or .NET 5+).


C# Language Version is 7.3

- This project is limited to C# 7.3 features only. Please avoid using:


C# 8.0+ Features (NOT SUPPORTED):

- Using declarations (`using var stream = ...`)

- Await using statements (`await using var resource = ...`)

- Switch expressions (`variable switch { ... }`)

- Null-coalescing assignment (`??=`)

- Range and index operators (`array[1..^1]`, `array[^1]`)

- Default interface methods

- Readonly members in structs

- Static local functions

- Nullable reference types (`string?`, `#nullable enable`)


C# 9.0+ Features (NOT SUPPORTED):

- Records (`public record Person(string Name)`)

- Init-only properties (`{ get; init; }`)

- Top-level programs (program without Main method)

- Pattern matching enhancements

- Target-typed new expressions (`List<string> list = new()`)


C# 10+ Features (NOT SUPPORTED):

- Global using statements

- File-scoped namespaces

- Record structs

- Required members


Use Instead (C# 7.3 Compatible):

- Traditional using statements with braces

- Switch statements instead of switch expressions

- Explicit null checks instead of null-coalescing assignment

- Array slicing with manual indexing

- Abstract classes or interfaces instead of default interface methods


Environment Considerations (Windows environment)

- Use Windows-style paths with backslashes (e.g., `C:\path\to\file.cs`)

- Use Windows-appropriate commands when suggesting terminal operations

- Consider Windows-specific behaviors when working with file system operations


Common .NET Framework Pitfalls and Best Practices


Async/Await Patterns

- **ConfigureAwait(false)**: Always use `ConfigureAwait(false)` in library code to avoid dea

🎯 Best For

  • UI designers
  • Product designers
  • Claude users
  • GitHub Copilot users
  • Software engineers

💡 Use Cases

  • Generating component mockups
  • Creating design system tokens
  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Dotnet-Framework to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Does this work with Figma?

Some design skills integrate with Figma plugins. Check the Works With section for supported tools.

Is Dotnet-Framework compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Dotnet-Framework?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Dotnet-Framework?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/dotnet-framework/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping usability testing

AI-generated designs should be validated with real users before development.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills