locked
VSX 2010 package loading- Markup.xaml parsing cannot find assemblies RRS feed

  • Question

  • I have built a Wpf UserControl Library and it contains a large group of assemblies and even references two other class libraries and several merged resourceDictionaries.  It builds without error.  I built a simple VSX package and referenced the Wpf Library, then tried to run it.   As it parsed the page it was able to find only part of the assemblies referenced on my xaml UserControl page.  It gives me the  error message below in the fusion log for each unbindable assembly.  If I remove the "bad" assembly it continues parsing to the next unfindable one.  It is able to find one of my referenced classlibraries, but not the other.  They are set up essentially the same with different class content.

    So, does anyone have any resources or answers for this?  My other test projects that even contain WCF services load with no issues and this is a stumper for me.

    Thanks, Danny

    === Pre-bind state information ===
    LOG: User = AMRS\dhoneycu
    LOG: DisplayName = System.Windows.Interactivity, PublicKeyToken=31bf3856ad364e35
     (Partial)
    WRN: Partial binding information was supplied for an assembly:
    WRN: Assembly Name: System.Windows.Interactivity, PublicKeyToken=31bf3856ad364e35 | Domain ID: 1
    WRN: A partial bind occurs when only part of the assembly display name is provided.
    WRN: This might result in the binder loading an incorrect assembly.
    WRN: It is recommended to provide a fully specified textual identity for the assembly,
    WRN: that consists of the simple name, version, culture, and public key token.
    WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
    LOG: Appbase = file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/
    LOG: Initial PrivatePath = NULL
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.Config
    LOG: Using host configuration file:
    LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/System.Windows.Interactivity/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/System.Windows.Interactivity/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/System.Windows.Interactivity/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/System.Windows.Interactivity/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/System.Windows.Interactivity/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/System.Windows.Interactivity/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/System.Windows.Interactivity/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/System.Windows.Interactivity/System.Windows.Interactivity.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/System.Windows.Interactivity/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/System.Windows.Interactivity/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/System.Windows.Interactivity/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/System.Windows.Interactivity/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/System.Windows.Interactivity/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/System.Windows.Interactivity/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/System.Windows.Interactivity/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/System.Windows.Interactivity.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/System.Windows.Interactivity/System.Windows.Interactivity.EXE.


    been there, left, and now I'm back
    Saturday, December 18, 2010 2:59 PM

Answers

  • Are the assemblies you have referenced in the IDE being included in the VSIX and/or deployed to the location that the package is deployed to when you hit F5?  I don't think it will automatically deploy dependent assemblies since some of them (like VS specific assemblies, or .NET framework assemblies) will exist on the target machine and wouldn't need to be deployed.  Other assemblies, like Expression Interactivity Assemblies would likely need to be packaged/deployed along with your package, since it sounds like your package relies on them.

    Ryan

    • Marked as answer by Victor_Chen Monday, December 27, 2010 2:55 AM
    Monday, December 20, 2010 12:38 AM

