@@ -10,15 +10,33 @@ function UpdateTestFrameworkVersion {
10
10
$filecontent = Get-Content ($FilePath )
11
11
attrib $FilePath - r
12
12
$filecontent -replace $versionRegex1 , " nanoFramework.TestFramework.$NewVersion " | Out-File $FilePath - Encoding utf8
13
+ $filecontent = Get-Content ($FilePath )
13
14
$filecontent -replace $versionRegex2 , " id="" nanoFramework.TestFramework"" version="" $NewVersion " | Out-File $FilePath - Encoding utf8
14
15
}
15
16
17
+ function AddGeneratePathProperty {
18
+ Param (
19
+ [string ] $NewVersion ,
20
+ [string ] $FilePath
21
+ )
22
+
23
+ $versionRegex1 = " Include=\"" nanoFramework\.TestFramework\"" Version=\"" \d+\.\d+\.\d+\"" >"
24
+
25
+ $filecontent = Get-Content ($FilePath )
26
+ attrib $FilePath - r
27
+ $filecontent -replace $versionRegex1 , " Include="" nanoFramework.TestFramework"" Version="" $NewVersion "" GeneratePathProperty="" true"" >" | Out-File $FilePath - Encoding utf8
28
+ }
29
+
16
30
" Updating dependency at nf-Visual-Studio-extension" | Write-Host
17
31
18
32
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
19
33
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
20
34
$auth = " basic $ ( [System.Convert ]::ToBase64String([System.Text.Encoding ]::UTF8.GetBytes(" nfbot:$env: MY_GITHUB_TOKEN " ))) )"
21
35
36
+ # uncomment these for local debug
37
+ # [Environment]::SetEnvironmentVariable('NBGV_NuGetPackageVersion', '2.0.42', 'Process')
38
+ # [Environment]::SetEnvironmentVariable('Agent_TempDirectory', 'e:\temp', 'Process')
39
+
22
40
# init/reset these
23
41
$commitMessage = " "
24
42
$prTitle = " "
@@ -50,8 +68,13 @@ dotnet nuget add source https://pkgs.dev.azure.com/nanoframework/feed/_packaging
50
68
" *****************************************************************************************************" | Write-Host
51
69
" Updating nanoFramework.Tools.MetadataProcessor.MsBuildTask.Net package in VS2019 & VS2022 solution..." | Write-Host
52
70
53
- dotnet add VisualStudio.Extension- 2019 / VisualStudio.Extension- vs2019.csproj package nanoFramework.TestFramework
54
- dotnet add VisualStudio.Extension- 2022 / VisualStudio.Extension- vs2022.csproj package nanoFramework.TestFramework
71
+ dotnet remove VisualStudio.Extension- 2019 / VisualStudio.Extension- vs2019.csproj package nanoFramework.TestFramework
72
+ dotnet add VisualStudio.Extension- 2019 / VisualStudio.Extension- vs2019.csproj package nanoFramework.TestFramework -- version $packageTargetVersion
73
+ AddGeneratePathProperty - NewVersion $packageTargetVersion - FilePath ' VisualStudio.Extension-2019/VisualStudio.Extension-vs2019.csproj'
74
+
75
+ dotnet remove VisualStudio.Extension- 2022 / VisualStudio.Extension- vs2022.csproj package nanoFramework.TestFramework
76
+ dotnet add VisualStudio.Extension- 2022 / VisualStudio.Extension- vs2022.csproj package nanoFramework.TestFramework -- version $packageTargetVersion
77
+ AddGeneratePathProperty - NewVersion $packageTargetVersion - FilePath ' VisualStudio.Extension-2022/VisualStudio.Extension-vs2022.csproj'
55
78
56
79
# ####################
57
80
0 commit comments