Feb 2008 Source references out-of-date or missing assemblies (from the VS2005 SDK) when VS2008 SDK is installed.

Topics: Service Factory Modeling Edition Forum
Apr 2, 2008 at 12:39 AM

I am trying to compile the Feb 2008 source and running into problems with out-of-date and missing VSX assemblies. When I compile the Microsoft.Practices.Modeling.Dsl.Integration project, I get the following error messages.

Assembly 'Microsoft.Practices.Modeling.Dsl.Service, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.VisualStudio.Modeling.Sdk, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'Microsoft.VisualStudio.Modeling.Sdk, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

The type 'Microsoft.VisualStudio.Shell.WindowPane' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.VisualStudio.Shell, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

It turns out that these assemblies are part of the VS2005 SDK. (I check the assembly path property: C:\Program Files\Visual Studio 2005 SDK\2007.02) Any plans to update the VSX assemblies using VS 2008 sdk?

Apr 2, 2008 at 4:55 PM
Do you hace the VS 2005 SDK installed in that machine?
The source code is using the binary version of that dll and it turns out that it's referencing the VS 2008 SDK.
Check also if you have these references in the Microsoft.Practices.Modeling.Dsl.Integration set as false in the "Specific version" property. If that's the case, then try setting as 'True' so it should force to use the VS2008 SDK version of these libraries.
Apr 4, 2008 at 8:20 AM
Hi Charly,

Yes, I do have VS 2005 SDK v4.0 installed as well as VS 2008 SDK v1.

I did what you mentioned. It got most of the errors but I am now getting this one.

Assembly 'Microsoft.VisualStudio.Modeling.Sdk.Diagrams, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' uses 'Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' c:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Common\Assemblies\Microsoft.VisualStudio.Modeling.Sdk.Diagrams.dll

For the GraphObject assembly, the "Specific version" property is set to 'True'. But the version property is set to I remove this reference with the version one. This solved the problem. Now, I'll need to this for potentially 40 remaining projects in the solution. I wish there was a less tedious way.

Thank you for your help.
Apr 4, 2008 at 10:19 AM
Edited Apr 4, 2008 at 10:21 AM
I got all the references updated. But now when I tried to compile the DataContractDslPackage I get an exception dialog.

Exception thrown during toolbox item creation. This may result in Package Load Failure:

System.TypeLoadException: method 'get_ModelElement' in type 'Microsoft.Practices.ServiceFactory.DataContracts.DataContract' from assembly 'Microsoft.Practices.ServiceFactory.DataContracts.Dsl, Version=, Culture=neutral, PublicKeyToken=ccabcc68072360f3' does not have an implementation.
at Microsoft.Practices.ServiceFactory.Datacontracts.DataContractDslToolboxHelperBase.CreateToolboxItems()
at mcirosoft.Practices.ServiceFactory.DataConttracts.DataContractDslPackaeBase.CreateToolboxItems()
at DataContractDslPackageBase.CreateToolboxItems()
at ModelingPackage.OnToolboxInitialized(Object sender, eventArgs e)
at Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.ResetDefaults(UInt32 grfFlags)

A similar exception occurs when I try to compile the ServiceContractDslPackage as well. Any ideas?

Apr 4, 2008 at 4:34 PM
The easy and fast way to solve this is to simply uninstall the VS2005 SDK and let only the 2008 SDK. That way all the references will be pointing to the right place and you will not need to update anything so the code will build and run out of the box. Otherwise there might be reference issues like you 've described. There were discovered some issues in DSL projects with the two SDKs installed side by side so as I mentioned above, try if you can removeing 2005 SDK and use a fresh copy of the source code.
Apr 30, 2009 at 5:53 PM
Thank you an_phu and charlyfriend for your posts.  Removing the VS2005 SDK did it for me.  Thank you both.