Skip to content

Commit

Permalink
Merge pull request #81 from microsoft/users/menakakollu/SAP-Setup-Ass…
Browse files Browse the repository at this point in the history
…istant

Added SAP Setup Assistant template
  • Loading branch information
menakakmsft authored Sep 10, 2024
2 parents 01f780d + 42afb51 commit 18b21ba
Show file tree
Hide file tree
Showing 485 changed files with 316,815 additions and 1 deletion.
23 changes: 23 additions & 0 deletions AppSourcePackages/mpa_SAPSetupAssistant/TermsOfUse.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
16 changes: 16 additions & 0 deletions AppSourcePackages/mpa_SAPSetupAssistant/[Content_Types].xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
<Default Extension="xml" ContentType="application/octet-stream" />
<Default Extension="xaml" ContentType="application/octet-stream" />
<Default Extension="dll" ContentType="application/octet-stream" />
<Default Extension="zip" ContentType="application/octet-stream" />
<Default Extension="jpg" ContentType="application/octet-stream" />
<Default Extension="gif" ContentType="application/octet-stream" />
<Default Extension="png" ContentType="application/octet-stream" />
<Default Extension="htm" ContentType="application/octet-stream" />
<Default Extension="html" ContentType="application/octet-stream" />
<Default Extension="db" ContentType="application/octet-stream" />
<Default Extension="css" ContentType="application/octet-stream" />
<Default Extension="json" ContentType="application/octet-stream" />
<Default Extension="msapp" ContentType="application/octet-stream" />
</Types>
18 changes: 18 additions & 0 deletions AppSourcePackages/mpa_SAPSetupAssistant/input.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<PvsPackageData>
<ProviderName>Microsoft</ProviderName>
<PackageFile>package.zip</PackageFile>
<SolutionAnchorName>mpa_SAPSetupAssistant_managed.zip</SolutionAnchorName>
<StartDate>01/01/2019</StartDate>
<EndDate>01/01/2050</EndDate>
<SupportedCountries>US,CA</SupportedCountries>
<LearnMoreLink>https://aka.ms/LearnSAPSetupAssistantTemplate</LearnMoreLink>
<Locales>
<PackageLocale Code="1033" IsDefault="true">
<Logo>logo32x32.png</Logo>
<Terms>
<PackageTerm File="TermsOfUse.html" />
</Terms>
</PackageLocale>
</Locales>
</PvsPackageData>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
95 changes: 95 additions & 0 deletions DeploymentPackages/mpa_SAPSetupAssistant/PackageImportExtension.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
using System;
using System.ComponentModel.Composition;
using Microsoft.Xrm.Tooling.PackageDeployment.CrmPackageExtentionBase;

