Я использую Visual Studio 2022 (17.9.3) и создал проект библиотеки .NET Framework 4.8, содержащий элементы управления с привязкой данных MVVM к моделям просмотра по такому шаблону:
Код: Выделить всё
I am seeing design-time data displayed in the control, except that as I build up the controls and build out the viewmodels, I am seeing the controls display out-dated content from the viewmodels. It is as if the designer is caching the assembly and not invalidating it as I make changes and rebuild.
One impact of this is that the designer isn't seeing newly added types (such as viewmodels), so XAML references are triggering errors.
I have tried reloading the project, reloading the solution, restarting Visual Studio, deleting the .obj and .bin folders, deleting the .vs file, all without any impact. This leads me to believe that the VS designer is caching the assembly somewhere, but I don't know where. If this is the case, where is that cache located, and how can I clear it?
EDIT:
My solution includes a WPF application which consumes the library. If I rebuild the application, the library design views update to show correctly. I looks as if there is a cache which is correctly invalidated by an application build, but not by a build of the component assembly.
Источник: https://stackoverflow.com/questions/781 ... ut-of-date
Мобильная версия