.resx File Size Issue
I am working in Visual Studio 2010, on a fairly beefy machine. I have a solution with a few different projects under it like so
Solution
Activations
DatabaseManager
Library
VideoResources
WindowsNewUI <--- start up project
In video Resources I have one .resx file in which I have placed about 700mb of compressed videos. When I build this project by itself, the build succeeds. Then I hit f5 to run my new UI and I am given this error.
Error 1 Unexpected error writing metadata to file VideoResources.dll -- 'Not enough storage is available to complete this operation.
I have done some digging and it seems to be a ram issue. I have tried the /3开发者_JS百科gb fix by editing the .ini file, but this does not solve the problem.
My question is what the heck am I doing wrong here, I know that 700mb is a lot of video, but there is no reason that that specif project should build, but then fail the rest of my project, is something else going on here? Does the access modifier of that projects resource file mater? How can I resolve this issue?
Also if I place about half of my video files in the .resx then everything works just fine.
My suggestion would be to not store the video in any type of embedded resource. Thats going to cause your app to us a ton of memory while it is running. I would suggest that you instead just leave the files on disk and load them from there. This would also fix your problem.
The resource file infrastructure is probably not designed to scale to these file sizes. Remember that every operation in a resx file happens in memory, and you're using a garbage-collected language.
Why not just store the video(s) in the filesystem and read them as needed?
精彩评论