dazinator / CrmAdo

An ADO.NET Provider for Dynamics Crm
6 stars 4 forks source link

Publish an Extension on the VS Gallery for the DDEX Provider #13

Closed dazinator closed 9 years ago

dazinator commented 9 years ago

Once the DDEX Provider implementation is complete, create a VSIX package that will install the DDEX provider.

This involves:

  1. Deploying CrmAdo and dependencies to the GAC.
  2. Adding the provider factory element for CrmAdo to the appropriate machine.config and web.config files i.e
  <DbProviderFactories>
<!-- shortened for brevity -->   
 <add name="CrmAdo Data Provider" invariant="System.Data.DynamicsCrm.CrmAdo" description="CrmAdo Data Provider for Microsoft Dynamics Crm 2013" type="CrmAdo.CrmDbProviderFactory, CrmAdo, Version=1.1.0.0, Culture=neutral, PublicKeyToken=ba966c247ee8fd34" />
    </DbProviderFactories>
  1. Importing the windows registry entries to register the CrmAdo data source and the DDEX provider (support entities etc) with the correct version of Visual Studio.
  2. Deploying the Microsoft.Xrm.Client.dll to the visual studio $(DevEnvDir) - .eg: G:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE - This appears to be a bug with the microsoft xrm sdk in that if you register and use the dll's from the GAC, the xrm runtime is still trying to locate the Microsoft.Xrm.Client.dll from the local app directory.

Once I have a VSIX package that works, then could also potentially distribute this as a NuGet package, with the init.ps1 simply launching the vsix installer.

Could also put the VSIX on the visual studio extensions / store.

dazinator commented 9 years ago

VSIX now on the vs gallery: http://visualstudiogallery.msdn.microsoft.com/6c46df0c-253b-4022-8e15-d9df03df8d76

dazinator commented 9 years ago

There was a problem with the gallery version that I put up as VSIX's can't register assemblies in the GAC or amend the machine.config file. Had to create a WIX installer in the end - this was all tracked under seperate issues.

Have unpublished extension from gallery until this is fixed.

dazinator commented 9 years ago

Have decided that I am going to split this into 2 seperate visual studio extension packages.

The first is an empty package that must be installed via an MSI and the MSI will install the CrmAdo ADO.NET data provider assembly into the GAC and register it in the machine.config file.

The second is the DDEX provider for visual studio. This can now have a dependency on the first package.

This means when you try to install the DDEX provider - it can prompt you to install the first package which will take care of the GAC'ing and the machine config etc.

Another benefit of this is that updates to CrmAdo and the DDEX extension could now evolve seperately rather than having to be tied to the same MSI installer.