Skip to content

Commit 996ffe3

Browse files
committed
Merge pull request #118 from Azure/dev
.
2 parents 70b9a28 + 2b231f5 commit 996ffe3

File tree

151 files changed

+456
-1345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+456
-1345
lines changed

build.proj

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@
3636
<SetupOutputDirectory>$(PublishDirectory)\Setup</SetupOutputDirectory>
3737
<TestOutputDirectory>$(PublishDirectory)\TestResults</TestOutputDirectory>
3838
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
39-
<NuGetPublishingSource Condition=" '$(NuGetPublishingSource)' != '' ">http://psget/PSGallery/api/v2/</NuGetPublishingSource>
39+
<NuGetPublishingSource Condition=" '$(NuGetPublishingSource)' == '' ">http://psget/PSGallery/api/v2/</NuGetPublishingSource>
4040
</PropertyGroup>
4141
<ItemGroup>
42-
<CmdletSolutionsToBuild Include=".\src\ResourceManager.sln;.\src\ServiceManagement.sln" Condition=" '$(Scope)' == '' "/>
43-
<CmdletSolutionsToBuild Include=".\src\$(Scope).sln" Condition=" '$(Scope)' != '' "/>
42+
<CmdletSolutionsToBuild Include=".\src\ResourceManager\**\*.sln;.\src\ServiceManagement\ServiceManagement.sln" Condition=" '$(Scope)' == '' "/>
43+
<CmdletSolutionsToBuild Include=".\src\ResourceManager\$(Scope)\*.sln" Condition=" '$(Scope)' != '' and '$(Scope)' != 'ServiceManagement' "/>
44+
<CmdletSolutionsToBuild Include=".\src\ServiceManagement\ServiceManagement.sln" Condition=" '$(Scope)' != '' and '$(Scope)' == 'ServiceManagement' "/>
4445
<SetupSln Include=".\setup\azurepowershell.sln" />
4546
<SetupPowershellGetSln Include=".\setup-powershellget\powershellget.sln" />
4647
</ItemGroup>
@@ -104,7 +105,7 @@
104105
</Target>
105106

106107
<PropertyGroup>
107-
<NuGetCommand>$(MSBuildProjectDirectory)\src\.nuget\NuGet.exe</NuGetCommand>
108+
<NuGetCommand>$(MSBuildProjectDirectory)\tools\NuGet.exe</NuGetCommand>
108109
<NuGetRestoreConfigFile>$(MSBuildProjectDirectory)\restore.config</NuGetRestoreConfigFile>
109110
<NuGetRestoreConfigSwitch>-ConfigFile &quot;$(NuGetRestoreConfigFile)&quot;</NuGetRestoreConfigSwitch>
110111
<PowerShellCommand>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellCommand>
@@ -131,13 +132,9 @@
131132
<Exec Command="$(NuGetCommand) sources add -Name LocalFeed -Source &quot;$(MSBuildProjectDirectory)\tools\LocalFeed&quot; $(NuGetRestoreConfigSwitch)"/>
132133

133134
<!-- Restore packages -->
134-
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\src\ResourceManager.sln $(NuGetRestoreConfigSwitch)" ContinueOnError="false"
135-
Condition="$(Scope) == ''" />
136-
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\src\ServiceManagement.sln $(NuGetRestoreConfigSwitch)" ContinueOnError="false"
137-
Condition="$(Scope) == ''" />
138-
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\src\$(Scope).sln $(NuGetRestoreConfigSwitch)" ContinueOnError="false"
139-
Condition="$(Scope) != ''" />
140-
135+
<Exec Command="$(NuGetCommand) restore %(CmdletSolutionsToBuild.FullPath) $(NuGetRestoreConfigSwitch)"
136+
ContinueOnError="false" />
137+
141138
<!--Restore the xunit runner needed to run unit tests-->
142139
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\packages.config -PackagesDirectory $(MSBuildProjectDirectory)\packages" />
143140

@@ -200,6 +197,10 @@
200197
<!-- Copying shortcut to be signed -->
201198
<Copy SourceFiles="$(LibraryRoot)setup-powershellget\Setup\ShortcutStartup.ps1"
202199
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />
200+
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psd1"
201+
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />
202+
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psm1"
203+
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />
203204

