Skip to content

Remove references to .NET Framework in code files - #12919

Open
gewarren wants to merge 3 commits into
dotnet:mainfrom
gewarren:delete-netfx-refs
Open

Remove references to .NET Framework in code files#12919
gewarren wants to merge 3 commits into
dotnet:mainfrom
gewarren:delete-netfx-refs

Conversation

@gewarren

Copy link
Copy Markdown
Collaborator

Contributes to #12713.

(Hide whitespace changes.)

Copilot AI review requested due to automatic review settings July 31, 2026 21:10
@gewarren
gewarren requested review from a team as code owners July 31, 2026 21:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the .NET API docs and snippet sources to remove (or neutralize) references to “.NET Framework” in code files, while also modernizing several snippet projects and sample outputs as part of #12713’s snippet modernization work.

Changes:

  • Rewords and reformats multiple XML doc remark/example blocks (mostly whitespace + wording updates).
  • Updates many C#, F#, and Visual Basic snippets to remove “.NET Framework” references and modernize syntax/output notes.
  • Modernizes/introduces several snippet projects (for example, WPF SDK-style project and new snippet csproj files).

Reviewed changes

Copilot reviewed 78 out of 78 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
xml/System/Type.xml Markdown formatting/whitespace adjustments in remarks/examples.
xml/System/String.xml Minor wording + spacing updates in remarks/examples.
xml/System.Windows/Application.xml Markdown bullet/spacing cleanup in remarks/note.
xml/System.Runtime.Versioning/FrameworkName.xml Wording modernization + spacing in remarks/examples.
snippets/visualbasic/System/Type/Assembly/type_assembly.vb Updates sample output text for modern .NET.
snippets/visualbasic/System/TimeSpan/Parse/parsefailure1.vb Removes .NET Framework-version-specific output notes.
snippets/visualbasic/System/String/IndexOf/ignorable21.vb Removes .NET Framework-specific phrasing + whitespace cleanup.
snippets/visualbasic/System/Single/Overview/PrecisionList4a.vb Removes snippet file content (deleted).
snippets/visualbasic/System/Single/Overview/precisionlist3.vb Removes .NET Framework-specific output notes.
snippets/visualbasic/System/Single/Overview/comparison2.vb Removes .NET Framework-specific output notes.
snippets/visualbasic/System/Convert/ToBoolean/system.convert snippet.vb Updates exception text + whitespace cleanup.
snippets/visualbasic/System/Console/Overview/example3.vb Removes .NET Framework version note + formatting cleanup.
snippets/visualbasic/System.Threading/SpinWait/Overview/spinwait.vb Removes .NET Framework phrasing in comment.
snippets/visualbasic/System.Text/StringBuilder/Capacity/cap.vb Removes .NET Framework-specific output note + whitespace cleanup.
snippets/visualbasic/System.Text/EncodingInfo/Overview/encodinginfo.vb Consolidates output note + whitespace cleanup.
snippets/visualbasic/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.vb Removes “New in .NET Framework …” note + whitespace cleanup.
snippets/visualbasic/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.vb Updates FrameworkName strings/output text for modern .NET.
snippets/visualbasic/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.vb Rewords .NET Framework mention + whitespace cleanup.
snippets/visualbasic/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.vb Removes .NET Framework-era commentary + whitespace cleanup.
snippets/visualbasic/System.Globalization/TextInfo/Clone/ro.vb Rewords “ships with the .NET Framework” to “.NET”.
snippets/visualbasic/System.Globalization/PersianCalendar/Overview/calendar2.vb Removes .NET Framework versioned output notes; updates sample output framing.
snippets/visualbasic/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.vb Rewords .NET Framework mention to .NET + whitespace cleanup.
snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.vb Removes “Requires .NET Framework …” header + whitespace cleanup.
snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.vb Removes “Requires .NET Framework …” header + whitespace cleanup.
snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.vb Removes “Requires .NET Framework …” header + whitespace cleanup.
snippets/visualbasic/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.vb Rewords .NET Framework mention + whitespace cleanup.
snippets/visualbasic/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.vb Removes “Requires .NET Framework …” header + whitespace cleanup.
snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb Removes snippet file content (deleted).
snippets/fsharp/System/Type/Assembly/type_assembly.fs Updates sample output text for modern .NET.
snippets/fsharp/System/TimeSpan/Parse/parsefailure1.fs Removes .NET Framework-version-specific output notes.
snippets/fsharp/System/String/IndexOf/ignorable21.fs Removes .NET Framework-specific phrasing + spacing cleanup.
snippets/fsharp/System/Double/Overview/precision1.fs Rewords .NET Framework mentions to .NET.
snippets/fsharp/System/Console/Overview/example3.fs Removes .NET Framework version note.
snippets/fsharp/System.Text/StringBuilder/Capacity/cap.fs Removes .NET Framework-specific output note.
snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.fs Removes “Requires .NET Framework …” header.
snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.fs Removes “Requires .NET Framework …” header.
snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.fs Removes “Requires .NET Framework …” header.
snippets/csharp/System/Type/Assembly/type_assembly.cs Updates sample output text; adjusts snippet region markers.
snippets/csharp/System/TimeSpan/Parse/parsefailure1.cs Removes snippet file content (deleted).
snippets/csharp/System/String/IndexOf/ignorable21.cs Removes .NET Framework-specific phrasing + whitespace cleanup.
snippets/csharp/System/Single/Overview/Project.csproj Removes explicit StartupObject from snippet project.
snippets/csharp/System/Single/Overview/Program.cs Adds top-level entry to run a chosen sample.
snippets/csharp/System/Single/Overview/precisionlist4a.cs Removes snippet file content (deleted).
snippets/csharp/System/Single/Overview/precisionlist3.cs Rewords output note to “modern .NET”.
snippets/csharp/System/Single/Overview/comparison2.cs Rewords output note to “modern .NET”.
snippets/csharp/System/Convert/ToBoolean/system.convert snippet.cs Updates exception text + whitespace cleanup.
snippets/csharp/System/Console/Overview/example3.cs Removes .NET Framework version note; brace/style changes.
snippets/csharp/System.Windows/Application/Overview/Properties/AssemblyInfo.cs Removes legacy assembly attributes; adjusts version comment.
snippets/csharp/System.Windows/Application/Overview/CSharp.csproj Migrates WPF snippet project to SDK-style net10.0-windows.
snippets/csharp/System.Threading/ThreadStart/Overview/source.cs Removes .NET Framework version note; some syntax modernization.
snippets/csharp/System.Threading/SpinWait/Overview/spinwait.cs Removes .NET Framework phrasing in comment.
snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs Removes .NET Framework-specific output note.
snippets/csharp/System.Text/EncodingInfo/Overview/encodinginfo.cs Consolidates output note to modern .NET.
snippets/csharp/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.cs Removes .NET Framework note + minor code cleanup.
snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Project.csproj Switches snippet project output type to Exe.
snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.cs Updates FrameworkName strings/output text for modern .NET.
snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex7.cs Removes .NET Framework output section from comment.
snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex5.cs Removes .NET Framework output section from comment.
snippets/csharp/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.cs Rewords .NET Framework mention to .NET.
snippets/csharp/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.cs Removes .NET Framework-era commentary; minor doc text tweak.
snippets/csharp/System.Globalization/TextInfo/Clone/ro.cs Rewords .NET Framework mention; minor C# modernizations.
snippets/csharp/System.Globalization/PersianCalendar/Overview/Project.csproj Switches snippet project output type to Exe.
snippets/csharp/System.Globalization/PersianCalendar/Overview/Program.cs Adds top-level entry to run a chosen sample.
snippets/csharp/System.Globalization/PersianCalendar/Overview/pcal.cs Formatting/syntax modernization.
snippets/csharp/System.Globalization/PersianCalendar/Overview/calendar2.cs Removes .NET Framework-versioned output notes + minor syntax updates.
snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.cs Rewords .NET Framework mention; minor type explicitness + comment formatting.
snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture.cs Rewords .NET Framework mention to .NET.
snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.cs Removes .NET Framework header; modernizes code + renames entry class/method.
snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/Project.csproj Adds SDK-style snippet project for this folder.
snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.cs Removes .NET Framework header; modernizes code + renames entry class/method.
snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.cs Removes .NET Framework header; modernizes code + renames entry class/method.
snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/datareceivedevent.cs Modernizes code style + nullable usage in output collection.
snippets/csharp/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.cs Rewords .NET Framework mention; minor comment formatting changes.
snippets/csharp/System.ComponentModel.Design/DesignerTransaction/Overview/source.cs Rewords .NET Framework mention; whitespace cleanup.
snippets/csharp/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.cs Removes “Requires .NET Framework …” header.
snippets/cpp/VS_Snippets_Winforms/InstanceDescriptorSample/CPP/instancedescriptor.cpp Rewords .NET Framework mention to .NET; whitespace cleanup.
snippets/cpp/VS_Snippets_Winforms/DesignerTransaction Sample/CPP/source.cpp Rewords .NET Framework mention to .NET; whitespace cleanup.
snippets/cpp/VS_Snippets_CLR_System/system.Runtime.InteropServices.MarshalAsAttribute.SizeParamIndex/CPP/marshalas.sizeparamindex.cpp Rewords .NET Framework mention to .NET.
Suppressed comments (2)

snippets/csharp/System/Type/Assembly/type_assembly.cs:25

  • The closing snippet marker (// ) is currently inside Main(), so the extracted snippet region doesn't include the closing braces / full sample. The end marker should come after the class so the snippet region is balanced.
    snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb:1
  • This file is removed, but it’s still referenced by multiple XML docs (for example, xml/Microsoft.VisualBasic.FileIO/FileSystem.xml:76 references source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb"). That will break snippet inclusion unless the references are updated or the file is restored.

Comment thread snippets/fsharp/System/Type/Assembly/type_assembly.fs Outdated
Comment thread snippets/csharp/System/Type/Assembly/type_assembly.cs
Comment thread snippets/visualbasic/System/Type/Assembly/type_assembly.vb Outdated
@gewarren
gewarren requested a review from 333fred as a code owner July 31, 2026 22:21
@gewarren

Copy link
Copy Markdown
Collaborator Author

Snippets 5000 failures are missing project files, which I don't plan to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants