migrating-cryptography-namespaces

Migrate System.Security.Cryptography namespace usage from .NET Framework to modern .NET.

19|2|Updated May 13, 2026
One-click install
npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill migrating-cryptography-namespaces
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrating-cryptography-namespaces
Source: https://github.com/microsoft/upgrade-agent-plugins/tree/main/plugins/upgrade-agent/extenders/upgrade-dotnet/upgrade/skills/lazy/libraries/migrating-cryptography-namespaces
Command: npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill migrating-cryptography-namespaces

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of upgrading .NET Framework projects to modern .NET by automating the migration of System.Security.Cryptography namespace usage.

Core Features & Use Cases

  • Namespace Migration: Automatically detects and updates the usage of cryptographic types from .NET Framework to modern .NET namespaces.
  • Code Analysis: Analyzes C# source files to identify cryptographic type usage and suggests the correct namespace and NuGet package additions.
  • Use Case: When upgrading .NET Framework projects that use System.Security.Cryptography and encounter CS0246 errors or missing using statements.

Quick Start

Run the 'migrating-cryptography-namespaces' skill to automatically migrate the cryptography namespace usage in your project.

Frequently Asked Questions about migrating-cryptography-namespaces

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix CS0246 errors for System.Security.Cryptography when upgrading to modern .NET?

Resolve CS0246 cryptography errors by analyzing C# source files to detect obsolete System.Security.Cryptography namespaces and automatically suggesting the correct modern .NET namespace changes and required NuGet package additions.

What is the best way to migrate System.Security.Cryptography namespaces from .NET Framework?

Migrate System.Security.Cryptography namespaces by using automated code analysis to scan C# files for cryptographic types, mapping them to modern .NET namespaces, and suggesting the required NuGet package additions.

Does this cryptography namespace migration tool suggest NuGet package additions for modern .NET?

Yes, this cryptography namespace migration analyzes C# source files for cryptographic type usage and suggests the exact modern .NET namespace changes and NuGet package additions required for a successful project upgrade.

Can I use this to automatically update using statements for cryptographic types in a .NET project upgrade?

Yes, you can automatically update using statements for cryptographic types during a .NET project upgrade by analyzing C# source files to identify missing references and applying the correct modern namespace changes.

When do I need to update cryptography namespaces for a modern .NET conversion?

You need to update cryptography namespaces when upgrading .NET Framework projects that use System.Security.Cryptography and encounter missing using statements or CS0246 errors due to changed modern .NET namespace structures.