Tuesday, April 12, 2011

AX 2009 and Visual Studio 2010

Out of the box EP Visual studio Add-in (Enterprise portal tools) shipped with AX2009 doesn't work with VS2010. With few simple steps it is possible to make it compatible. AX installer performs validation for VS2008 so all installations steps for Enterprise portal tools have to be done manually:

  1. Copy DVD\MSI\EnterprisePortalTools to C:\Program Files\Microsoft Dynamics AX\50\EnterprisePortalTools
  2. Rename file Microsoft.Dynamics.Framework.Portal.VisualStudio.2008.AddIn.AddIn to Microsoft.Dynamics.Framework.Portal.VisualStudio.2010.AddIn.AddIn
  3. Edit the file: replace VS version 9.0 with 10.0
  4. Open VS2010: Tools->Options->Add-in/Macros security and add C:\Program Files\Microsoft Dynamics AX\50\EnterprisePortalTools
  5. Open DVD\MSI\Components64\
  6. Unpack AxWebProject.zip
  7. File ProjectName.webproj is just one bit big. For VS2010 it should be 0: either delete the file and create new one with same name or edit it and delete it's content
  8. Pack it back to AxWebProject.zip
  9. Create folder My Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual Web Developer\CSharp
  10. Copy AxWebProject.zip to My Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual Web Developer\CSharp
  11. Create folder My Documents\Visual Studio 2010\Templates\ItemTemplates\Visual Web Developer\CSharp
  12. Copy AxWebpartPage.zip and AxWebUserControl.zip from to My Documents\Visual Studio 2010\Templates\ItemTemplates\Visual Web Developer\CSharp
  13. Open VS2010 and make sure that EP project template is available
  14. To add EP specific Items to Visual Studio's Toolbox, select "Chose items" from the right click menu on VS's toolbox
  15. Browse for C:\Program Files\Microsoft Dynamics AX\50\Client\Bin\Microsoft.Dynamics.Framework.Portal.dll

4 comments:

Unknown said...

There are several reasons why this probably isn't working for me. First of all, none of the directories you have listed are available on my computer. I am able to find folders you are listing just in different directories. But I can't get it to work. Is there any way you can show some screen shots of the process to help me fill in the gaps? Thank you!

Dynamics AX and surround said...

AX installer creates folders in My Documents i.e. 'My Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual Web Developer\CSharp'. The procedure assumes that AX installer won't be involved. Therefore those folders are not there. Just create them manually.

kih said...

Hi, great post. :)
i tried to do this tip but it does not work for me...
I dont know why... But I didn't understand very well what I have to do with the webproj file. I created a file without content and replaced the same file, Is this what i have to do??
I have many folders of the AX installation, can this cause problems to integrate the VS?
Thanks in advance.

Dynamics AX and surround said...

Yep, as a result webproj file must have zero size.

Installer just copies the files to respective folders. You should do it manually instead.