Orkeon.Compliance.Vfs
1.4.0
Prefix Reserved
dotnet add package Orkeon.Compliance.Vfs --version 1.4.0
NuGet\Install-Package Orkeon.Compliance.Vfs -Version 1.4.0
<PackageReference Include="Orkeon.Compliance.Vfs" Version="1.4.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Orkeon.Compliance.Vfs" Version="1.4.0" />
<PackageReference Include="Orkeon.Compliance.Vfs"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Orkeon.Compliance.Vfs --version 1.4.0
#r "nuget: Orkeon.Compliance.Vfs, 1.4.0"
#:package Orkeon.Compliance.Vfs@1.4.0
#addin nuget:?package=Orkeon.Compliance.Vfs&version=1.4.0
#tool nuget:?package=Orkeon.Compliance.Vfs&version=1.4.0
Orkeon.Compliance.Vfs
A Roslyn analyzer that refuses direct System.IO — and direct System.Console — in your own
code: the guard rail of Orkeon, usable in any C# project.
Eight diagnostics (ORKVFS001–ORKVFS007 for direct System.IO, ORKCON001 for direct
System.Console), errors by default, no runtime dependency. A console sink of your own is marked
[SuppressConsoleCompliance] (see below).
Point of it: an AI coding agent — or a teammate in a hurry — writes File.WriteAllText
where the design said "through the file-system abstraction". With this analyzer in the
project, that line does not compile.
Install
<PackageReference Include="Orkeon.Compliance.Vfs" Version="<version>" PrivateAssets="all" />
dotnet build — and every File.*, Directory.*, new FileStream(...), new FileSystemWatcher(...),
new StreamReader("<path>") and Path.GetFullPath(<user input>) is an ORKVFS error.
Nothing else from Orkeon is required: the package depends on no Orkeon assembly.
Some release candidates of this package were compiled against Roslyn 5.9.0, newer than the compiler of a stock .NET 10 SDK, and are inert outside the Orkeon repository: the compiler skips them with
CS9057— a warning, then silence. Stable versions are compiled against Roslyn 4.8.0 — any SDK from .NET 8.0.100 on loads them.
| Rule | Reports |
|---|---|
ORKVFS001 |
a call on System.IO.File |
ORKVFS002 |
a call on System.IO.Directory |
ORKVFS003 |
new of a System.IO file-system type (FileStream, FileInfo, DirectoryInfo…) |
ORKVFS004 |
Path.GetFullPath on a string — the call that turns user input into a real path without any mount check |
ORKVFS005 |
new FileSystemWatcher(...) |
ORKVFS006 |
new StreamReader / new StreamWriter on a path string |
ORKVFS007 |
a nullable IFileSystemService? field or parameter (only meaningful when you use Orkeon's abstraction) |
ORKCON001 |
any use of a System.Console member — an application that writes to the console needs the attribute below, or the severity set lower |
What is exempt, and how to opt out
Paths. Files whose path contains
/tests/or/examples/are not analysed, so test suites and samples may touch the real disk. (Orkeon's own VFS implementation folders are exempt by the same mechanism.)Per symbol. Put an attribute named exactly
Orkeon.Compliance.Vfs.SuppressVfsComplianceAttributeon the method, type, member — or the assembly. The analyzer matches it by name, so declare it yourself, once,internal, in any file of the project:namespace Orkeon.Compliance.Vfs; [System.AttributeUsage(System.AttributeTargets.All, Inherited = false)] internal sealed class SuppressVfsComplianceAttribute(string reason) : System.Attribute { public string Reason { get; } = reason; }The
reasonis mandatory by design: a bare exemption is the thing this analyzer exists to prevent.ORKCON001is opted out the same way, with an attribute named exactlyOrkeon.Compliance.Vfs.SuppressConsoleComplianceAttribute(one stringreason) on the console adapter or sink.Severity. Standard Roslyn configuration —
.editorconfig:dotnet_diagnostic.ORKVFS001.severity = warning dotnet_diagnostic.ORKVFS007.severity = none # you do not use IFileSystemService
Documentation
- VFS compliance — the rules, one by one
- Publication matrix — what ships where
- Verify what you install — provenance attestation for this package
MIT © Orkeon Contributors
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.4.0 | 152 | 11/23/2026 |
| 1.3.0 | 175 | 11/18/2026 |
| 1.2.0 | 168 | 11/16/2026 |
| 1.1.0 | 155 | 11/15/2026 |
| 1.0.0 | 170 | 11/12/2026 |
| 1.0.0-rc.7 | 83 | 11/11/2026 |
| 1.0.0-rc.6 | 243 | 10/28/2026 |
| 1.0.0-rc.5 | 245 | 10/12/2026 |
| 1.0.0-rc.4 | 156 | 9/22/2026 |
Release notes: https://github.com/Orkeon/orkeon/blob/main/CHANGELOG.md