namespace mpa_SAPSetupAssistant
{
/// <summary>
/// Import package starter frame.
/// </summary>
[Export(typeof(IImportExtensions))]
public class PackageImportExtension : ImportExtension
{
#region Metadata

/// <summary>
/// Folder name where package assets are located in the final output package zip.
/// </summary>
public override string GetImportPackageDataFolderName => "PkgAssets";

/// <summary>
/// Name of the Import Package to Use
/// </summary>
/// <param name="plural">if true, return plural version</param>
public override string GetNameOfImport(bool plural) => "mpa_SAPSetupAssistant";

/// <summary>
/// Long name of the Import Package.
/// </summary>
public override string GetLongNameOfImport => "mpa_SAPSetupAssistant";

/// <summary>
/// Description of the package, used in the package selection UI
/// </summary>
public override string GetImportPackageDescriptionText => "mpa_SAPSetupAssistant";

#endregion

/// <summary>
/// Called to Initialize any functions in the Custom Extension.
/// </summary>
/// <see cref="ImportExtension.InitializeCustomExtension"/>
public override void InitializeCustomExtension()
{
}

/// <summary>
/// Called before the Main Import process begins, after solutions and data.
/// </summary>
/// <see cref="ImportExtension.BeforeImportStage"/>
/// <returns></returns>
public override bool BeforeImportStage()
{
return true;
}

/// <summary>
/// Raised before the named solution is imported to allow for any configuration settings to be made to the import process
/// </summary>
/// <see cref="ImportExtension.PreSolutionImport"/>
/// <param name="solutionName">name of the solution about to be imported</param>
/// <param name="solutionOverwriteUnmanagedCustomizations">Value of this field from the solution configuration entry</param>
/// <param name="solutionPublishWorkflowsAndActivatePlugins">Value of this field from the solution configuration entry</param>
/// <param name="overwriteUnmanagedCustomizations">If set to true, imports the Solution with Override Customizations enabled</param>
/// <param name="publishWorkflowsAndActivatePlugins">If set to true, attempts to auto publish workflows and activities as part of solution deployment</param>
public override void PreSolutionImport(string solutionName, bool solutionOverwriteUnmanagedCustomizations, bool solutionPublishWorkflowsAndActivatePlugins, out bool overwriteUnmanagedCustomizations, out bool publishWorkflowsAndActivatePlugins)
{
base.PreSolutionImport(solutionName, solutionOverwriteUnmanagedCustomizations, solutionPublishWorkflowsAndActivatePlugins, out overwriteUnmanagedCustomizations, out publishWorkflowsAndActivatePlugins);
}

/// <summary>
/// Called during a solution upgrade when both solutions, old and new, are present in the system.
/// This function can be used to provide a means to do data transformation or upgrade while a solution update is occurring.
/// </summary>
/// <see cref="ImportExtension.RunSolutionUpgradeMigrationStep"/>
/// <param name="solutionName">Name of the solution</param>
/// <param name="oldVersion">version number of the old solution</param>
/// <param name="newVersion">Version number of the new solution</param>
/// <param name="oldSolutionId">Solution ID of the old solution</param>
/// <param name="newSolutionId">Solution ID of the new solution</param>
public override void RunSolutionUpgradeMigrationStep(string solutionName, string oldVersion, string newVersion, Guid oldSolutionId, Guid newSolutionId)
{
base.RunSolutionUpgradeMigrationStep(solutionName, oldVersion, newVersion, oldSolutionId, newSolutionId);
}

/// <summary>
/// Called After all Import steps are complete, allowing for final customizations or tweaking of the instance.
/// </summary>
/// <see cref="ImportExtension.AfterPrimaryImport"/>
/// <returns></returns>
public override bool AfterPrimaryImport()
{
return true;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
More information about ImportConfig.xml file
https://docs.microsoft.com/en-us/power-platform/alm/package-deployer-tool
Common attributes on the root element:
- installsampledata (bool)
- waitforsampledatatoinstall (bool)
- agentdesktopzipfile (string)
- agentdesktopexename (string)
- crmmigdataimportfile (string)
-->
<configdatastorage installsampledata="false" waitforsampledatatoinstall="true">
<solutions>
<!--
Solutions to import
This section will be populated by default at build time and is populated with the solutions specified in the project via:
- ProjectReference, where the project is a Dataverse Solution project (e.g. *.cdsproj)
- PpSolution, explicitly added loose zip file of a solution.
The order of these elements is significant as it indicates the order in which solutions will be installed into the environment.
<configsolutionfile solutionpackagefilename="solutionFile.zip" />
-->
</solutions>
<filestoimport>
<!--
Contains an array of <configimportfile> and <zipimportdetails> nodes that are used to describe individual files and zip files respectively to be imported.
<configimportfile filename="File.csv" filetype="CSV" associatedmap="" importtoentity="FileEntity" datadelimiter="" fielddelimiter="comma" enableduplicatedetection="true" isfirstrowheader="true" isrecordownerateam="false" owneruser="" waitforimporttocomplete="true"/>
<configimportfile filename="File.zip" filetype="ZIP" associatedmap="ZipFileMap" importtoentity="FileEntity" datadelimiter="" fielddelimiter="comma" enableduplicatedetection="true" isfirstrowheader="true" isrecordownerateam="false" owneruser="" waitforimporttocomplete="true"/>
<zipimportdetails>
<zipimportdetail filename="subfile1.csv" filetype="csv" importtoentity="account" />
<zipimportdetail filename="subfile2.txt" filetype="csv" importtoentity="contact" />
</zipimportdetails>
-->
</filestoimport>
<filesmapstoimport>
<!--
<configimportmapfile filename="FileMap.xml" />
<configimportmapfile filename="ZipFileMap.xml" />
-->
</filesmapstoimport>
</configdatastorage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Note: comments are removed at build time.
{
"SchemaVersion": "1.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyTitle>mpa_SAPSetupAssistant</AssemblyTitle>
<Product>mpa_SAPSetupAssistant</Product>
<Copyright>Copyright © 2024</Copyright>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.PowerApps.MSBuild.PDPackage" Version="1.*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CrmSdk.XrmTooling.CoreAssembly" Version="9.1.0.79" PrivateAssets="all" />
<PackageReference Include="Microsoft.CrmSdk.XrmTooling.PackageDeployment" Version="9.1.0.74" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.ComponentModel.Composition" />
</ItemGroup>
<ItemGroup>
<PdSolution Include="..\..\Solutions\mpa_SAPSetupAssistant\bin\Release\mpa_SAPSetupAssistant_managed.zip" />
</ItemGroup>
</Project>
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions Solutions/mpa_SAPSetupAssistant/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# msbuild output directories
/bin
/obj

# MSBuild Binary and Structured Log
*.binlog
55 changes: 55 additions & 0 deletions Solutions/mpa_SAPSetupAssistant/mpa_SAPSetupAssistant.cdsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PowerAppsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps</PowerAppsTargetsPath>
</PropertyGroup>

<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.props')" />

<PropertyGroup>
<ProjectGuid>a8e73e01-453c-4635-864e-6aeb9fa7589c</ProjectGuid>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<!--Remove TargetFramework when this is available in 16.1-->
<TargetFramework>net462</TargetFramework>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<SolutionRootPath>src</SolutionRootPath>
<SolutionPackageType>Both</SolutionPackageType>
</PropertyGroup>

<!--
Solution Packager overrides, un-comment to use: SolutionPackagerType (Managed, Unmanaged, Both)
Solution Localization Control, if you want to enabled localization of your solution, un-comment SolutionPackageEnableLocalization and set the value to true. - Requires use of -loc flag on Solution Clone or Sync
-->
<!--
<PropertyGroup>
<SolutionPackageType>Managed</SolutionPackageType>
<SolutionPackageEnableLocalization>false</SolutionPackageEnableLocalization>
</PropertyGroup>
-->

<ItemGroup>
<PackageReference Include="Microsoft.PowerApps.MSBuild.Solution" Version="1.*" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\.gitignore" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\bin\**" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\obj\**" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.cdsproj" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.cdsproj.user" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.sln" />
</ItemGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\**" Exclude="@(ExcludeDirectories)" />
<Content Include="$(SolutionPackageZipFilePath)">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets')" />

</Project>
Loading

0 comments on commit 18b21ba

Please sign in to comment.