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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Orkeon.Compliance.Vfs" Version="1.4.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Orkeon.Compliance.Vfs" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Orkeon.Compliance.Vfs">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Orkeon.Compliance.Vfs --version 1.4.0
                    
#r "nuget: Orkeon.Compliance.Vfs, 1.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Orkeon.Compliance.Vfs@1.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Orkeon.Compliance.Vfs&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Orkeon.Compliance.Vfs&version=1.4.0
                    
Install as a Cake Tool

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.SuppressVfsComplianceAttribute on 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 reason is mandatory by design: a bare exemption is the thing this analyzer exists to prevent. ORKCON001 is opted out the same way, with an attribute named exactly Orkeon.Compliance.Vfs.SuppressConsoleComplianceAttribute (one string reason) 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

MIT © Orkeon Contributors

There are no supported framework assets in this package.

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