Skip to content

Commit 6b09352

Browse files
authored
Merge branch 'master' into remove-mssharedlibkey
2 parents fdb4bca + 79a4c8f commit 6b09352

File tree

11 files changed

+451
-12
lines changed

11 files changed

+451
-12
lines changed

build.proj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
<Copy SourceFiles="$(PackageDirectory)\$(Configuration)\Az.psm1" DestinationFolder="$(LibraryRoot)tools\Az" Condition="'$(Scope)' == 'Netcore'" />
385385
</Target>
386386

387-
<Target Name="BuildInstaller" Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Latest'">
387+
<Target Name="BuildInstaller" Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Latest' or '$(Scope)' == 'Netcore'">
388388
<Exec Command="$(PowerShellCommandPrefix) &quot;. Register-PSRepository -Name MSIcreationrepository -SourceLocation $(PackageDirectory) -InstallationPolicy Trusted &quot; " />
389389
<Exec Command="$(PowerShellCommandPrefix) &quot;. $(LibraryRoot)\setup\generate.ps1 -repository MSIcreationrepository &quot; " />
390390
<Exec Command="$(PowerShellCommandPrefix) &quot;. Unregister-PSRepository -Name MSIcreationrepository &quot; " />
@@ -477,7 +477,7 @@
477477
Condition="'$(Scope)' != 'Stack'"
478478
ContinueOnError="false" />
479479

480-
<CallTarget Targets="BuildInstaller" Condition="'$(Scope)' =='All'" />
480+
<CallTarget Targets="BuildInstaller" Condition="'$(Scope)' =='All' or '$(Scope)' == 'Netcore'" />
481481
</Target>
482482

483483
<Target Name="Test">

setup/InstallerChecks.CA.dll

