Skip to content

Instantly share code, notes, and snippets.

@gadysh
Last active April 16, 2018 12:42
Show Gist options
  • Save gadysh/4eb9fe4611ca530a0373608d03fca1da to your computer and use it in GitHub Desktop.
Save gadysh/4eb9fe4611ca530a0373608d03fca1da to your computer and use it in GitHub Desktop.
MetaData Entity Properties Editor For xrmToolBox
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.29.0.1078" newVersion="2.29.0.1078" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.29.0.1078" newVersion="2.29.0.1078" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Web.XmlTransform" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NuGet.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.14.0.832" newVersion="2.14.0.832" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Xrm.Tooling.Connector" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Xrm.Sdk" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Crm.Sdk.Proxy" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.2" newVersion="4.1.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.X509Certificates" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Win32.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.RegularExpressions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.Serialization.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Linq" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{10C91433-DEF8-43BE-BCF9-0C79BD62163B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Entity_Properties_Editor</RootNamespace>
<AssemblyName>Entity Properties Editor</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="McTools.Xrm.Connection, Version=1.2017.10.15, Culture=neutral, PublicKeyToken=96037217801d9658, processorArchitecture=MSIL">
<HintPath>..\packages\MscrmTools.Xrm.Connection.1.2017.10.15\lib\net462\McTools.Xrm.Connection.dll</HintPath>
</Reference>
<Reference Include="McTools.Xrm.Connection.WinForms, Version=1.2017.10.15, Culture=neutral, PublicKeyToken=f1559f79cf894e27, processorArchitecture=MSIL">
<HintPath>..\packages\MscrmTools.Xrm.Connection.1.2017.10.15\lib\net462\McTools.Xrm.Connection.WinForms.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Crm.Sdk.Proxy, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.0.7\lib\net452\Microsoft.Crm.Sdk.Proxy.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.29.0.1078, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.29.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.29.0.1078, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.29.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.XmlTransform, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Web.Xdt.2.1.2\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Primitives">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.0.7\lib\net452\Microsoft.Xrm.Sdk.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Sdk.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CrmSdk.Deployment.9.0.0.7\lib\net452\Microsoft.Xrm.Sdk.Deployment.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Sdk.Workflow, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CrmSdk.Workflow.9.0.0.7\lib\net452\Microsoft.Xrm.Sdk.Workflow.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Tooling.Connector, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CrmSdk.XrmTooling.CoreAssembly.9.0.0.7\lib\net452\Microsoft.Xrm.Tooling.Connector.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NuGet.Core, Version=2.14.0.832, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Core.2.14.0\lib\net40-Client\NuGet.Core.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Activities" />
<Reference Include="System.Activities.Presentation" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.5.0-preview1-26216-02\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.DirectoryServices" />
<Reference Include="System.DirectoryServices.AccountManagement" />
<Reference Include="System.Drawing" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.IO">
<HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Linq">
<HintPath>..\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.3\lib\net46\System.Net.Http.dll</HintPath>
</Reference>
<Reference Include="System.Reflection">
<HintPath>..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime">
<HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Extensions">
<HintPath>..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.InteropServices">
<HintPath>..\packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization.Primitives">
<HintPath>..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Security" />
<Reference Include="System.Security.Cryptography.Algorithms">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding">
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates">
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Text.RegularExpressions">
<HintPath>..\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Workflow.Activities" />
<Reference Include="System.Workflow.ComponentModel" />
<Reference Include="System.Workflow.Runtime" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.ReaderWriter">
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.1\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="WeifenLuo.WinFormsUI.Docking, Version=3.0.4.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
<HintPath>..\packages\DockPanelSuite.3.0.4\lib\net40\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
</Reference>
<Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2015, Version=3.0.4.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
<HintPath>..\packages\DockPanelSuite.ThemeVS2015.3.0.4\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath>
</Reference>
<Reference Include="XrmToolBox, Version=1.2018.3.21, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\XrmToolBoxPackage.1.2018.3.21\lib\net462\XrmToolBox.exe</HintPath>
</Reference>
<Reference Include="XrmToolBox.Extensibility, Version=1.2017.7.10, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\XrmToolBoxPackage.1.2018.3.21\lib\net462\XrmToolBox.Extensibility.dll</HintPath>
</Reference>
<Reference Include="XrmToolBox.PluginsStore, Version=1.2017.10.7, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\XrmToolBoxPackage.1.2018.3.21\lib\net462\XrmToolBox.PluginsStore.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Plugin.cs" />
<Compile Include="PluginControl.cs">
<SubType>UserControl</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="XrmToolBox.exe.Config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="PluginControl.resx">
<DependentUpon>PluginControl.cs</DependentUpon>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\Audit.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DockPanelSuite" version="3.0.4" targetFramework="net471" />
<package id="DockPanelSuite.ThemeVS2015" version="3.0.4" targetFramework="net471" />
<package id="Microsoft.CrmSdk.CoreAssemblies" version="9.0.0.7" targetFramework="net471" />
<package id="Microsoft.CrmSdk.Deployment" version="9.0.0.7" targetFramework="net471" />
<package id="Microsoft.CrmSdk.Workflow" version="9.0.0.7" targetFramework="net471" />
<package id="Microsoft.CrmSdk.XrmTooling.CoreAssembly" version="9.0.0.7" targetFramework="net471" />
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.29.0" targetFramework="net471" />
<package id="Microsoft.Web.Xdt" version="2.1.2" targetFramework="net471" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net471" />
<package id="MscrmTools.Xrm.Connection" version="1.2017.10.15" targetFramework="net471" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net471" />
<package id="NuGet.Core" version="2.14.0" targetFramework="net471" />
<package id="System.Collections" version="4.3.0" targetFramework="net471" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net471" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net471" />
<package id="System.Diagnostics.DiagnosticSource" version="4.5.0-preview1-26216-02" targetFramework="net471" />
<package id="System.Globalization" version="4.3.0" targetFramework="net471" />
<package id="System.IO" version="4.3.0" targetFramework="net471" />
<package id="System.Linq" version="4.3.0" targetFramework="net471" />
<package id="System.Net.Http" version="4.3.3" targetFramework="net471" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net471" />
<package id="System.Reflection" version="4.3.0" targetFramework="net471" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net471" />
<package id="System.Runtime" version="4.3.0" targetFramework="net471" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net471" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net471" />
<package id="System.Runtime.Serialization.Json" version="4.3.0" targetFramework="net471" />
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net471" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net471" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net471" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net471" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net471" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net471" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net471" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net471" />
<package id="System.Threading" version="4.3.0" targetFramework="net471" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net471" />
<package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net471" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net471" />
<package id="XrmToolBoxPackage" version="1.2018.3.21" targetFramework="net471" />
</packages>
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XrmToolBox.Extensibility;
using XrmToolBox.Extensibility.Interfaces;
namespace Entity_Properties_Editor
{
[Export(typeof(IXrmToolBoxPlugin)),
ExportMetadata("BackgroundColor", "Black"),
ExportMetadata("PrimaryFontColor", "Gold"),
ExportMetadata("SecondaryFontColor", "LightGray"),
ExportMetadata("SmallImageBase64", "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAQ4SURBVFhH7VZbU1tVGF1JyUm4GC4SWkoJdeRSJAhlmClDRx6sguOU2qkdHIoV9cF6afvk4PgPWkfbmc5Yqi88FfrEpIZLdQYoA03TkBBGbC1aKIRLuEjInSQnyfY7O4LyoOOTPJiVnJy9v/2dfdb+1tp7ImME7CLkf9x3DQkCCQIJAgkCf0Pgvzsc+VG89MSCwKYXosiQrAQOlr2MtdVVdHV2IeD3Iyv7WXxw7hx/oNfQA7PZhAPaArS2tuLu0BDMJjMEhQKhcAj1rzXAHwjAYh6DTAbkFxTgaG0tAhQrOXSIzzEzM4NoNIqioiJaK2FqvJuJYohFqT3Wf509Gu1kw8Mj7NrVq9Iws9km2JWvrjDjPSO70d4ej42Ps8/bPuPtSERkFz8+z+bm5nj/y8tf8PsWpqenWXFhEXMsLfF+0+nTbGBggLe5BHKZAklJAtejuuEjYidSK4bUZ9TSMHS6Mng9boxbLWg5e5bHKg8fRo4mB7FYDHv2JFHlBCQnJ/MxRh+bzQar1YrlZQdk1K89WovRkREYjUaoKE8QBJ7LCYSDEd7hoLKpUjKhEpToMRjw/rvv4Y3GRnza1oYIlU2Kb0GhEngpJUTJNjEWi7cjUTgWFuFYXMTGhpsk2SS53sHK8gq+vfENmt5qQjAY5LmcgFqzH/O/PpDk4MFYTCTN/DhScwSXLl+CrrwcSlrhi+UVuHWri+dMz0zDseSAgrSXEBbD288rlUq83ngcx0+cQGkp6U5xr8fHYxcuXoA6PQPhcJjnbv8fcNgfw7lih/PJMDQHSiHfV4MVxxJeqquDx+NBb08vms80o6OjA1azBTk5Gnx4/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OsZgH8A59KAQ2tTT5swC8/+jhQzcWsjRqLV+ntBBU9QDPJNBph0SdqIrZYquaKwHJObnVFyIQjt8IxyS8F4D7wcF9FMq9HxAbKB8cwTvBswDcQynAWHzPORgXBO8E3/IO93gnGCswIMBA/j3T6jHPKCjo5c/ldfSLuXKAZxMY4f+EP1qFIzwfEYEhEREYEhGBIRERGBIRgSERERgSEYEhEREYEhGBIRERGBIRgSERERgSEYEhEREYEhGBIRERGBIRgSERERgSEYEhEREYEhGBIRERGBIRgSERERgKZv8LdDepUrkKLmcAAAAASUVORK5CYII="),
ExportMetadata("Name", "Multiple Entity MetaData Editor"),
ExportMetadata("Description", "Edit Multiple Entities MetaData in one form")]
public class Plugin : PluginBase
{
public override IXrmToolBoxPluginControl GetControl()
{
return new PluginControl();
}
}
}
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Messages;
using Microsoft.Xrm.Sdk.Metadata;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Windows;
using System.Windows.Forms;
using XrmToolBox.Extensibility;
namespace Entity_Properties_Editor
{
public class PluginControl : PluginControlBase
{
DataTable tbl;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btn_LaodEntities;
private System.Windows.Forms.Button btn_close;
private GroupBox groupBox1;
private DataGridViewTextBoxColumn m_counter;
private DataGridViewCheckBoxColumn EnabledAudit;
private DataGridViewTextBoxColumn EntityDisplayName;
private DataGridViewTextBoxColumn EntitySchemaName;
private DataGridViewCheckBoxColumn OrigEnabledAudit;
private DataGridViewCheckBoxColumn changed;
private RichTextBox rtb1;
private PictureBox pictureBox1;
private System.Windows.Forms.Button btn_Update;
public PluginControl()
{
InitializeComponent();
BuildTable();
}
private void InitializeComponent()
{
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.m_counter = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.EnabledAudit = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.EntityDisplayName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.EntitySchemaName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OrigEnabledAudit = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.changed = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btn_LaodEntities = new System.Windows.Forms.Button();
this.btn_Update = new System.Windows.Forms.Button();
this.btn_close = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.rtb1 = new System.Windows.Forms.RichTextBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.ColumnHeader;
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.m_counter,
this.EnabledAudit,
this.EntityDisplayName,
this.EntitySchemaName,
this.OrigEnabledAudit,
this.changed});
this.dataGridView1.Location = new System.Drawing.Point(0, 118);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 24;
this.dataGridView1.Size = new System.Drawing.Size(757, 614);
this.dataGridView1.TabIndex = 8;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dataGridView1.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellValueChanged);
//
// m_counter
//
this.m_counter.DataPropertyName = "m_counter";
this.m_counter.Frozen = true;
this.m_counter.HeaderText = "#";
this.m_counter.Name = "m_counter";
this.m_counter.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.m_counter.Visible = false;
this.m_counter.Width = 22;
//
// EnabledAudit
//
this.EnabledAudit.DataPropertyName = "EnabledAudit";
this.EnabledAudit.Frozen = true;
this.EnabledAudit.HeaderText = "Enabled Audit";
this.EnabledAudit.Name = "EnabledAudit";
this.EnabledAudit.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.EnabledAudit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.EnabledAudit.Width = 115;
//
// EntityDisplayName
//
this.EntityDisplayName.DataPropertyName = "EntityDisplayName";
this.EntityDisplayName.Frozen = true;
this.EntityDisplayName.HeaderText = "Entity Display Name";
this.EntityDisplayName.Name = "EntityDisplayName";
this.EntityDisplayName.ReadOnly = true;
this.EntityDisplayName.Width = 149;
//
// EntitySchemaName
//
this.EntitySchemaName.DataPropertyName = "EntitySchemaName";
this.EntitySchemaName.Frozen = true;
this.EntitySchemaName.HeaderText = "Entity Schema Name";
this.EntitySchemaName.Name = "EntitySchemaName";
this.EntitySchemaName.ReadOnly = true;
this.EntitySchemaName.Width = 154;
//
// OrigEnabledAudit
//
this.OrigEnabledAudit.DataPropertyName = "OrigEnabledAudit";
this.OrigEnabledAudit.HeaderText = "Orig EnabledAudit";
this.OrigEnabledAudit.Name = "OrigEnabledAudit";
this.OrigEnabledAudit.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.OrigEnabledAudit.Visible = false;
this.OrigEnabledAudit.Width = 116;
//
// changed
//
this.changed.DataPropertyName = "changed";
this.changed.HeaderText = "changed";
this.changed.Name = "changed";
this.changed.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.changed.Visible = false;
this.changed.Width = 69;
//
// label2
//
this.label2.AutoSize = true;
this.label2.ForeColor = System.Drawing.Color.Red;
this.label2.Location = new System.Drawing.Point(135, 92);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(130, 17);
this.label2.TabIndex = 13;
this.label2.Text = "Red - remove Audit";
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.label1.Location = new System.Drawing.Point(135, 63);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(121, 17);
this.label1.TabIndex = 12;
this.label1.Text = "Green - add Audit";
//
// btn_LaodEntities
//
this.btn_LaodEntities.Location = new System.Drawing.Point(6, 63);
this.btn_LaodEntities.Name = "btn_LaodEntities";
this.btn_LaodEntities.Size = new System.Drawing.Size(94, 49);
this.btn_LaodEntities.TabIndex = 11;
this.btn_LaodEntities.Text = "Load Entities";
this.btn_LaodEntities.UseVisualStyleBackColor = true;
this.btn_LaodEntities.Click += new System.EventHandler(this.btn_LaodEntities_Click);
//
// btn_Update
//
this.btn_Update.Enabled = false;
this.btn_Update.Location = new System.Drawing.Point(282, 63);
this.btn_Update.Name = "btn_Update";
this.btn_Update.Size = new System.Drawing.Size(94, 49);
this.btn_Update.TabIndex = 9;
this.btn_Update.Text = "Update";
this.btn_Update.UseVisualStyleBackColor = true;
this.btn_Update.Click += new System.EventHandler(this.btn_Update_Click);
//
// btn_close
//
this.btn_close.BackColor = System.Drawing.Color.Red;
this.btn_close.ForeColor = System.Drawing.Color.White;
this.btn_close.Location = new System.Drawing.Point(6, 19);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(38, 34);
this.btn_close.TabIndex = 16;
this.btn_close.Text = "X";
this.btn_close.UseVisualStyleBackColor = false;
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.pictureBox1);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.btn_close);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.btn_Update);
this.groupBox1.Controls.Add(this.btn_LaodEntities);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(1092, 112);
this.groupBox1.TabIndex = 17;
this.groupBox1.TabStop = false;
//
// pictureBox1
//
this.pictureBox1.Image = global::Entity_Properties_Editor.Properties.Resources.Audit;
this.pictureBox1.Location = new System.Drawing.Point(457, 19);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(79, 50);
this.pictureBox1.TabIndex = 17;
this.pictureBox1.TabStop = false;
//
// rtb1
//
this.rtb1.Location = new System.Drawing.Point(763, 118);
this.rtb1.Name = "rtb1";
this.rtb1.Size = new System.Drawing.Size(329, 614);
this.rtb1.TabIndex = 18;
this.rtb1.Text = "";
//
// PluginControl
//
this.Controls.Add(this.rtb1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.dataGridView1);
this.Name = "PluginControl";
this.Size = new System.Drawing.Size(1092, 732);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
private void BuildTable()
{
tbl = new DataTable();
tbl.Columns.Add(new DataColumn("m_Counter", typeof(int)));
tbl.Columns.Add(new DataColumn("EnabledAudit", typeof(bool)));
tbl.Columns.Add(new DataColumn("EntityDisplayName", typeof(string)));
tbl.Columns.Add(new DataColumn("EntitySchemaName", typeof(string)));
tbl.Columns.Add(new DataColumn("OrigEnabledAudit", typeof(bool)));
tbl.Columns.Add(new DataColumn("changed", typeof(bool)));
}
private void btn_LaodEntities_Click(object sender, EventArgs e)
{
tbl.Clear();
rtb1.Clear();
ExecuteMethod(LoadEntities);
}
private void LoadEntities()
{
WorkAsync(new WorkAsyncInfo
{
Message = "Retrieving Entities...",
Work = (w, e) =>
{
RetrieveAllEntitiesRequest retentreq = new RetrieveAllEntitiesRequest();
retentreq.EntityFilters = EntityFilters.Entity;
RetrieveAllEntitiesResponse retentresp = (RetrieveAllEntitiesResponse)Service.Execute(retentreq);
int counter = 0;
foreach (EntityMetadata item in retentresp.EntityMetadata)
{
try
{
if (item.DisplayName != null && item.DisplayName.UserLocalizedLabel != null)
{
counter++;
tbl.Rows.Add(counter, item.IsAuditEnabled.Value, item.DisplayName.UserLocalizedLabel.Label, item.SchemaName, item.IsAuditEnabled.Value, false);
}
}
catch (Exception ex)
{
}
}
},
ProgressChanged = e =>
{
// If progress has to be notified to user, use the following method:
SetWorkingMessage("Message to display");
},
PostWorkCallBack = e =>
{
dataGridView1.DataSource = tbl;
btn_LaodEntities.Enabled = false;
btn_Update.Enabled = true;
dataGridView1.Refresh();
//MessageBox.Show(string.Format("You are {0}", (Guid)e.Result));
},
AsyncArgument = null,
IsCancelable = true,
MessageWidth = 340,
MessageHeight = 150
});
}
private void dataGridView1_CellContentClick(object sender, System.Windows.Forms.DataGridViewCellEventArgs e)
{
dataGridView1.CommitEdit(DataGridViewDataErrorContexts.Commit);
}
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
if ( e.RowIndex >= 0 && e.ColumnIndex == tbl.Columns.IndexOf("EnabledAudit") )
{
DataGridViewCheckBoxCell ChbCell = (DataGridViewCheckBoxCell)dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];
DataGridViewTextBoxCell tbCell1 = (DataGridViewTextBoxCell)dataGridView1.Rows[e.RowIndex].Cells["EntityDisplayName"];
if (tbCell1.Value == null ||String.IsNullOrWhiteSpace(tbCell1.Value.ToString() ))
{
dataGridView1.Rows.RemoveAt(e.RowIndex);
}
DataGridViewTextBoxCell tbCell2 = (DataGridViewTextBoxCell)dataGridView1.Rows[e.RowIndex].Cells["EntitySchemaName"];
DataGridViewCheckBoxCell orgCell = (DataGridViewCheckBoxCell)dataGridView1.Rows[e.RowIndex].Cells["OrigEnabledAudit"];
DataGridViewCheckBoxCell changedCell = (DataGridViewCheckBoxCell)dataGridView1.Rows[e.RowIndex].Cells["changed"];
bool Chacked = Convert.ToBoolean(ChbCell.Value);
if (Chacked != Convert.ToBoolean(orgCell.Value))
{
if (Chacked)//color green
{
tbCell1.Style.ForeColor = Color.Green;
tbCell2.Style.ForeColor = Color.Green;
changedCell.Value = true;
//tbl.Rows[e.RowIndex]["changed"] = true;
}
else//color red
{
tbCell1.Style.ForeColor = Color.Red;
tbCell2.Style.ForeColor = Color.Red;
changedCell.Value = true;
//tbl.Rows[e.RowIndex]["changed"] = true;
}
}
else//defualt color
{
tbCell1.Style.ForeColor = Color.Black;
tbCell2.Style.ForeColor = Color.Black;
//tbl.Rows[e.RowIndex]["changed"] = false;
changedCell.Value = false;
}
}
}
private void btn_close_Click(object sender, EventArgs e)
{
base.CloseTool();
}
#region Update Entities
private void btn_Update_Click(object sender, EventArgs e)
{
foreach (DataRow dr in tbl.Rows)
{
if ((bool)dr["changed"])
{
ExecuteMethod(UpdateEntities, dr);
}
}
btn_Update.Enabled = false;
btn_LaodEntities.Enabled = true;
}
private void UpdateEntities(DataRow item)
{
WorkAsync(new WorkAsyncInfo
{
Message = "Updating Entities...",
Work = (w, e) =>
{
UpdateEntity(item);
},
ProgressChanged = e =>
{
// If progress has to be notified to user, use the following method:
SetWorkingMessage("Message to display");
},
PostWorkCallBack = e =>
{
if (e.Error==null)
{
string res = "";
if ((bool)item["EnabledAudit"])
{
res = "Added";
}
else
{
res = "Removed";
}
rtb1.AppendText(item["EntityDisplayName"].ToString() + " - " + res + "\n\r");
}
else
{
System.Windows.Forms.MessageBox.Show("an error has occurred: "+e.Error.Message);
}
},
AsyncArgument = null,
IsCancelable = true,
MessageWidth = 340,
MessageHeight = 150
});
}
private void UpdateEntity(DataRow item)
{
UpdateEntityRequest req = new UpdateEntityRequest();
EntityMetadata ent = new EntityMetadata();
ent.IsAuditEnabled = new BooleanManagedProperty((bool)item["EnabledAudit"]);
ent.LogicalName = item["EntitySchemaName"].ToString().ToLower();
req.Entity = ent;
UpdateEntityResponse resp = (UpdateEntityResponse)Service.Execute(req);
}
#endregion
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="m_counter.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EnabledAudit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EntityDisplayName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EntitySchemaName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OrigEnabledAudit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="changed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="m_counter.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EnabledAudit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EntityDisplayName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EntitySchemaName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OrigEnabledAudit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="changed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.28.0.725" newVersion="2.28.0.725" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.28.0.725" newVersion="2.28.0.725" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Web.XmlTransform" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NuGet.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.14.0.832" newVersion="2.14.0.832" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Xrm.Tooling.Connector" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Xrm.Sdk" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Crm.Sdk.Proxy" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment