문제

I recently switched a windows forms application to use SQL Compact 4 database and Entity Framework. I handle the updates to the application through the application (no windows services). When an update is sent out to the device, all data is cleared (the data directory is deleted) and the exe gets replaced with a new exe.

This works fine except the next time the application is launched, Windows pops up with a message "Please Wait While Windows Configures 'Application Name'". Windows then proceeds to add back the database file automatically and set my exe back to the previous version.

Why is Windows adding the old database file and reverting my exe? How do I stop this from happening?

screenshot

도움이 되었습니까?

해결책

It appears that adding the database to the program data folder in the installer project caused this. Removing the file from there and programmatically adding the database file there resolved this issue.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top