GoJS icon indicating copy to clipboard operation
GoJS copied to clipboard

Visual Studio bundling error

Open GeorgeMorozov opened this issue 1 year ago • 3 comments

I have a project on Framework 4.8, when I include your source through the "bundles system" built into Visual Studio I get an error: image

The problem started in the version 3.0.1 In version 2.3.17 everything worked correctly.

GeorgeMorozov avatar May 13 '24 14:05 GeorgeMorozov

I have no idea why this might happen. Does it happen if you only bundle GoJS, and none of the others?

simonsarris avatar May 13 '24 14:05 simonsarris

This bundle contains files:

  • "go-{version}.js"
  • "PolylineLinkingTool.js"
  • "Figures.js"

but they have not changed, only the version of your file go.js has changed

PolylineLinkingTool.js. from this example https://gojs.net/latest/samples/PolylineLinking.html Figures.js. from this example https://gojs.net/latest/intro/shapes.html

GeorgeMorozov avatar May 13 '24 14:05 GeorgeMorozov

I bet the problem is that your PolylineLinkingTool.js is an old one that still depends on the Diagram.inherit static function, which can no longer exist in GoJS v3+. I suggest that you copy that file from the create-gojs-kit package, either from extensions/ if just loading from a script tag or from extensionsJSM/ if importing an ES module.

Please read https://gojs.net/latest/changelog.html, and especially https://gojs.net/latest/changelog.html#Changes.

WalterNorthwoods avatar May 14 '24 11:05 WalterNorthwoods

I removed the "PolylineLinkingTool.js", but it had no effect. I had to stop minifying the bundle by calling: scriptBundle.Transforms.Clear();

GeorgeMorozov avatar May 30 '24 08:05 GeorgeMorozov

You have a work-around, so I'll close this issue.

You may want to try with the latest version: 3.0.4

WalterNorthwoods avatar Jun 06 '24 13:06 WalterNorthwoods