wwwroot folder is cached on first run and used everytime regardless of changes & Full Build Not working - Windows 10
See original GitHub issueHi I’ve been preparing to build an application with electron and have only truly got into it today after spending three months learning VueJs inside out. I also upgraded my windows 10 machine last week to the latest 1803 release. im also using Visual Studio 2017 Community 15.6.4 But when I create a new project and put my VueJS dist/build.js folder/javascript in the wwwroot folder and run “dot net electron start” the javascript VueJs application will work very well in the electron application. the problem is when I change the vuejs distribution file in wwwroot. the old one is cached some were in the electron.net build system on the first run and it won’t update to reflect the new javascript file eveytime i subsequently use “dot net electron start”. the other problem is that it won’t do a full build at all when I do “dotnet electronize build /target win” and I get the following error:
$ dotnet electronize build /target win
Build Electron Application...
Unhandled Exception: System.AggregateException: One or more errors occurred. (The given key was not present in the dictionary.) ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at ElectronNET.CLI.Commands.BuildCommand.<ExecuteAsync>b__13_0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at ElectronNET.CLI.Program.Main(String[] args)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top GitHub Comments
@rexyque we can implement the native electron feature browserWindow.webContents.session.clearCache()
is that an alternative for you? PR are always welcome 😃
Same, here, really annoying.
I found deleting the Electron directory generated by Electron (Path:
C:\Users\<user>\AppData\Roaming\Electron
) fixed it.So if you want to continue using this, here is a quick and dirty hack (not sure if it works for everyone, and you will loose all sessions and all things related to the electron directory):
Create a bat file with the following line:
rmdir /S /Q "%appdata%/Electron" & dotnet electronize start
Save it in your project directory where you normally execute the
dotnet electronize start
command.Go to visual studio and open the project settings, and do something along this line:
This is definitely not how it should be, and I hope this will eventually be fixed, but for now, this works for me.