204205
<ItemGroup>
205206
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\Microsoft*Azure*Commands*.dll" />
@@ -251,6 +252,10 @@
251252
<!-- Copying signed shortcut back -->
252253
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\ShortcutStartup.ps1"
253254
DestinationFolder="$(LibraryRoot)setup-powershellget\Setup" />
255+
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.psd1"
256+
DestinationFolder="$(LibraryRoot)tools\AzureRM" />
257+
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.psm1"
258+
DestinationFolder="$(LibraryRoot)tools\AzureRM" />
254259
</Target>
255260

256261
<Target Name="CodeSignInstaller">
@@ -288,7 +293,7 @@
288293
<Error Condition=" '$(NuGetKey)' == '' " Text="You must provide the NuGetKey parameter to the build: /p:NuGetKey=YOUR_PUBLISHING_KEY" />
289294
<Message Importance="high" Text="Publishing Cmdlets..." />
290295

291-
<Exec Command="$(PowerShellCommand) -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\PublishModules.ps1 $(Configuration) $(NuGetKey) \&quot;$(NuGetPublishingSource)\&quot;&quot;"/>
296+
<Exec Command="$(PowerShellCommand) -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\PublishModules.ps1 $(Configuration) $(Scope) $(NuGetKey) \&quot;$(NuGetPublishingSource)\&quot; &quot;"/>
292297
</Target>
293298

294299
<PropertyGroup>

setup-powershellget/Setup/ShortcutStartup.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Finalizing installation of Azure PowerShell.
2626
Installing Azure Modules from PowerShell Gallery.
2727
This may take some time...
2828
"@
29-
$env:PSModulePath = "$env:HOME\Documents\WindowsPowerShell\Modules;$env:ProgramFiles\WindowsPowerShell\Modules;$env:SystemRoot\system32\WindowsPowerShell\v1.0\Modules\"
29+
$env:PSModulePath = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules;$env:ProgramFiles\WindowsPowerShell\Modules;$env:SystemRoot\system32\WindowsPowerShell\v1.0\Modules\"
3030

3131
Import-Module PackageManagement
3232

