Skip to content

Commit 29f16f6

Browse files
committed
Replace setting MDP path with copy over
- Required because VS tries to load MDP from the directory and then all the other DLLs are missing. - Should be reviewed upstream in order to pack all the directory.
1 parent b759f76 commit 29f16f6

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

azure-pipelines-templates/check-mdp-for-build.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,26 @@ steps:
6868
eq(variables['DownloadMDP'], true),
6969
ne(variables['MDP_BUILDID'], '')
7070
)
71-
displayName: Set MDP path
71+
displayName: Copy MDP to build tool
7272
inputs:
7373
targetType: 'inline'
7474
script: |
75-
Write-Host "##vso[task.setvariable variable=NF_MDP_MSBUILDTASK_PATH]$(Pipeline.Workspace)\mdp"
75+
# Find which VS version is installed
76+
$VsWherePath = "${env:PROGRAMFILES(X86)}\Microsoft Visual Studio\Installer\vswhere.exe"
77+
78+
Write-Output "VsWherePath is: $VsWherePath"
79+
80+
$VsInstance = $(&$VSWherePath -latest -property displayName)
81+
82+
Write-Output "Latest VS is: $VsInstance"
83+
84+
# copy MDP file to msbuild location
85+
$VsPath = $(&$VsWherePath -latest -property installationPath)
86+
87+
Write-Debug "Copy MDP DLL to msbuild location"
88+
89+
$msbuildPath = $VsPath + "\MSBuild"
90+
91+
$extensionPath = $msbuildPath + "\nanoFramework\v1.0"
92+
93+
Copy-Item -Path "$env:Pipeline_Workspace\mdp" -Destination $msbuildPath -Recurse

azure-pipelines.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
# get commit details, if this is a PR
9191
if($env:System_PullRequest_PullRequestId -ne $null)
9292
{
93-
Write-Host "##[command] **This is a PR build**"
93+
Write-Host "**This is a PR build**"
9494
9595
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
9696
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
@@ -100,7 +100,7 @@ jobs:
100100
101101
if( ($commit.commit.author.name -eq "nfbot") -and ($commit.commit.message -like "*[version update]*") )
102102
{
103-
Write-Host "##[command] **version update commit, skipping build**"
103+
Write-Host "**version update commit, skipping build**"
104104
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true"
105105
}
106106
else
@@ -109,12 +109,12 @@ jobs:
109109
}
110110
111111
# find PR
112-
"Getting PR#$env:System_PullRequest_PullRequestNumber details..." | Write-Host -ForegroundColor White -NoNewline
112+
"Getting PR #$env:System_PullRequest_PullRequestNumber details..." | Write-Host -ForegroundColor White -NoNewline
113113
$pr = Invoke-WebRequest "https://api.github.com/repos/$env:Build_Repository_Name/pulls/$env:System_PullRequest_PullRequestNumber" | ConvertFrom-Json
114114
115115
if($($pr.number) -eq "$env:System_PullRequest_PullRequestNumber")
116116
{
117-
'##[command] OK' | Write-Host -ForegroundColor Green
117+
'OK' | Write-Host -ForegroundColor Green
118118
}
119119
120120
# grab PR commit message
@@ -1288,7 +1288,6 @@ jobs:
12881288
persistCredentials: true
12891289

12901290
- template: azure-pipelines-templates/check-mscorlib-to-test.yml
1291-
- template: azure-pipelines-templates/check-mdp-for-build.yml
12921291

12931292
# Download nanoclr from build artifacts
12941293
- task: DownloadBuildArtifacts@1
@@ -1305,6 +1304,8 @@ jobs:
13051304
inputs:
13061305
GitHubToken: $(GitHubToken)
13071306

1307+
- template: azure-pipelines-templates/check-mdp-for-build.yml
1308+
13081309
- template: azure-pipelines-templates/install-nuget.yml@templates
13091310

13101311
- task: Cache@2

0 commit comments

Comments
 (0)