Skip to content

Commit 9076f75

Browse files
committed
Add powershell script to set WebApplicationsTargetPath to allow running command line tools
1 parent d7d8e15 commit 9076f75

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

C3D.Extensions.Aspire.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{E1FFCD98
2020
build\nuget.publish.config = build\nuget.publish.config
2121
README.md = README.md
2222
build\RemoveCert.ps1 = build\RemoveCert.ps1
23+
Set-WebApplicationTargetsPath.ps1 = Set-WebApplicationTargetsPath.ps1
2324
build\Test.snk = build\Test.snk
2425
EndProjectSection
2526
EndProject

Set-WebApplicationTargetsPath.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$vs_path = vswhere -latest -property installationPath
2+
$vs_version = [System.Version]::Parse($(vswhere -latest -property installationVersion))
3+
$vs_tools_path = "$vs_path\MSBuild\Microsoft\VisualStudio\v$($vs_version.Major).0"
4+
$web_applications_target_path = "$vs_tools_path\WebApplications\Microsoft.WebApplication.targets"
5+
$env:WebApplicationsTargetPath=$web_applications_target_path

0 commit comments

Comments
 (0)