Respecting Your Investments: How to Leverage Your Existing Code in a New Windows Runtime LOB App

Play Respecting Your Investments: How to Leverage Your Existing Code in a New Windows Runtime LOB App

The Discussion

  • User profile image

    Great talk, very good! Beautiful sample for a Brokered WinRT component implementation. I had. however a difficult time replicating it.
    There are a couple of gotcha's I would like two point out:
    1) The dll proxy path must not contain spaces (or at least not be the user/Documents/.../Projects path)
    2) When attaching the debugger you attach to DLLHOST.DLL (but you must not change 'clrhost.dll' in the manifest)
    3) for some weird reason the manifest edit would not accept pasted coded, giving a 'Package/Extensions' must be empty exception whatever I tried. When entered manually, i.e. layer by layer' it worked fine. (although resulting in the exact same code, I double checked)
    <Extension Category="windows.activatableClass.inProcessServer">
    <ActivatableClass ActivatableClassId="PsaHidRT.HidExplorer" ThreadingModel="both">
    <ActivatableClassAttribute Name="DesktopApplicationPath" Type="string"
    // The error when manifest edited by Paste:
    Error 3 App manifest validation failed. Value of element '/Package/Extensions' must be empty string. C:\Sample\PsaHidRT\HidTester2\Package.appxmanifest 52 HidTester2
    4) The samples supplied by microsoft mostly would not build on my machine (all default and up-to-date VS2013 Pro with Update2 installed)
    That all folks...

  • User profile image

    Regarding the above point 3: weird manifest error

    I think I figured out what caused the above error:

    the 'Getting Started' document, supplied with the templates (Brokered WinRT...) package sample contains angle brackets within the quotes to replace, this confuses the xaml parser, so I suggest you edit first and then copy and paste

    PS It also has an additional step 7, not mentioned in the talk, which I did not do and apparently did not need.

  • User profile image

    Gotcha's further findings...

    1) The Brokered WinRT Component templates are not up-to-date, BUT IS DOES WORK. At least the 'component'-project is not recognized as such by the VS IDE (open the project properties and the project type is blank and you can't change it to 'RT component).

    2) The fact that you attach to dllhost.dll while the manifest says clrhost.dll is explained by the pre-process step in the MyComponent.csproj file

    $(WINDIR)\syswow64\windowspowershell\v1.0\powershell.exe" ... rocessName -eq \"dllhost\" ...

Add Your 2 Cents