Skip to content

Read a Text File Without Specifying the Full Path in C#: port to .NET 11 - #2454

Merged
vladimir-pecanac-main merged 3 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/109707-csharp-read-a-text-file-without-full-path
Dec 2, 2026
Merged

vladimir-pecanac-main merged 3 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/109707-csharp-read-a-text-file-without-full-path

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Ports the ReadATextFileWithoutSpecifyingFullLocation sample to net11.0 with xunit 2.9.3, xunit.runner.visualstudio 4.0.1, Microsoft.NET.Test.Sdk 18.12.0 and coverlet.collector 10.1.1, switches the base-directory helper and its test from AppDomain.CurrentDomain.BaseDirectory to AppContext.BaseDirectory, and adds four lines to Program.cs that print the current and base directories and read the file through the base directory, as the updated article shows.

…xt.BaseDirectory

Both projects move to net11.0, test packages to xunit 2.9.3, xunit.runner.visualstudio 4.0.1, Microsoft.NET.Test.Sdk 18.12.0 and coverlet.collector 10.1.1. ReadFileUsingBaseDirectory and its test use AppContext.BaseDirectory, and Program.cs prints the current and base directories after the read.
@vladimir-pecanac-main
vladimir-pecanac-main merged commit beaf9b3 into CodeMazeBlog:main Dec 2, 2026
4 checks passed
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.

1 participant