@@ -2059,16 +2059,30 @@ private void ExportToVisualStudio_Click(object sender, RoutedEventArgs e)
2059
2059
Directory . CreateDirectory ( projectDirectory ) ;
2060
2060
2061
2061
// Write solution file
2062
- File . WriteAllText ( solutionFile ,
2063
- Res . VSSolution
2064
- . Replace ( "$guid1$" , projectGuid )
2065
- . Replace ( "$guid2$" , Guid . NewGuid ( ) . ToString ( ) )
2066
- . Replace ( "$guid2$" , Guid . NewGuid ( ) . ToString ( ) )
2067
- . Replace ( "$projectname$" , projectName ) ) ;
2062
+ if ( ! File . Exists ( projectFile )
2063
+ || MessageBox . Show ( $ "The solution file \" { solutionFile } \" already exists.\r \n Do you want to override it ?",
2064
+ "Solution file override" ,
2065
+ MessageBoxButton . YesNo ,
2066
+ MessageBoxImage . Question ) == MessageBoxResult . Yes )
2067
+ {
2068
+ File . WriteAllText ( solutionFile ,
2069
+ Res . VSSolution
2070
+ . Replace ( "$guid1$" , projectGuid )
2071
+ . Replace ( "$guid2$" , Guid . NewGuid ( ) . ToString ( ) )
2072
+ . Replace ( "$guid2$" , Guid . NewGuid ( ) . ToString ( ) )
2073
+ . Replace ( "$projectname$" , projectName ) ) ;
2074
+ }
2068
2075
2069
2076
// Write project file
2070
- File . WriteAllText ( projectFile ,
2071
- Res . VSProject ) ;
2077
+ if ( ! File . Exists ( projectFile )
2078
+ || MessageBox . Show ( $ "The project file \" { projectFile } \" already exists.\r \n Do you want to override it ?",
2079
+ "Project file override" ,
2080
+ MessageBoxButton . YesNo ,
2081
+ MessageBoxImage . Question ) == MessageBoxResult . Yes )
2082
+ {
2083
+ File . WriteAllText ( projectFile ,
2084
+ Res . VSProject ) ;
2085
+ }
2072
2086
2073
2087
// Write Entry file
2074
2088
File . WriteAllText ( entryFile ,
0 commit comments