-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SaveChangesAsync throws MissingManifestResourceException when run in Release mode #1037
Comments
I have the same problem. It only exist in release mode deployed to device. In emulator debug & release work fine. Also it looks like it happens mostly for the first SaveChanges (when first record is inserted). |
This looks like a general issue with resources in portable class libraries. See this StackOverflow question. I can easily repro outside of EF:
|
I've got to the bottom of this. While bundling the app, all resources in dependencies that are not for a language used by the main app are stripped out. To prevent EF's resources from being stripped out, add the following assembly-level attribute to your app. using System.Resources;
[assembly: NeutralResourcesLanguage("en-US")] Or, if you are using resources in your app, make sure at least one is for the |
I'll follow up to see if we can get this behavior changed to not strip out the neutral resources in dependencies. |
Closing as external. Please see Visual Studio and .NET Framework Feedback #991028 on Microsoft Connect. |
When using EF7 in a Windows Phone 8.1 project, with the debug solution configuration set, calling SaveChangesAsync to save the entity changes runs as expected and saves the changes.
When it's switched to release mode, it throws the following in StateManager.SaveChangesAsync:
Again, this only happens when I set the solution to release. In debug mode, it saves fine. This also only seems to occur in my Windows Phone 8.1 solution. Running the same functions under Windows 8.1, in either configuration, works as expected.
The text was updated successfully, but these errors were encountered: