Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Need an working example of custom visual source code

So I have been trying to get this custom visual working following https://docs.microsoft.com/en-us/power-bi/developer/custom-visual-develop-tutorial   However, except that very first example of "U...
  • dm-p's avatar
    7 years ago

    The tutorial is outdated and the methods to generate everything are a little different in the new tooling. I posted this in another thread yesterday which may help out in terms of understanding changes between versions and finding some valid v3 source code, but there really needs to be a newer tutorial produced to help newcomers avoid these kinds of issues going forward.

    If you want to specifically work with the version in the tutorial you posted, there's a step under the Installing Packages heading that states the following to install the tools:

    npm i -g powerbi-visuals-tools

    Try this instead:

    npm i -g [email protected]

    After that, run:

    pbiviz --version

    This should show 2.5.0.

    Then, run this in the root of your project:

    pbiviz update 2.5.0

    This will allow your code to compile, if everything looks as per the tutorial. If not, then you can repeat the steps from Creating and installing a certificate (if changing toolset version you need to generate a new certificate, otherwise the developer visual won't connect) and then creating a new visual project as normal.

    Note that you will still need to contend with migration to the v3 tooling, but if you just want to explore the custom visuals framework and TypeScript platform to see how things work and learn the basics then this should get you moving.

    Good luck!

    Daniel

    Note that