locked
Files from Extension SDKs cannot be specified in the app manifest

    Question

  • Consider I have created a framework for rapid Metro app prototyping and put all the required files in an extension SDK. All the specific app would have to do is provide its own application.js file that the default.html from the the SDK includes as script file.

    However, its currently not possible to reference SDK provided resources in the app manifest file. Is there a reason for this?

    Monday, June 4, 2012 1:44 PM

Answers

  • How are you specifying the start page in your manifest file?  I just did what you describe, and it worked fine for me.  The only thing you need to do is remember to add the name of the SDK to the path and you need to open the manifest via 'View Code' since you can only select files in your project from the manifest designer from what I can tell.

    E.g. this works in my manifest:

    <Applications>
        <Application 
          Id="App"
          StartPage="ThirdPartySDK\html\index.html">
    
          <VisualElements
            DisplayName="App3"
            Logo="images\logo.png"
            SmallLogo="images\smalllogo.png"
            Description="App3"
            ForegroundText="light"
            BackgroundColor="#464646">
    
            <DefaultTile ShowName="allLogos" />
            <SplashScreen Image="images\splashscreen.png" />
    
          </VisualElements>
        </Application>
      </Applications>

    The content of that index.html file is shown when I launch in F5.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, June 6, 2012 8:33 PM

All replies

  • You would need to stream them or copy them via a wizard ala Visual studio.


    Jeff Sanders (MSFT)

    Tuesday, June 5, 2012 6:30 PM
    Moderator
  • Is there an example of an SDK already doing this? Or would we have to develop an IDE extension for that streaming or copying?
    Tuesday, June 5, 2012 7:09 PM
  • No there is no sample.  Before you even consider that option I would recommend that you do not do that.  If you have any js code it would not be cached ala bytecode caching and result in worse performance than if you simply had a wizard to create a project that copied the files in.


    Jeff Sanders (MSFT)

    Tuesday, June 5, 2012 7:14 PM
    Moderator
  • Are you saying the WinJS code (that also comes from an Extension SDK named WinJS) is not compiled to bytecode also?
    Tuesday, June 5, 2012 7:20 PM
  • No, I am saying if you dynamically include it, it is not optimized.  See: http://msdn.microsoft.com/en-us/library/windows/apps/hh849088

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, June 5, 2012 7:33 PM
    Moderator
  • Uhmm Jeff, must be an misunderstanding.

    I want to create an SDK that contains a "default.html" that I want to reference in the apps manifest. The default.html looks like this:

    <html>
      <head>
        <script src="/js/application.js">
    ...

    But in the CP/RP I cannot reference the default.html in the app manifest as "//mysdkid/default.html". The question is: Why is that not possible and are SDK only supposed to provide script content, not assets that can be referenced from the app manifest?

    Tuesday, June 5, 2012 7:40 PM
  • How are you specifying the start page in your manifest file?  I just did what you describe, and it worked fine for me.  The only thing you need to do is remember to add the name of the SDK to the path and you need to open the manifest via 'View Code' since you can only select files in your project from the manifest designer from what I can tell.

    E.g. this works in my manifest:

    <Applications>
        <Application 
          Id="App"
          StartPage="ThirdPartySDK\html\index.html">
    
          <VisualElements
            DisplayName="App3"
            Logo="images\logo.png"
            SmallLogo="images\smalllogo.png"
            Description="App3"
            ForegroundText="light"
            BackgroundColor="#464646">
    
            <DefaultTile ShowName="allLogos" />
            <SplashScreen Image="images\splashscreen.png" />
    
          </VisualElements>
        </Application>
      </Applications>

    The content of that index.html file is shown when I launch in F5.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, June 6, 2012 8:33 PM