<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom Visual Setup Exceptions (pbi-visuals-api 2.2.2, pbi-visuals-utils-dataviewutils 1.5.0) in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Setup-Exceptions-pbi-visuals-api-2-2-2-pbi-visuals/m-p/576698#M17781</link>
    <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the following exception when running pbiviz on a new visual&lt;/P&gt;&lt;PRE&gt;c:\Projects\visuals\powerbi\test2&amp;gt;pbiviz start
info Building visual...
error TYPESCRIPT /visualPlugin.ts : (8,103) Property 'visual' does not exist on type 'typeof extensibility'.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp;&lt;/SPAN&gt;used this, just to clarify the steps to produce these exceptions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;pbiviz new {name}&lt;/LI&gt;&lt;LI&gt;cd {dir to folder}&lt;/LI&gt;&lt;LI&gt;added latest (e.g. 2.2.2)&amp;nbsp;powerbi-visuals-api into dependencies of project by executing command npm install --save powerbi-visuals-api.&lt;/LI&gt;&lt;LI&gt;added latest (e.g. 5.7.0) d3&amp;nbsp;into dependencies of project by executing command npm install --save d3.&lt;/LI&gt;&lt;LI&gt;added latest (e.g.&lt;SPAN&gt; 5.0.1&lt;/SPAN&gt;) d3 types into dependencies of project by executing command npm install --save&lt;SPAN&gt; @types/d3&lt;/SPAN&gt;.&lt;/LI&gt;&lt;LI&gt;ran npm install for good measure&lt;/LI&gt;&lt;LI&gt;removed all modules definitions from each file of source code (e.g. from ./src/visual.ts and ./src/settings.ts&lt;PRE&gt;&lt;SPAN class="nx"&gt;module&lt;/SPAN&gt; &lt;SPAN class="nx"&gt;powerbi&lt;/SPAN&gt;&lt;SPAN class="p"&gt;.&lt;/SPAN&gt;&lt;SPAN class="nx"&gt;extensibility&lt;/SPAN&gt;&lt;SPAN class="p"&gt;.&lt;/SPAN&gt;&lt;SPAN class="nx"&gt;visual&lt;/SPAN&gt; &lt;SPAN class="p"&gt;{...}&lt;/SPAN&gt;&lt;/PRE&gt;(see "Changes inside of the visuals sources" here: &lt;A href="https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/migrating-to-powerbi-visuals-tools-3-0/" target="_blank"&gt;https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/migrating-to-powerbi-visuals-tools-3-0/&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;added these imports to ./src/visual.ts for interfaces and classes&lt;BR /&gt;&lt;PRE&gt;import powerbi from "powerbi-visuals-api";
import IViewport = powerbi.IViewport;
import IVisualHost = powerbi.extensibility.visual.IVisualHost;
import DataViewMetadataColumn = powerbi.DataViewMetadataColumn;
import DataViewMetadata = powerbi.DataViewMetadata;
import PrimitiveValue = powerbi.PrimitiveValue;
import VisualObjectInstance = powerbi.VisualObjectInstance;
import EnumerateVisualObjectInstancesOptions = powerbi.EnumerateVisualObjectInstancesOptions;
import DataViewObjectPropertyIdentifier = powerbi.DataViewObjectPropertyIdentifier;
import DataView = powerbi.DataView;
import ValueTypeDescriptor = powerbi.ValueTypeDescriptor;
import Fill = powerbi.Fill;
import VisualConstructorOptions = powerbi.extensibility.visual.VisualConstructorOptions;
import VisualUpdateOptions = powerbi.extensibility.visual.VisualUpdateOptions;
import DataViewPropertyValue = powerbi.DataViewPropertyValue;
import SortDirection = powerbi.SortDirection;
import IVisual = powerbi.extensibility.visual.IVisual;
import VisualObjectInstanceEnumeration = powerbi.VisualObjectInstanceEnumeration;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;added these imports to ./src/settings.ts&lt;BR /&gt;&lt;PRE&gt;import { dataViewObjectsParser } from "powerbi-visuals-utils-dataviewutils";
import DataViewObjectsParser = dataViewObjectsParser.DataViewObjectsParser;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;removed settings specific functions&lt;BR /&gt;&lt;PRE&gt;private static parseSettings(dataView: DataView): VisualSettings {
            return VisualSettings.parse(dataView) as VisualSettings;
        }

        /** 
         * This function gets called for each of the objects defined in the capabilities files and allows you to select which of the 
         * objects and properties you want to expose to the users in the property pane.
         * 
         */
        public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
            return VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options);
        }&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;updated tsconfig to:&lt;BR /&gt;&lt;PRE&gt;{
  "compilerOptions": {
    "allowJs": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "ES6",
    "module": "amd",
    "sourceMap": true,
    "outDir": "./.tmp/build/",
    "moduleResolution": "node"
  },
  "files": [
    ".api/v2.2.0/PowerBI-visuals.d.ts",
    "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.d.ts",
    "node_modules/powerbi-visuals-api/index.d.ts",
    "src/settings.ts",
    "src/visual.ts"
  ]
}&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;updated pbiviz.json to:&amp;nbsp;&lt;BR /&gt;&lt;PRE&gt;{
  "visual": {
    "name": "test2",
    "displayName": "test2",
    "guid": "test22E2F85DEE16141ED87144301F2DFC4C8",
    "visualClassName": "Visual",
    "version": "1.0.0",
    "description": "",
    "supportUrl": "",
    "gitHubUrl": ""
  },
  "apiVersion": "2.2.0",
  "author": {
    "name": "",
    "email": ""
  },
  "assets": {
    "icon": "assets/icon.png"
  },
  "externalJS": [
    "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.js",
    "node_modules/powerbi-visuals-api/index.js",
    "node_modules/d3/d3.min.js"
  ],
  "style": "style/visual.less",
  "capabilities": "capabilities.json",
  "dependencies": "dependencies.json",
  "stringResources": []
}&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;pbiviz start&lt;/LI&gt;&lt;LI&gt;Exception is shown&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the full source code to this example, goto: &lt;A href="https://github.com/mrogunlana/powerbi-2.2.0-example" target="_self"&gt;https://github.com/mrogunlana/powerbi-2.2.0-example&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help in advance!&lt;/P&gt;</description>
    <pubDate>Sat, 01 Dec 2018 19:57:30 GMT</pubDate>
    <dc:creator>mrogunlana</dc:creator>
    <dc:date>2018-12-01T19:57:30Z</dc:date>
    <item>
      <title>Custom Visual Setup Exceptions (pbi-visuals-api 2.2.2, pbi-visuals-utils-dataviewutils 1.5.0)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Setup-Exceptions-pbi-visuals-api-2-2-2-pbi-visuals/m-p/576698#M17781</link>
      <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the following exception when running pbiviz on a new visual&lt;/P&gt;&lt;PRE&gt;c:\Projects\visuals\powerbi\test2&amp;gt;pbiviz start
