Announcement

Collapse
No announcement yet.

UnknownIdentifierResolveResult when referencing a static defined in another project.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    UnknownIdentifierResolveResult when referencing a static defined in another project.

    I can't demo this on Deck.net and I can't include a zip file with a demo solution... so what I'll do is explain the problem.

    Project A has a static class B that defines a constant string C

    namespace A
    {
        public static class B
        {
            public const string C = "C";
        }
    }
    Project D has a reference to project A and defines a class E that accesses the string defined in A.B.C

    namespace D
    {
        public class E
        {
            public string F = A.B.C;
        }
    }
    This solution builds but the output javascript has an UnknownIdentifierResolveResult in it:
    D.js

    /**
    * @version 1.0.0.0
    * @copyright Copyright © 2019
    * @compiler Bridge.NET 17.7.0
    */
    Bridge.assembly("D", function ($asm, globals) {
        "use strict";
        Bridge.define("D.E", {
            fields: {
                F: null
            },
            ctors: {
                init: function () {
                    this.F = [UnknownIdentifierResolveResult A].b.c;
                }
            }
        });
    });

    #2
    Is Bridge installed in the namespace A project?

    Comment


      #3
      Bridge is installed in both projects A and D.

      Comment


        #4
        We figured out what was happening and have added a feature to Bridge to support this scenario.

        https://github.com/bridgedotnet/Bridge/issues/3894

        A pull-request was created. After further review and testing, we expect to include this new feature in the next release.

        Comment

        Working...
        X