Windows Entertainment and Connected Home

How to organize, access and enjoy all of your media in and around your home

Separate assembly for UI/Markup. Can't see MCML load errors

  • rated by 0 users
  • This post has 23 Replies |
  • 2 Followers
Page 2 of 2 (24 items) 12
  •  

    Sorry you couldn't get it to work. Just in case you want to torture yourself further below is the markup I used to validate this ("Library" is from OML).

    Personally I don't find any value in separating the markup out of the addin but I probably don't understand where you are going with the architecture. The closest thing I do is some crazy cuss where I dynamically parse fonts, colors and images out of ehres and generate my own markup. This enables me to adhere to a user's theme if they hacked ehres. Over the top pointless I know-but I like consistency. Regardless, MCML development can really be a real cluster-cuss.

    <UI Name="test">
    <Content>
          <Panel>
            <Layout>
              <FlowLayout Orientation="Horizontal" ItemAlignment="Center" Spacing="20,20" />
            </Layout>
           
            <Children>


              <ColorFill Content="Red" MinimumSize="50,50" Padding="20,20,20,20"  />
              <ColorFill Content="Orange" MinimumSize="50,50" />
              <ColorFill Content="Yellow" Layout="HorizontalFlow">
                <Children>
                  <Text Content="ColorFills!" />
                </Children>
              </ColorFill>
              <ColorFill Content="Blue" MinimumSize="50,50" />
              <ColorFill Content="Green" MinimumSize="50,50" Padding="20,20,20,20" />
    <Graphic Alpha=".15"

    Content="resx://Library,Culture=Neutral,Version=4.0.0.0,PublicKeyToken=74d3b407d6cf16f1/Library.Resources/V3_Controls_Movie_Icon_Default"

    Layout="Fill">
                   
                  </Graphic>
            </Children>
           
          </Panel>
        </Content>
    </UI>

     

  •  

    ..so after venting last night, I kept searching for possible causes. The link you gave me pointed me in the right direction regarding resource files. After seeing that error message (last post) i tried to setup the .ui project and resource setting for "en-us". This didn't work right but at least I got a different message where it caused tvlibrary and the .ui markup to look for videolibrary.ui.resources.dll. I figured this was not how I wanted to end up doing this because I wanted to share-able UI library and model code not just a pure resources dll.

    Anyways, after unloading and editing the project file then undoing the stuff I did.....crap started working! Earlier in this debacle I had even tried making the resource file public instead of internal. I am not even using a strong name reference in the markup. One thing I did, however, was get rid of the loading page entirely.....I can't say which of these was the problem because I tried a lot of stuff but 'reset' after each trial-and-error run. I do coding for a career but this platform is ....ugh.

    I wanted to separate the UI stuff because I wanted to pull the Dvd Extender code into a separate plug-in and not include in tvlibrary.

    PS. Whatever happened to the playback code/forum/project thingy? Also, is OML dead :-( ?

    EDIT:

    Hmm. It looks like this worked (in addition to the resource accidentally fix?) if I put the dll in ehome as well as GAC-ing. This is still good. At least I know I can have the markup in another dll

     

    EDIT 2:

    Ok, so far, aside from the i-don't-know-what-the-f-happened issue with the resources,  it works if

    (a) I use sn references in every resx:// reference to the UI library including code-behind and markuo

    (b) I just put the [long filthy expletive deleted] assembly in \ehome as well as in GAC.

    I think I am just going to do (b) since it requires the least work. If at some point I scrap the separate UI deal then i don't have to go back and change the references.

    Thanks again, man.

    [vent]

    Sometimes I think MS should have just made Internet TV such that all it's UI was a shared public lib that 3rd parties could reuse (with calls like "ShowDetails() or BuildGallery() ) or something like that then have Internet TV and Netflix just sit on top of this library. Honestly, do we all want to build GUI if we don't know need/want to? Hell no! I'd rather build functionality to add to the core Media Center "experience" and not worry about the banalities of this god-cursed platform.

    I should just start accepting the fact that eHome only cares about live tv and all their resources fall into that.

    [end vent]

  •  

    Heh, you could always take the third route and use ILMerge or maybe get creative with assembly loading.

    Last I checked the eHome team was focused on Pictures/Videos because thats what their usage statistics told them (you know because MC was shoved into Vista and grandma stumbled on a way to view her photos in a slideshow). To be honest I'm really not sure why they have kept the UI internal. I know Charlie was asked several times and he never really gave what I would consider a valid reason. Add-in development has been repeatedly shafted over the years, but I honestly don't think it was on purpose (except for the "more info" security menu in 7MC). If I were to guess though, I would say they have enough on their hands just keeping the core stable.

    Concerning playback I was waiting on Sam to create a site but have been busy with other things to really prod him.

    As far as OML goes, it isn't dead. I'm a UI developer. Unlike most I actually enjoy dealing with MCML's "quirks". After a while I found myself spending way too much time dealing with aspects of the project like SQL and the installer and things began to feel more like work rather than fun. So I have taken a step back and have been focusing on getting the UI where I want it before I'm willing to invest the time into cleaning up these bits. That means things will be quiet until I'm ready.

  •  

    Hi Jack,

    Not sure from the thread if this was explained - the reason for the issue is that Media Center has a concept of "known assemblies" - this is a list that Media Center uses to resolve markup references.  The assembly that you specify with your Launch method (your primary assembly) in is added to the known assemblies list, but no other assembly of yours is.  You need to use the fully qualified strong name in order for Media Center to find your assembly, or you need to put it in the eHome folder (which is checked in addition to the known assemblies list), or you need to merge the second assembly into your primary assembly using ILMerge or Intellilock (or something similar), and deploy a single assembly in your production code.

    Cheers,
    Andrew

    PS The blue screen with no error is a bug in Windows 7 MC.

  •  

    Just noticed that Olcay put together a pretty good workaround for all this.

  •  

    Andrew,

    Thanks for the info.

  •  

    Dude. Thanks for that link. It crystallizes my problem perfectly. You were saying the same things pretty much but I was just not getting it :-).

  •  

    Thanks for posting the link to Olcay's blog MSBob - I thought I'd tried that and it hadn't worked, but if it works that definitely helps in making MCML easier to read and port.

    Cheers,
    Andrew

  •  

    I just wanted to provide an update on this issue. Using the AssemblyResolver tip from the blog works beautifully and I re-arranged my solution so all the UI is in a separate project/assembly.

Page 2 of 2 (24 items) 12