none
Unable to add a C# class library to HTML5 Metro UI

    Question

  • I have an HTML5 Metro application project and a C# Class Library project for Metro style applications in the same solution.

    When I try and add a reference from the HTML5 application to the C# class library, I get the following errors:

    One or more of the selected items is not a valid reference for this type of project. Do you want to continue and add the references anyway?

    then when I run the app (with a line of code in the JS trying to new up the C# class) i get

    JavaScript Runtime Error: TestCsharpClass is undefined.

    Is there a setting I am missing to allow this kind of reference? The class does show up in the Object Browser.

    Thanks.

    S

     


    Check out my new C# 2010 All In One for Dummies book at Amazon!
    Wednesday, December 14, 2011 8:30 PM

Answers

  • Never mind, I figured it out.

    You need to set the Output Type to WinMD in the properties.

    S


    Check out my new C# 2010 All In One for Dummies book at Amazon!
    • Marked as answer by Bill Sempf Wednesday, December 14, 2011 8:57 PM
    Wednesday, December 14, 2011 8:56 PM