Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'WindowsBase
See original GitHub issueWhat version of electron-installer-windows
are you using?
0.2.0
What version of node
and npm
are you using?
npm = 3.10.3 node = 6.3.0
What operating system are you using?
Ubuntu 16.04
Can you compile the example app successfully?
If not, paste here the output of the following commands:
$ git clone https://github.com/unindented/electron-installer-windows.git
$ cd electron-installer-windows/example
$ DEBUG='electron-installer-windows' npm run build
poopie@0.0.1 build /home/suhel/Downloads/electron-installer-windows-master/example npm run clean && npm run exe32 && npm run set32 && npm run exe64 && npm run set64
poopie@0.0.1 clean /home/suhel/Downloads/electron-installer-windows-master/example rimraf dist
poopie@0.0.1 exe32 /home/suhel/Downloads/electron-installer-windows-master/example electron-packager . poopie --platform win32 --arch ia32 --out dist/ --ignore “(dist|node_modules/electron.*)” --icon resources/Icon.ico
Packaging app for platform win32 ia32 using electron v1.4.2 Wrote new app to dist/poopie-win32-ia32
poopie@0.0.1 set32 /home/suhel/Downloads/electron-installer-windows-master/example electron-installer-windows --src dist/poopie-win32-ia32/ --dest dist/installers/ia32/ --config config.json
Creating package (this may take a while) electron-installer-windows Reading package metadata from dist/poopie-win32-ia32/resources/app/package.json +0ms electron-installer-windows Creating package with options { “src”: “dist/poopie-win32-ia32/”, “dest”: “dist/installers/ia32/”, “config”: “config.json”, “icon”: “resources/Icon.ico”, “tags”: [ “Utility” ], “name”: “poopie”, “productName”: “poopie”, “description”: “An example app, built with Electron.”, “productDescription”: “An example app, built with Electron.”, “version”: “0.0.1”, “copyright”: “Copyright © 2016 Daniel Perez Alvarez”, “authors”: [ “Daniel Perez Alvarez” ], “owners”: [ “Daniel Perez Alvarez” ], “homepage”: “http://unindented.org/”, “exe”: “poopie.exe”, “animation”: “/home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/resources/animation.gif”, “requireLicenseAcceptance”: false, “noMsi”: false } +8ms electron-installer-windows Creating temporary directory +1ms electron-installer-windows Creating subdirectories under /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1 +2ms electron-installer-windows Creating contents of package +1ms electron-installer-windows Creating spec file at /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/nuget/poopie.nuspec +0ms electron-installer-windows Generating template from /home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/resources/spec.ejs +1ms electron-installer-windows Copying application to /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/poopie +0ms electron-installer-windows Generated template from /home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/resources/spec.ejs
<?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>poopie</id> <title>poopie</title>An example app, built with Electron.
<description>An example app, built with Electron.</description>
<version>0.0.1</version>
<copyright>Copyright © 2016 Daniel Perez Alvarez</copyright>
<authors>Daniel Perez Alvarez</authors>
<owners>Daniel Perez Alvarez</owners>
<projectUrl>http://unindented.org/</projectUrl>
<tags>Utility</tags>
</metadata>
<files>
<file src="locales\**" target="lib\net45\locales" />
<file src="resources\**" target="lib\net45\resources" />
<file src="*.bin" target="lib\net45" />
<file src="*.dll" target="lib\net45" />
<file src="*.pak" target="lib\net45" />
<file src="Update.exe" target="lib\net45\squirrel.exe" />
<file src="icudtl.dat" target="lib\net45\icudtl.dat" />
<file src="LICENSE" target="lib\net45\LICENSE" />
<file src="poopie.exe" target="lib\net45\poopie.exe" />
</files>
</package>
+5ms
electron-installer-windows Creating package at /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1 +242ms
electron-installer-windows Executing file mono /home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/vendor/nuget/NuGet.exe pack /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/nuget/poopie.nuspec -BasePath /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/poopie -OutputDirectory /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/nuget -NoDefaultExcludes +0ms
electron-installer-windows Error creating package: Error creating package: Error executing file (1):
mono /home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/vendor/nuget/NuGet.exe pack /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/nuget/poopie.nuspec -BasePath /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/poopie -OutputDirectory /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/nuget -NoDefaultExcludes
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. File name: ‘WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly ‘WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. File name: ‘WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ +33ms Error: Error creating package: Error executing file (1): mono /home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/vendor/nuget/NuGet.exe pack /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/nuget/poopie.nuspec -BasePath /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/poopie -OutputDirectory /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/nuget -NoDefaultExcludes
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. File name: ‘WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly ‘WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. File name: ‘WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’
at /home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/src/installer.js:273:21
at ChildProcess.<anonymous> (/home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/src/installer.js:62:5)
at emitTwo (events.js:111:20)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12) 'Error: Error creating package: Error executing file (1): \nmono /home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/vendor/nuget/NuGet.exe pack /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/nuget/poopie.nuspec -BasePath /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/poopie -OutputDirectory /tmp/electron-11696-11722-1emxla2.3u3dutbj4i/poopie_0.0.1/nuget -NoDefaultExcludes\n\nUnhandled Exception:\nSystem.IO.FileNotFoundException: Could not load file or assembly \'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\' or one of its dependencies.\nFile name: \'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\'\n[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly \'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\' or one of its dependencies.\nFile name: \'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\'\n\n at /home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/src/installer.js:273:21\n at ChildProcess.<anonymous> (/home/suhel/Downloads/electron-installer-windows-master/example/node_modules/electron-installer-windows/src/installer.js:62:5)\n at emitTwo (events.js:111:20)\n at ChildProcess.emit (events.js:191:7)\n at maybeClose (internal/child_process.js:852:16)\n at Socket.<anonymous> (internal/child_process.js:323:11)\n at emitOne (events.js:96:13)\n at Socket.emit (events.js:188:7)\n at Pipe._handle.close [as _onclose] (net.js:492:12)'
npm ERR! Linux 4.4.0-38-generic
npm ERR! argv “/home/suhel/.nvm/versions/node/v6.3.0/bin/node” “/home/suhel/.nvm/versions/node/v6.3.0/bin/npm” “run” “set32”
npm ERR! node v6.3.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! poopie@0.0.1 set32: electron-installer-windows --src dist/poopie-win32-ia32/ --dest dist/installers/ia32/ --config config.json
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the poopie@0.0.1 set32 script ‘electron-installer-windows --src dist/poopie-win32-ia32/ --dest dist/installers/ia32/ --config config.json’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the poopie package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron-installer-windows --src dist/poopie-win32-ia32/ --dest dist/installers/ia32/ --config config.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs poopie
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls poopie
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/suhel/Downloads/electron-installer-windows-master/example/npm-debug.log
npm ERR! Linux 4.4.0-38-generic
npm ERR! argv “/home/suhel/.nvm/versions/node/v6.3.0/bin/node” “/home/suhel/.nvm/versions/node/v6.3.0/bin/npm” “run” “build”
npm ERR! node v6.3.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! poopie@0.0.1 build: npm run clean && npm run exe32 && npm run set32 && npm run exe64 && npm run set64
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the poopie@0.0.1 build script ‘npm run clean && npm run exe32 && npm run set32 && npm run exe64 && npm run set64’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the poopie package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run clean && npm run exe32 && npm run set32 && npm run exe64 && npm run set64
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs poopie
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls poopie
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/suhel/Downloads/electron-installer-windows-master/example/npm-debug.log
What did you do? Please include the configuration you are using for electron-installer-windows
.
The same supplied with the package.
What did you expect to happen? It should be run and give the desired output.
What actually happened? Unable to get the installers
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top GitHub Comments
On Debian, using electron-builder and getting this same “missing WindowsBase” error, I solved this by switching to beta branch of mono. Throughout, I also used aptitude and
--full-resolver -f install
My Steps - YMMV
And this time, no error.
Good luck with your own. If this helps you, you’re welcome.
@suhel-xpendablez my suggestion would be to build on a Windows machine.