File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -81,23 +81,23 @@ public void ApplyProcesses()
8181 // remove files with _original.dll and _original.pdb
8282
8383 renameAssemblyPath = Path . Combine ( AssemblyDirName , $ "{ AssemblyName } _original.dll") ;
84- renamePdbPath = Path . Combine ( Path . GetDirectoryName ( pdbPath ) ! , $ "{ Path . GetFileNameWithoutExtension ( pdbPath ) } _original.pdb") ;
85-
8684 if ( File . Exists ( renameAssemblyPath ) )
8785 {
8886 Log . Information ( "Deleting : {FileName}" , Path . GetFileName ( renameAssemblyPath ) ) ;
8987 File . Delete ( renameAssemblyPath ) ;
9088 }
91-
92- if ( File . Exists ( renamePdbPath ) )
93- {
94- Log . Information ( "Deleting : {FileName}" , Path . GetFileName ( renamePdbPath ) ) ;
95- File . Delete ( renamePdbPath ) ;
96- }
97-
9889 File . Move ( AssemblyPath , renameAssemblyPath ) ;
90+
9991 if ( pdbPath is not null )
92+ {
93+ renamePdbPath = Path . Combine ( Path . GetDirectoryName ( pdbPath ) ! , $ "{ Path . GetFileNameWithoutExtension ( pdbPath ) } _original.pdb") ;
94+ if ( File . Exists ( renamePdbPath ) )
95+ {
96+ Log . Information ( "Deleting : {FileName}" , Path . GetFileName ( renamePdbPath ) ) ;
97+ File . Delete ( renamePdbPath ) ;
98+ }
10099 File . Move ( pdbPath , renamePdbPath ) ;
100+ }
101101 }
102102
103103 ICompiledAssembly ApplyProcess < TProcessor > ( ICompiledAssembly assemblyToApplyProcessTo )
You can’t perform that action at this time.
0 commit comments