question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wwwroot folder is cached on first run and used everytime regardless of changes & Full Build Not working - Windows 10

See original GitHub issue

Hi 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
GregorBiswangercommented, Sep 25, 2018

@rexyque we can implement the native electron feature browserWindow.webContents.session.clearCache()

is that an alternative for you? PR are always welcome 😃

1reaction
EldinZenderinkcommented, Jul 16, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studion 2022 Version 17.6 Hangs on Build\Clean ...
Hi, I have upgraded my Visual Studio 2022 to the latest version 17.6.1. Since then when I try to Run\Build project it hangs...
Read more >
NET Framework 4 migration issues
Learn about migration issues between .NET Framework 3.5 Service Pack 1 and .NET Framework 4, including fixes and changes for standards ...
Read more >
ASP.NET Core Blazor Progressive Web Application (PWA)
Learn how to build a Blazor Progressive Web Application (PWA) that use modern browser features to behave like a desktop app.
Read more >
Applications try to access web cache content that belongs ...
Describes an issue where IE or Edge does not function correctly because the user's profile is owned by the Administrator account.
Read more >
android - How to clear gradle cache?
Gradle cache is located at. On Windows: %USERPROFILE%\.gradle\caches; On Mac / UNIX: ~/.gradle/caches/. You can browse to these directory ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found