-pathmap (C# Compiler Options)
The -pathmap compiler option specifies how to map physical paths to source path names output by the compiler.
The full path to the source files in the current environment
The source path substituted for
path1 in any output files.
To specify multiple mapped source paths, separate each with a comma.
The compiler writes the source path into its output for the following reasons:
- The source path is substituted for an argument when the CallerFilePathAttribute is applied to an optional parameter.
- The source path is embedded in a PDB file.
- The path of the PDB file is embedded into a PE (portable executable) file.
This option maps each physical path on the machine where the compiler runs to a corresponding path that should be written in the output files.
t.cs in the directory C:\work\tests and map that directory to \publish in the output:
csc -pathmap:C:\work\tests=\publish t.cs
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.