1+ param (
2+ [string ]$oldKendoVersion = " 2025.3.825" ,
3+ [string ]$newKendoVersion = " 2025.4.1111" ,
4+
5+ [string ]$oldThemesVersion = " 12.0.0" ,
6+ [string ]$newThemesVersion = " 12.0.1" ,
7+
8+
9+ [string ]$oldWebCaptchaVersion = " 2.0.3" ,
10+ [string ]$newWebCaptchaVersion = " 2.0.4" ,
11+
12+ [string ]$oldCommonWebVersions = " 2025.3.812" ,
13+ [string ]$newCommonWebVersions = " 2025.3.813"
14+ )
15+
16+ function Replace_Reference {
17+ param (
18+ [string ]$path ,
19+ [string ]$oldReference ,
20+ [string ]$newReference
21+ )
22+
23+ (Get-Content - Path $path ) |
24+ ForEach-Object {$_ -Replace $oldReference , $newReference } |
25+ Set-Content - Path $path
26+ }
27+
28+ function Update_LayoutVersions {
29+ param (
30+ [string []]$layoutPathsToUpdate
31+ )
32+
33+
34+ foreach ($layoutPath in $layoutPathsToUpdate ) {
35+ Replace_Reference - path $layoutPath - oldReference $oldKendoVersion - newReference $newKendoVersion
36+ Replace_Reference - path $layoutPath - oldReference $oldThemesVersion - newReference $newThemesVersion
37+ }
38+
39+ }
40+
41+ function Update_ProjectVersions {
42+ param (
43+ [string []]$csprojPathsToUpdate
44+ )
45+
46+ foreach ($csprojPath in $csprojPathsToUpdate ) {
47+ Replace_Reference - path $csprojPath - oldReference $oldKendoVersion - newReference $newKendoVersion
48+ Replace_Reference - path $csprojPath - oldReference " Include="" Telerik.Web.Captcha"" Version="" $oldWebCaptchaVersion "" " - newReference " Include="" Telerik.Web.Captcha"" Version="" $newWebCaptchaVersion "" "
49+ Replace_Reference - path $csprojPath - oldReference " Include="" Telerik.Web.PDF"" Version="" $oldCommonWebVersions "" " - newReference " Include="" Telerik.Web.PDF"" Version="" $newWebPDFVersion "" "
50+ Replace_Reference - path $csprojPath - oldReference " Include="" Telerik.Web.Spreadsheet"" Version="" $oldCommonWebVersions "" " - newReference " Include="" Telerik.Web.Spreadsheet"" Version="" $newCommonWebVersions "" "
51+ Replace_Reference - path $csprojPath - oldReference " Include="" Telerik.Core.Export"" Version="" $oldCommonWebVersions "" " - newReference " Include="" Telerik.Core.Export"" Version="" $newCommonWebVersions "" "
52+ }
53+ }
54+
55+ $layoutPathsToUpdate = @ (
56+ ' Telerik.Examples.ContentSecurityPolicy\Views\Shared\_Layout.cshtml' ,
57+ ' Telerik.Examples.Mvc\Telerik.Examples.Mvc\Views\Shared\_Layout.cshtml' ,
58+ ' Telerik.Examples.RazorPages\Telerik.Examples.RazorPages\Pages\Shared\_Layout.cshtml'
59+ )
60+
61+ $csprojPathsToUpdate = @ (
62+ ' Telerik.Examples.ContentSecurityPolicy\Telerik.Examples.ContentSecurityPolicy.csproj' ,
63+ ' Telerik.Examples.RazorPages\Telerik.Examples.RazorPages\Telerik.Examples.RazorPages.csproj' ,
64+ ' Telerik.Examples.Mvc\Telerik.Examples.Mvc\Telerik.Examples.Mvc.csproj'
65+ )
66+
67+ Update_LayoutVersions - layoutPathsToUpdate $layoutPathsToUpdate
68+ Update_ProjectVersions - csprojPathsToUpdate $csprojPathsToUpdate
0 commit comments