@@ -51,7 +51,10 @@ To use Azure Service Management cmdlets please execute the following cmdlet:
5151
$VerbosePreference = "Continue"
5252
}
5353
}
54-
catch { Write-Output $error }
55-
if ($error) {
56-
Read-Host -Prompt "An error occured during installation. Press any key..."
54+
catch
55+
{
56+
Write-Output "An error occured during installation."
57+
Write-Output $error
58+
Write-Output "Press any key..."
59+
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
5760
}

setup-powershellget/azurecmd.wxs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3-
3+
44
<?define productName="Microsoft Azure PowerShell - October 2015" ?>
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
@@ -28,8 +28,6 @@
2828
<Property Id="ALLUSERS" Value="1" />
2929
<!-- per machine install-->
3030

31-
<Property Id="POWERSHELLEXE"><![CDATA[C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe]]></Property>
32-
3331
<Property Id="PSCOMPATIBLEVERSION">
3432
<RegistrySearch Id="PSCOMPATIBLEVERSION" Root="HKLM" Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine" Name="PSCompatibleVersion" Type="raw" />
3533
</Property>
@@ -60,19 +58,16 @@
6058
</Directory>
6159

6260
<Property Id="POWERSHELLPATH">
63-
<RegistrySearch Id="POWERSHELLPATH"
61+
<RegistrySearch Id="POWERSHELLPATH"
6462
Type="raw"
6563
Root="HKLM"
6664
Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine"
6765
Name="ApplicationBase" />
6866
</Property>
6967

68+
<SetProperty Id="POWERSHELLEXE" Value="[WindowsFolder]System32\WindowsPowerShell\v1.0\powershell.exe" Before="AppSearch"/>
69+
7070
<DirectoryRef Id="PowerShellFolder">
71-
<Component Id="PSModulePath.System" Guid="273525B9-7AAB-421A-90C8-8E50A1840B8D">
72-
<CreateFolder />
73-
<!-- Work around bug that PowerShell does not always consider default module paths. -->
74-
<Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="[PowerShellFolder]ServiceManagement" System="yes" />
75-
</Component>
7671
<Component Id="AzureSdkShortcutScript" Guid="3d0d589a-b34c-4c48-9a4c-df78f286c6a3">
7772
<File Id="AzureSdkShortcutScriptFile" KeyPath="yes" Source="$(var.SolutionDir)\Setup\ShortcutStartup.ps1" />
7873
</Component>
@@ -83,7 +78,7 @@
8378
<Shortcut Id="AzureSdkStartMenuShortcut"
8479
Name="Microsoft Azure PowerShell"
8580
Description="Microsoft PowerShell cmdlets"
86-
Target="[POWERSHELLPATH]\powershell.exe"
81+
Target="[POWERSHELLEXE]"
8782
Arguments="-NoExit -ExecutionPolicy Bypass -File &quot;[PowerShellFolder]\ShortcutStartup.ps1&quot;"/>
8883
<RemoveFolder Id="AzureSdkMenu" On="uninstall"/>
8984
<RemoveFile Id="RemoveStaleFiles" Directory="StaleAzureSdkMenu" Name="Windows Azure PowerShell.lnk" On="both"/>
@@ -92,15 +87,14 @@
9287
</DirectoryRef>
9388

9489
<Feature Id="azurecmd" Title="Microsoft Azure PowerShell" Level="1" Description="Windows PowerShell commandlets">
95-
<ComponentRef Id="PSModulePath.System" />
9690
<ComponentRef Id="AzureSdkShortcut" />
9791
<ComponentRef Id="AzureSdkShortcutScript" />
9892
</Feature>
9993

10094
<Binary Id="CustomActions" SourceFile="$(var.caSourceDir)\Microsoft.WindowsAzure.Setup.CA.dll"/>
101-
<CustomAction Id="UpdatePSShortcut" BinaryKey="CustomActions" DllEntry="UpdatePSShortcut" Execute ="deferred" Impersonate="no"/>
10295
<CustomAction Id="SetCustomActionDataValue" Return="check" Property="UpdatePSShortcut"
10396
Value="ShortcutPath=[AzureSdkMenu]Microsoft Azure PowerShell.lnk;DefaultShortcutPath=[ProgramMenuFolder]System Tools\Windows PowerShell.lnk" />
97+
<CustomAction Id="UpdatePSShortcut" BinaryKey="CustomActions" DllEntry="UpdatePSShortcut" Execute ="deferred" Impersonate="no"/>
10498
<CustomAction Id="SetExecutionPolicy" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command &quot;Set-ExecutionPolicy RemoteSigned -Force&quot;" Execute="deferred" Impersonate="no" Return="check"/>
10599
<CustomAction Id="RunModuleInstallScript" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command &quot;. \&quot;[PowerShellFolder]\ShortcutStartup.ps1\&quot; -Install&quot;" Execute="deferred" Impersonate="no" Return="check"/>
106100

src/.nuget/NuGet.Config

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/.nuget/NuGet.targets

Lines changed: 0 additions & 153 deletions
This file was deleted.

src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<TargetFrameworkProfile />
15-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
1615
<RestorePackages>true</RestorePackages>
1716
<CodeAnalysisAdditionalOptions>/assemblyCompareMode:StrongNameIgnoringVersion</CodeAnalysisAdditionalOptions>
1817
</PropertyGroup>
@@ -182,6 +181,5 @@
182181
<None Include="packages.config" />
183182
</ItemGroup>
184183
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
185-
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
186184
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
187185
</Project>

src/Common/Commands.Common/Commands.Common.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<TargetFrameworkProfile />
15-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
1615
<RestorePackages>true</RestorePackages>
1716
<CodeAnalysisAdditionalOptions>/assemblyCompareMode:StrongNameIgnoringVersion</CodeAnalysisAdditionalOptions>
1817
<NuGetPackageImportStamp>06e19c11</NuGetPackageImportStamp>
@@ -182,6 +181,5 @@
182181
</ItemGroup>
183182
<ItemGroup />
184183
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
185-
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
186184
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
187185
</Project>

0 commit comments

Comments
 (0)