Need help with Microsoft.Practices.Modeling.Dsl.Service.dll {4ca249ec-ba85-4537-b541-d3e4561044dd}

Topics: General Discussion Forum, Service Factory Modeling Edition Forum
Oct 23, 2009 at 5:40 PM

Hi,

As I mentioned in a different post, we need to generate VB.Net code with the Wssf tool. To do so we have been using the WssfConftib project.

We built a custom installer and everything is installing just right (almost). I am going thru the 15 minutes HOL to make sure that everything still works as expected. However when I open the MaterialMgmt.servicecontract file and select the “AircraftPart” of the “GetDemandRequest” message and try to click the ellipsis “…” button for the “Type” value, I get the following error message:

“Package Load Faillure

Package ‘Microsoft.Practices.Modeling.Dsl.Service.DslIntegrationServicePackage, Microsoft.Practices.Modeling.Dsl.Service, Version 3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ has failed to load properly ( GUID = {4CA249EC-BA85-4537-B541-D3E4561044DD} ). Please contact package vendor for assistance. Application restart is recommended, due to possible environment corruption. Would you like to disable loading this package in the future? You may use ‘devenv /resetskippkgs’ to re-enable package loading.”


I was able to determine that an exception is getting raised when the IDE tries to call SetSite (or Initialize) on DslIntegrationPackage.

I ran the Package Load Analyser tool against the Microsoft.Practices.Modeling.Dsl.Service.DslIntegrationPackage and the tool tells me that everything is OK even if I see that same error message popping when running the analysis.

I even compared the registry after installing the original Wssf binaries and after installing our version of the tool and everything look pretty much identical.

I am targeting Visual Studio 2008 and here are the prerequisites that I have installed:
- Microsoft Visual Studio 2008 SDK
- Guidance Automation Extensions
- Web Service Security Guidance Package
- Guidance Automation Toolkit

I am lost right now; any suggestions will be much appreciated.

Thanks,
Eric Jobin

Developer
Oct 26, 2009 at 11:46 AM

This is a quite pesky error to debug. You may find some hints in this posted issue; http://servicefactory.codeplex.com/WorkItem/View.aspx?WorkItemId=4076

On the other hand, you can cross check the custom installer build steps here: http://wssfcontrib.codeplex.com/Thread/View.aspx?ThreadId=72673 or here http://servicefactory.codeplex.com/Thread/View.aspx?ThreadId=32059

Oct 26, 2009 at 3:00 PM

Hi,

Thanks for the links. However, I have been thru these posts before and I re-went thru them again, but it seems that none of these are fixing my problem. Feels like I am going in circles.

Any other tips would be appreciated, maybe debugging tools that would allow me to see more specific errors.

For the parts that I can see working, WssfContrib looks great. But since I can’t make it install properly, I am now considering using the original WSSF source code and making the changes myself to support VB code generation.


Thanks,
Eric

Oct 27, 2009 at 5:39 PM

Ok, so I figured on all people that downloaded Wssf and WssfContrib, only a few of us seemed to have issues. For this reason I gave it another shot. I restarted from scratch and was able to get a working installer.

Here are the steps that I followed, in hope that they may help others.

At first I followed the HOL steps but I soon had to improvise.
- Make sure you have all the prerequisites installed.
- I didn’t use the “msbuild postinstall.proj” command since I already had a SNK that I wanted to use. Instead:
  + I copied my SNK into the root folder of the solution
  + I did a search and replace of all the “ProductKey.snk” that I could find
  + I did a search and replace of all the “##CustomPublicKeyToken##” that I could find
  + I did a search of all the WssfContrib public token keys (44b2f7381cd6d8d1) and replaced them with mine.
- Since I am using a custom version of the EnterpriseLibrary (4.1):
  + I replaced the assemblies in the “Lib” folder (Common and Validation)
  + I deleted ObjectBuilder
  + I added ObjectBuilder2
  + I did a search of all the reference to EntLib 3.1 (b03f5f7f11d50a3a) and I replaced them with 4.1 and my EntLib public token key.
- Open the solution with Visual Studio Experimental Hive
- Assign proper PLK in the resource files
- Uncomment the “PackageLoadKey” attributes
- Go thru all the project and update all the reference for the following:
  + Microsoft.Practices.EnterpriseLibrary.Common (replace)
  + Microsoft.Practices.EnterpriseLibrary.Validation (replace)
  + Microsoft.Practices.ObjectBuilder2 (add)
  + Microsoft.VisualStudio.Shell.Interop.8.0 (replace)
  + Microsoft.VisualStudio.Modeling.Sdk (replace)
  + Microsoft.VisualStudio.Modeling.Sdk.Diagram (replace)
  + Microsoft.VisualStudio.Modeling.Sdk. Diagram.GraphObject (replace)
  + Microsoft.VisualStudio.Modeling.Sdk.Shell (replace)
- Execute the “Transform All Templates” command
- Set and build the solution in “Release” mode

After all these steps I was able to produce an installer that I could install on a clean machine. I then was able to successfully go thru the “15 minutes walkthrough” and then the full “Hands-on lab: Building a service” (in VB).

The only issues that I could identify after this quick glance at the result were:
- The icons for the Models were not displayed (because the referenced Dlls don’t exist were they should be (in the “Dsl” folder)
- Following the HOL, the VB templates produce namespace aliases that conflict with the current namespaces (ie. ASMX and WCF) hence failing to compile
- Following the HOL, the VB templates produce properties named Date which is a reserved word in VB.


Thanks for your support,
Eric

Developer
Oct 27, 2009 at 7:56 PM

Awesome checklist Eric!

This will be very useful for any user that may hit this scenario.

Thanks,

Hernan