info Building visual...
error TYPESCRIPT /visualPlugin.ts : (8,103) Property 'visual' does not exist on type 'typeof extensibility'.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp;&lt;/SPAN&gt;used this, just to clarify the steps to produce these exceptions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;pbiviz new {name}&lt;/LI&gt;&lt;LI&gt;cd {dir to folder}&lt;/LI&gt;&lt;LI&gt;added latest (e.g. 2.2.2)&amp;nbsp;powerbi-visuals-api into dependencies of project by executing command npm install --save powerbi-visuals-api.&lt;/LI&gt;&lt;LI&gt;added latest (e.g. 5.7.0) d3&amp;nbsp;into dependencies of project by executing command npm install --save d3.&lt;/LI&gt;&lt;LI&gt;added latest (e.g.&lt;SPAN&gt; 5.0.1&lt;/SPAN&gt;) d3 types into dependencies of project by executing command npm install --save&lt;SPAN&gt; @types/d3&lt;/SPAN&gt;.&lt;/LI&gt;&lt;LI&gt;ran npm install for good measure&lt;/LI&gt;&lt;LI&gt;removed all modules definitions from each file of source code (e.g. from ./src/visual.ts and ./src/settings.ts&lt;PRE&gt;&lt;SPAN class="nx"&gt;module&lt;/SPAN&gt; &lt;SPAN class="nx"&gt;powerbi&lt;/SPAN&gt;&lt;SPAN class="p"&gt;.&lt;/SPAN&gt;&lt;SPAN class="nx"&gt;extensibility&lt;/SPAN&gt;&lt;SPAN class="p"&gt;.&lt;/SPAN&gt;&lt;SPAN class="nx"&gt;visual&lt;/SPAN&gt; &lt;SPAN class="p"&gt;{...}&lt;/SPAN&gt;&lt;/PRE&gt;(see "Changes inside of the visuals sources" here: &lt;A href="https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/migrating-to-powerbi-visuals-tools-3-0/" target="_blank"&gt;https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/migrating-to-powerbi-visuals-tools-3-0/&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;added these imports to ./src/visual.ts for interfaces and classes&lt;BR /&gt;&lt;PRE&gt;import powerbi from "powerbi-visuals-api";
import IViewport = powerbi.IViewport;
import IVisualHost = powerbi.extensibility.visual.IVisualHost;
import DataViewMetadataColumn = powerbi.DataViewMetadataColumn;
import DataViewMetadata = powerbi.DataViewMetadata;
import PrimitiveValue = powerbi.PrimitiveValue;
import VisualObjectInstance = powerbi.VisualObjectInstance;
import EnumerateVisualObjectInstancesOptions = powerbi.EnumerateVisualObjectInstancesOptions;
import DataViewObjectPropertyIdentifier = powerbi.DataViewObjectPropertyIdentifier;
import DataView = powerbi.DataView;
import ValueTypeDescriptor = powerbi.ValueTypeDescriptor;
import Fill = powerbi.Fill;
import VisualConstructorOptions = powerbi.extensibility.visual.VisualConstructorOptions;
import VisualUpdateOptions = powerbi.extensibility.visual.VisualUpdateOptions;
import DataViewPropertyValue = powerbi.DataViewPropertyValue;
import SortDirection = powerbi.SortDirection;
import IVisual = powerbi.extensibility.visual.IVisual;
import VisualObjectInstanceEnumeration = powerbi.VisualObjectInstanceEnumeration;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;added these imports to ./src/settings.ts&lt;BR /&gt;&lt;PRE&gt;import { dataViewObjectsParser } from "powerbi-visuals-utils-dataviewutils";
import DataViewObjectsParser = dataViewObjectsParser.DataViewObjectsParser;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;removed settings specific functions&lt;BR /&gt;&lt;PRE&gt;private static parseSettings(dataView: DataView): VisualSettings {
            return VisualSettings.parse(dataView) as VisualSettings;
        }

        /** 
         * This function gets called for each of the objects defined in the capabilities files and allows you to select which of the 
         * objects and properties you want to expose to the users in the property pane.
         * 
         */
        public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
            return VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options);
        }&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;updated tsconfig to:&lt;BR /&gt;&lt;PRE&gt;{
  "compilerOptions": {
    "allowJs": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "ES6",
    "module": "amd",
    "sourceMap": true,
    "outDir": "./.tmp/build/",
    "moduleResolution": "node"
  },
  "files": [
    ".api/v2.2.0/PowerBI-visuals.d.ts",
    "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.d.ts",
    "node_modules/powerbi-visuals-api/index.d.ts",
    "src/settings.ts",
    "src/visual.ts"
  ]
}&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;updated pbiviz.json to:&amp;nbsp;&lt;BR /&gt;&lt;PRE&gt;{
  "visual": {
    "name": "test2",
    "displayName": "test2",
    "guid": "test22E2F85DEE16141ED87144301F2DFC4C8",
    "visualClassName": "Visual",
    "version": "1.0.0",
    "description": "",
    "supportUrl": "",
    "gitHubUrl": ""
  },
  "apiVersion": "2.2.0",
  "author": {
    "name": "",
    "email": ""
  },
  "assets": {
    "icon": "assets/icon.png"
  },
  "externalJS": [
    "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.js",
    "node_modules/powerbi-visuals-api/index.js",
    "node_modules/d3/d3.min.js"
  ],
  "style": "style/visual.less",
  "capabilities": "capabilities.json",
  "dependencies": "dependencies.json",
  "stringResources": []
}&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;pbiviz start&lt;/LI&gt;&lt;LI&gt;Exception is shown&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the full source code to this example, goto: &lt;A href="https://github.com/mrogunlana/powerbi-2.2.0-example" target="_self"&gt;https://github.com/mrogunlana/powerbi-2.2.0-example&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 01 Dec 2018 19:57:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Setup-Exceptions-pbi-visuals-api-2-2-2-pbi-visuals/m-p/576698#M17781</guid>
      <dc:creator>mrogunlana</dc:creator>
      <dc:date>2018-12-01T19:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual Setup Exceptions (pbi-visuals-api 2.2.2, pbi-visuals-utils-dataviewutils 1.5.0)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Setup-Exceptions-pbi-visuals-api-2-2-2-pbi-visuals/m-p/576722#M17782</link>
      <description>&lt;P&gt;Ok, I answered my own question: for all those risk takers out there willing to take a deep dive into&amp;nbsp;powerbi-visuals-tools 3.0, but have an older version installed pay close attention to this article: &lt;A href="https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/migrating-to-powerbi-visuals-tools-3-0/" target="_self"&gt;https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/migrating-to-powerbi-visuals-tools-3-0/&lt;/A&gt;&amp;nbsp;with special emphasis on the section titled: "How to install powerbi-visuals-tools@beta"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What this article fails to mention is that if you have an existing version of the tools installed globally on npm, instead of simply running the command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;npm install powerbi-visuals-tools@beta&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You must update your global instance as well with:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;npm install powerbi-visuals-tools@beta &lt;STRONG&gt;-g&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure you includ the global flag "-g" to update your local toolset. Then, create a new visual like so:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;pbiviz new {name}&lt;/PRE&gt;&lt;P&gt;and run it with the following command:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;npm run start&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and you will see the new webpack runner in the command window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;**note: I had to update my security certificate as well with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;pbiviz --install-cert&lt;/PRE&gt;&lt;P&gt;follow the prompts after you run this command and you should be good to go. Hopefully this helps someone &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Dec 2018 03:54:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Setup-Exceptions-pbi-visuals-api-2-2-2-pbi-visuals/m-p/576722#M17782</guid>
      <dc:creator>mrogunlana</dc:creator>
      <dc:date>2018-12-02T03:54:20Z</dc:date>
    </item>
  </channel>
</rss>

