@@ -210,14 +210,39 @@ try {
210210
211211 # Update all source files
212212 Write-Host " `n Updating source files..." - ForegroundColor Blue
213- Get-ChildItem - Recurse - Include " *.cs" , " *.razor" , " *.cshtml" | ForEach-Object {
213+ Get-ChildItem - Recurse - Include " *.cs" , " *.razor" , " *.cshtml" , " *.Designer.cs " , " AssemblyInfo.cs " | ForEach-Object {
214214 $content = Get-Content $_.FullName
215215 $content = $content -replace " namespace CanBeYours\." , " namespace $solutionName ."
216216 $content = $content -replace " using CanBeYours\." , " using $solutionName ."
217217 $content = $content -replace " @namespace CanBeYours\." , " @namespace $solutionName ."
218218 $content = $content -replace " @using CanBeYours\." , " @using $solutionName ."
219+
220+ # Handle specific patterns in Designer.cs files (ResourceManager strings)
221+ $content = $content -replace ' "CanBeYours\.([^"]*)"' , " `" $solutionName .`$ 1`" "
222+
223+ # Handle InternalsVisibleTo attributes in AssemblyInfo.cs
224+ $content = $content -replace ' InternalsVisibleTo\("CanBeYours\.([^"]*)"\)' , " InternalsVisibleTo(`" $solutionName .`$ 1`" )"
225+
226+ Set-Content $_.FullName $content
227+ }
228+
229+ # Update .nuke configuration files and other JSON files
230+ Write-Host " `n Updating configuration files..." - ForegroundColor Blue
231+ Get-ChildItem - Recurse - Include " *.nuke" , " parameters.json" | ForEach-Object {
232+ $content = Get-Content $_.FullName
233+ $content = $content -replace ' "Solution":\s*"CanBeYours\.sln"' , " `" Solution`" : `" $solutionName .sln`" "
219234 Set-Content $_.FullName $content
220235 }
236+
237+ # Update generated files (test results, logs, etc.)
238+ Write-Host " `n Updating generated files..." - ForegroundColor Blue
239+ Get-ChildItem - Recurse - Include " *.trx" , " *.log" , " *.cache" , " *.deps.json" , " *.runtimeconfig.json" , " *.staticwebassets.*.json" , " *.resources.dll" , " *.pdb" , " *.dll" , " *.exe" | Where-Object { $_.FullName -like " *CanBeYours*" } | ForEach-Object {
240+ $content = Get-Content $_.FullName - Raw - ErrorAction SilentlyContinue
241+ if ($content ) {
242+ $content = $content -replace " CanBeYours\." , " $solutionName ."
243+ Set-Content $_.FullName $content - NoNewline
244+ }
245+ }
221246}
222247finally {
223248 # Return to original directory
0 commit comments