Skip to content

Commit 41da7a7

Browse files
committed
Remove ResourceManagerStartup, since cmdlet is not being exported
1 parent e7ca222 commit 41da7a7

File tree

3 files changed

+1
-188
lines changed

3 files changed

+1
-188
lines changed

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceGroups/GetAzureResourceGroupCmdlet.cs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2828
/// Filters resource groups.
2929
/// </summary>
3030
[Cmdlet(VerbsCommon.Get, "AzureRmResourceGroup", DefaultParameterSetName = ResourceGroupNameParameterSet), OutputType(typeof(List<PSResourceGroup>))]
31-
public class GetAzureResourceGroupCmdlet : ResourceManagerCmdletBase, IModuleAssemblyInitializer
31+
public class GetAzureResourceGroupCmdlet : ResourceManagerCmdletBase
3232
{
3333
/// <summary>
3434
/// List resources group by name parameter set.
@@ -63,26 +63,5 @@ public override void ExecuteCmdlet()
6363
true);
6464
}
6565

66-
/// <summary>
67-
/// Load global aliases and script cmdlets for ARM
68-
/// </summary>
69-
70-
public void OnImport()
71-
{
72-
try
73-
{
74-
System.Management.Automation.PowerShell invoker = null;
75-
invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
76-
invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
77-
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
78-
"ResourceManagerStartup.ps1")));
79-
invoker.Invoke();
80-
}
81-
catch(Exception) when(TestMockSupport.RunningMocked)
82-
{
83-
// need to fix exception in WriteDebug
84-
// this.WriteDebug("Exception on importing ResourceManagerStartup.ps1: " + e.Message);
85-
}
86-
}
8766
}
8867
}

src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@
171171
<Link>AzureRM.Resources.psd1</Link>
172172
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
173173
</None>
174-
<None Include="ResourceManagerStartup.ps1">
175-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
176-
</None>
177174
<None Include="MSSharedLibKey.snk" />
178175
<None Include="packages.config" />
179176
</ItemGroup>

src/ResourceManager/Resources/Commands.Resources/ResourceManagerStartup.ps1

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

0 commit comments

Comments
 (0)