264 KB
Binary file not shown.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27703.2042
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InstallerChecks", "InstallerChecks\InstallerChecks.csproj", "{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Debug|x64 = Debug|x64
12+
Debug|x86 = Debug|x86
13+
Release|Any CPU = Release|Any CPU
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}.Debug|Any CPU.ActiveCfg = Debug|x64
19+
{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}.Debug|x64.ActiveCfg = Debug|x64
20+
{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}.Debug|x64.Build.0 = Debug|x64
21+
{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}.Debug|x86.ActiveCfg = Debug|x64
22+
{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}.Release|Any CPU.ActiveCfg = Release|x64
23+
{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}.Release|x64.ActiveCfg = Release|x64
24+
{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}.Release|x64.Build.0 = Release|x64
25+
{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}.Release|x86.ActiveCfg = Release|x64
26+
EndGlobalSection
27+
GlobalSection(SolutionProperties) = preSolution
28+
HideSolutionNode = FALSE
29+
EndGlobalSection
30+
GlobalSection(ExtensibilityGlobals) = postSolution
31+
SolutionGuid = {89994462-D746-4F79-8205-4407E6549E10}
32+
EndGlobalSection
33+
EndGlobal
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup useLegacyV2RuntimeActivationPolicy="true">
4+
5+
<!--
6+
Use supportedRuntime tags to explicitly specify the version(s) of the .NET Framework runtime that
7+
the custom action should run on. If no versions are specified, the chosen version of the runtime
8+
will be the "best" match to what Microsoft.Deployment.WindowsInstaller.dll was built against.
9+
10+
WARNING: leaving the version unspecified is dangerous as it introduces a risk of compatibility
11+
problems with future versions of the .NET Framework runtime. It is highly recommended that you specify
12+
only the version(s) of the .NET Framework runtime that you have tested against.
13+
14+
Note for .NET Framework v3.0 and v3.5, the runtime version is still v2.0.
15+
16+
In order to enable .NET Framework version 2.0 runtime activation policy, which is to load all assemblies
17+
by using the latest supported runtime, @useLegacyV2RuntimeActivationPolicy="true".
18+
19+
For more information, see http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx
20+
-->
21+
22+
<supportedRuntime version="v4.0" />
23+
<supportedRuntime version="v2.0.50727"/>
24+
25+
</startup>
26+
27+
<!--
28+
Add additional configuration settings here. For more information on application config files,
29+
see http://msdn.microsoft.com/en-us/library/kza1yk3a.aspx
30+
-->
31+
32+
</configuration>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using Microsoft.Deployment.WindowsInstaller;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.IO;
5+
using System.Linq;
6+
7+
namespace InstallerChecks
8+
{
9+
public class InstallerChecks
10+
{
11+
[CustomAction]
12+
public static ActionResult CheckForAzureRm(Session session)
13+
{
14+
List<string> AzureModules = new List<string> { "Azure.AnalysisServices", "Azure.Storage", "AzureRM", "AzureRM.AnalysisServices",
15+
"AzureRM.ApiManagement", "AzureRM.ApplicationInsights", "AzureRM.Automation", "AzureRM.Backup", "AzureRM.Batch", "AzureRM.Billing",
16+
"AzureRM.Cdn", "AzureRM.CognitiveServices", "AzureRM.Compute", "AzureRM.Compute.Experiments", "AzureRM.Consumption",
17+
"AzureRM.ContainerInstance", "AzureRM.ContainerRegistry", "AzureRM.DataFactories", "AzureRM.DataFactoryV2", "AzureRM.DataLakeAnalytics",
18+
"AzureRM.DataLakeStore", "AzureRM.DataMigration", "AzureRM.DevTestLabs", "AzureRM.Dns", "AzureRM.EventGrid", "AzureRM.EventHub",
19+
"AzureRM.HDInsight", "AzureRM.Insights", "AzureRM.IotHub", "AzureRM.KeyVault", "AzureRM.LogicApp", "AzureRM.MachineLearning",
20+
"AzureRM.MachineLearningCompute", "AzureRM.ManagementPartner", "AzureRM.Maps", "AzureRM.MarketplaceOrdering", "AzureRM.Media",
21+
"AzureRM.Network", "AzureRM.NotificationHubs", "AzureRM.OperationalInsights", "AzureRM.PolicyInsights", "AzureRM.PowerBIEmbedded",
22+
"AzureRM.profile", "AzureRM.RecoveryServices", "AzureRM.RecoveryServices.Backup", "AzureRM.RecoveryServices.SiteRecovery",
23+
"AzureRM.RedisCache", "AzureRM.Relay", "AzureRM.Reservations", "AzureRM.Resources", "AzureRM.Scheduler", "AzureRM.ServerManagement",
24+
"AzureRM.ServiceBus", "AzureRM.ServiceFabric", "AzureRM.SignalR", "AzureRM.SiteRecovery", "AzureRM.Sql", "AzureRM.Storage",
25+
"AzureRM.StreamAnalytics", "AzureRM.Subscription.Preview", "AzureRM.Tags", "AzureRM.TrafficManager", "AzureRM.UsageAggregates",
26+
"AzureRM.Websites", "AzureRM.Websites.Experiments"};
27+
28+
session.Log("Begin CustomAction");
29+
var paths = Environment.GetEnvironmentVariable("PSModulePath").Split(';');
30+
foreach (var path in paths)
31+
{
32+
if (Directory.Exists(path))
33+
{
34+
var modules = Directory.GetDirectories(path);
35+
foreach (var module in modules)
36+
{
37+
var moduleName = module.Split(Path.DirectorySeparatorChar).LastOrDefault();
38+
if (AzureModules.Any(x => string.Equals(x, moduleName, StringComparison.OrdinalIgnoreCase)))
39+
{
40+
Record record = new Record(2);
41+
record.FormatString = Properties.Resources.AzureRmDetected;
42+
session.Message(InstallMessage.Error, record);
43+
return ActionResult.Failure;
44+
}
45+
}
46+
}
47+
}
48+
return ActionResult.Success;
49+
}
50+
}
51+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{7EF9DF25-4A64-465E-B64C-76E0D6D94A93}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>InstallerChecks</RootNamespace>
12+
<AssemblyName>InstallerChecks</AssemblyName>
13+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<TargetFrameworkProfile />
16+
</PropertyGroup>
17+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
18+
<DebugSymbols>true</DebugSymbols>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<DebugType>full</DebugType>
22+
<PlatformTarget>x64</PlatformTarget>
23+
<ErrorReport>prompt</ErrorReport>
24+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
25+
</PropertyGroup>
26+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<Optimize>true</Optimize>
30+
<DebugType>pdbonly</DebugType>
31+
<PlatformTarget>x64</PlatformTarget>
32+
<ErrorReport>prompt</ErrorReport>
33+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="System" />
37+
<Reference Include="System.Core" />
38+
<Reference Include="System.Xml.Linq" />
39+
<Reference Include="Microsoft.CSharp" />
40+
<Reference Include="System.Xml" />
41+
<Reference Include="Microsoft.Deployment.WindowsInstaller">
42+
<Private>True</Private>
43+
</Reference>
44+
</ItemGroup>
45+
<ItemGroup>
46+
<Compile Include="InstallerChecks.cs" />
47+
<Compile Include="Properties\AssemblyInfo.cs" />
48+
<Compile Include="Properties\Resources.Designer.cs">
49+
<AutoGen>True</AutoGen>
50+
<DesignTime>True</DesignTime>
51+
<DependentUpon>Resources.resx</DependentUpon>
52+
</Compile>
53+
<Content Include="InstallerChecks.config" />
54+
</ItemGroup>
55+
<ItemGroup>
56+
<EmbeddedResource Include="Properties\Resources.resx">
57+
<Generator>ResXFileCodeGenerator</Generator>
58+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
59+
</EmbeddedResource>
60+
</ItemGroup>
61+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
62+
<Import Project="$(WixCATargetsPath)" Condition=" '$(WixCATargetsPath)' != '' " />
63+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.CA.targets" Condition=" '$(WixCATargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.CA.targets') " />
64+
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixCATargetsImported)' != 'true' ">
65+
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
66+
</Target>
67+
</Project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("InstallerChecks")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyCompany("")]
11+
[assembly: AssemblyProduct("InstallerChecks")]
12+
[assembly: AssemblyCopyright("Copyright © 2018")]
13+
[assembly: AssemblyTrademark("")]
14+
[assembly: AssemblyCulture("")]
15+
16+
// Setting ComVisible to false makes the types in this assembly not visible
17+
// to COM components. If you need to access a type in this assembly from
18+
// COM, set the ComVisible attribute to true on that type.
19+
[assembly: ComVisible(false)]
20+
21+
// The following GUID is for the ID of the typelib if this project is exposed to COM
22+
[assembly: Guid("f2ac8c5c-97a7-4b8e-97bd-ed30ac1135e5")]
23+
24+
// Version information for an assembly consists of the following four values:
25+
//
26+
// Major Version
27+
// Minor Version
28+
// Build Number
29+
// Revision
30+
//
31+
// You can specify all the values or you can default the Build and Revision Numbers
32+
// by using the '*' as shown below:
33+
// [assembly: AssemblyVersion("1.0.*")]
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

setup/InstallerChecks/InstallerChecks/Properties/Resources.Designer.cs

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)