Compiler Error CS2021
File name 'file' is too long or invalid
All file names passed to the C# compiler must be no longer than _MAX_PATH
(defined in a Windows header file). The compiler will give this error in the following situations:
A file name (including the path) is longer than
_MAX_PATH
.The file name contains invalid characters.
The file name contains wildcards where wildcards are not allowed (such as in resource file names).
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: