Skip to content

Commit 43dd149

Browse files
authored
Merge pull request Azure#3100 from shahabhijeet/dev
Minor fixes to module and documentation
2 parents da4a812 + adc3828 commit 43dd149

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
lines changed

documentation/Using-Azure-TestFramework.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Using Microsoft.Rest.ClientRuntime.Azure.TestFramework #
22

3-
1. Getting Started (Another PR that reflects these changes)
3+
1. Getting Started
44
2. Accquring TestFramework
55
3. Setup prior to Record/Playback tests
66
1. Environment Variables
@@ -13,11 +13,11 @@
1313
5. Change Test Environment settings at run-time
1414

1515

16-
## 1. Getting Started (Another PR that reflects these changes)
16+
## 1. Getting Started
1717
1. Launch .\tools\PS-VSPrompt shortcut
1818
1. This starts VS Dev command prompt in PowerShell
1919
2. Import module that helps in performing basic repository tasks
20-
1. Import-Module Repo-Tasks.psm1
20+
1. Import-Module Repo-Tasks.psd1
2121
2. Type Get-Commands -Module Repo-Tasks to see list of cmdlets
2222
3. Get-Help <CommandName> to get help on individual commands.
2323

tools/Repo-Tasks.psd1

26 Bytes
Binary file not shown.

tools/Repo-Tasks.psm1

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,11 @@ This will enable to execute Start-RepoBuild <scope>
169169

170170
Write-Host "Below are available scopes you can specify for building specific projects"
171171
Write-Host ""
172-
Get-ChildItem -path "$env:repoRoot\src\ResourceManager" -dir | Format-Wide -Column 5 | Format-Table -Property Name
173-
Get-ChildItem -path "$env:repoRoot\src\ServiceManagement" -dir | Format-Wide -Column 5 | Format-Table -Property Name
172+
Get-ChildItem -path "$env:repoRoot\src\ResourceManagement" -dir | Format-Wide -Column 5 | Format-Table -Property Name
173+
Write-Host "e.g of a scope would be 'ResourceManagement\Compute'" -ForegroundColor Yellow
174+
175+
Get-ChildItem -path "$env:repoRoot\src\" -dir -Exclude "ResourceManagement" | Format-Wide -Column 5 | Format-Table -Property Name
176+
Write-Host "e.g of a scope would be 'Authentication'" -ForegroundColor Yellow
174177
}
175178

176179
[CmdletBinding]
@@ -211,6 +214,43 @@ Runs all the check in tests
211214
msbuild.exe "$env:repoRoot\build.proj" /t:Test
212215
}
213216

217+
[cmdletBinding]
218+
Function Install-VSProjectTemplates
219+
{
220+
<#
221+
.SYNOPSIS
222+
223+
Install-VSProjectTemplates will install getting started project templates for
224+
1) Autorest-.NET SDKProject
225+
2) .NET SDK Test projectct
226+
227+
After executing the cmdlet, restart VS (if already open), create new project
228+
Search for the project template as we install the following three project templates
229+
AutoRest-AzureDotNetSDK
230+
AzureDotNetSDK-TestProject
231+
AzurePowerShell-TestProject
232+
#>
233+
if($env:VisualStudioVersion -eq "14.0")
234+
{
235+
if((Test-Path "$env:repoRoot\tools\ProjectTemplates\") -eq $true)
236+
{
237+
Write-Host "Installing VS templates for 'AutoRest as well as Test Project'"
238+
Copy-Item "$env:repoRoot\tools\ProjectTemplates\*.zip" "$env:USERPROFILE\Documents\Visual Studio 2015\Templates\ProjectTemplates\"
239+
Write-Host "Installed VS Test Project Templates for Powershell test projects"
240+
Write-Host ""
241+
Write-Host "Restart VS (if already open), search for 'AzurePowerShell-TestProject'" -ForegroundColor Yellow
242+
}
243+
else
244+
{
245+
Write-Host "Missing templates to install, make sure you have project templates available in the repo under $env:repoRoot\tools\ProjectTemplates\"
246+
}
247+
}
248+
else
249+
{
250+
Write-Host "Unsupported VS Version detected. Visual Studio 2015 is the only supported version for current set of project templates"
251+
}
252+
}
253+
214254
<#
215255
We allow users to include any helper powershell scripts they would like to include in the current session
216256
Currently we support two ways to include helper powershell scripts
@@ -242,4 +282,5 @@ else
242282
export-modulemember -Function Set-TestEnvironment
243283
export-modulemember -Function Get-BuildScopes
244284
export-modulemember -Function Start-Build
245-
export-modulemember -Function Invoke-CheckinTests
285+
export-modulemember -Function Invoke-CheckinTests
286+
export-modulemember -Function Install-VSProjectTemplates

0 commit comments

Comments
 (0)