问题
I'm getting some annoying errors from Visual Studio Designer when trying to open one of my forms (Could not load type x from assembly y, even though assembly y clearly contains type x; the project builds and runs fine). It looks like Visual Studio Designer cache issue to me. I looked around and it seems like Visual Studio Designer uses a ShadowCache, normally found at
C:\Users\%UserName%\AppData\Local\Microsoft\VisualStudio\15.0_6d397e1a\Designer\ShadowCache
However, that folder is empty. This suggests to me that there must be some other cache location, since I am using designer for some other things, there should at least be something in the designer cache location...
回答1:
To clean windows forms designer project assemblies, you need to delete subforlders of ProjectAssemblies
folder which is located in %userprofile%\appdata\local\Microsoft\VisualStudio\
under one of the folders depending to your visual studio version and edition.
For example for me:
%userprofile%\appdata\local\Microsoft\VisualStudio\15.0_a26f780e\ProjectAssemblies
If you look in the folder, you see subfolders containing assemblies of your projects.
来源:https://stackoverflow.com/questions/54673091/where-is-the-visual-studio-2017-winforms-designer-cache