All replies

  • Does your VSIX include the necessary assemblies?  Where are they being deployed to (your extension directory I assume)?

    Ryan

    Saturday, December 18, 2010 5:00 PM
  • Ryan, I had not gotten to using the vsix-  The failure came when I tried to open the package in the experimental hive.  To answer your question and more, I installed the vsix anyway and tried to run the package in a new vs window.  I got the error message that the assembly could not be found.   I did open up the vsix and the assembly is in there. It is very odd, this is happening to a bunch of the dlls, not just this one.

    As far as the deployment, first I referenced them in the Wpf library built it and used that dll as the reference in the VSX package.  When that failed as a matter of trying anything I added all of the dlls in the Wpf to the package. Same error.

    Thanks,

    Danny


    been there, left, and now I'm back
    Saturday, December 18, 2010 5:31 PM
  • That is odd, it seems like it is WPF that is having the problem in locating your assemblies.  We have XAML that is compiled into product assemblies but references other assemblies that are in the product and haven't seen this issue ourselves. I don't think WPF is probably terribly clever about locating assemblies references in XAML so I would expect they have to be in the same directory (not a subdirectory) as the BAML containing assembly (or loose XAML) or in the GAC.  Is this the case for you?

    Ryan

    Saturday, December 18, 2010 5:36 PM
  • Well, when you said WPF isn't too clever it clicked something in my head and I went back to square one with the architecture.  This project started out as a Silverlight 4 web app and I tried to reuse as much as possible.  The person that built the SL did quite a few convoluted things with the references(he is a C# expert learning Xaml) so I went in, bit the bullet and did some rework since your last post.

      I found a bunch of reasons the WPF wasn't working in the VSX, some of the references even  went to as many as four places before getting satisfaction, but now I have a working toolwindow.  I now can actually identify the real problems.  The biggest one I am getting is the exp hive loading is not finding the references to the Expression Interactivity Assemblies, the Wpf Toolkit, and the Extended toolkit.  I have put them everywhere except the GAC.  I understand generally what the GAC is, but the question I have is if I put a dll there and it makes a reference work for me when this is deployed to 5000 developers will it work on their machines? Do you know of any reason these assemblies would not work as a package element in general?

    I sent a screenshot of the new Wpf Toolwindow to my boss last night and he replied with "Awesome! " This thing is going to work and again thanks,

    Danny


    been there, left, and now I'm back
    Sunday, December 19, 2010 6:30 PM
  • > The biggest one I am getting is the exp hive loading is not finding the references to the Expression Interactivity Assemblies, the Wpf Toolkit, and the Extended toolkit. 

    What do you mean by the 'exp hive loading is not finding the references'?  Do you mean your package is failing to load because it can't resolve the assembly references?  Or do you mean the package loads fine but the XAML isn't working properly?  Or something else?

    >I have put them everywhere except the GAC. 

    I believe if they are located next to the package assembly (same directory) it should work, but you may have to use fuslogviewer as you did before to see where it is looking exactly, they should be in one of those locations :)

    > I understand generally what the GAC is, but the question I have is if I put a dll there and it makes a reference work for me when this is deployed to 5000 developers will it work on their machines?

    Only if they too have the assemblies in their GAC.  Using VSIX deployment there is no way to GAC things that I am aware of, so you would need an actual MSI type installer that would GAC the assemblies.  It is probably not a great idea since the GAC is generally a place where assemblies used by multiple products go.  I wouldn't put your otherwise private assemblies there just because you are having loader resolution issues, probably better to figure out why that is happening and how to avoid it.  Plus there are extra restrictions for things in the GAC. Specifically they have to be signed iirc.

    >Do you know of any reason these assemblies would not work as a package element in general?

    Nope, though I would need to understand more about what you mean as 'a package element' and what 'doesn't work' means.  The simplest deployment I can imagine is a single DLL with embedded BAML which references external DLLs that sit in the same directory as the dll with the BAML.  That should 'just work' afaik because the CLR should look in the directory of the referencing DLL (the one with the BAML) to locate any references, if that fails it will fall back on other locations in the probing path.

    Ryan

    Sunday, December 19, 2010 9:30 PM
  • Ryan, I appreciate your time on this, I have been learning quite a lot.

    So in response to this:

    > The biggest one I am getting is the exp hive loading is not finding the references to the Expression Interactivity Assemblies, the Wpf Toolkit, and the Extended toolkit.  

     The problem here is package is failing to load because it can't resolve the assembly references.  The Vsx package will build successfully, but when I hit f5 the error messages appear regarding finding the references.  This is where I was getting the fusionlog msgs also.

    When I mentioned package element and not working I simply was referring to using those assemblies in the Wpf UserControl Library that is referenced in a Vsx package.  I mentioned it because I had read somewhere else that a person had trouble using an Expression Control assembly due to an internal reference to the SDK and was just wondering if you were aware of any other gotchas.

    Hope I can help you in some way sometime

    Danny

     


    been there, left, and now I'm back
    Sunday, December 19, 2010 10:44 PM
  • Are the assemblies you have referenced in the IDE being included in the VSIX and/or deployed to the location that the package is deployed to when you hit F5?  I don't think it will automatically deploy dependent assemblies since some of them (like VS specific assemblies, or .NET framework assemblies) will exist on the target machine and wouldn't need to be deployed.  Other assemblies, like Expression Interactivity Assemblies would likely need to be packaged/deployed along with your package, since it sounds like your package relies on them.

    Ryan

    • Marked as answer by Victor_Chen Monday, December 27, 2010 2:55 AM
    Monday, December 20, 2010 12:38 AM