3

I'm trying to add a large file (3.6gb) as an embedded resource in Visual Studio 2012. Is this possible? I've tried with files ~1gb as well and they fail too. Already have a few other files ranging from 5-60mb and they work fine.

Getting this error message when compiling: Error 2 Unexpected error writing metadata to file 'Not enough storage is available to complete this operation.

(Running win8 x64, loads of ram and disk space. Seriously doubt that's where the problem lies..)

  • 3
    Just curious, why you have to embed 3.6G into assembly? – cuongle Apr 16 '13 at 17:10
  • 1
    Just out of curiosity, **why**? – ken2k Apr 16 '13 at 17:11
  • 2
    `EXE File` with 3.6Gb embedded resource = 3.6Gb+ `EXE File`.... EPIC... – Federico Berasategui Apr 16 '13 at 17:11
  • 1
    Are you wrapping a full HD movie?! – Belogix Apr 16 '13 at 17:12
  • 1
    Just because you're working in 64 bit Windows doesn't necessarily mean you can have 64 bit single objects. See http://stackoverflow.com/questions/1087982/single-objects-still-limited-to-2-gb-in-size-in-clr-4-0 – Robert Harvey Apr 16 '13 at 17:14
  • It's an installer of sorts, first thought that struck on how to get it to work the way I wan't was to try to embed it :) Anyways, sounds like it's not really possible, so will go with another approach. – user2287497 Apr 16 '13 at 17:29
  • Microsoft Visual Studio is a 32 bit program. It can only use 3 GB (max) memory, regardless of how much memory you've installed. You see, that's exactly why I wanna see a 64 bit version. – ElectroBit Apr 12 '16 at 21:12

1 Answers1

1

Don't embbed such a large file, it will cause problems to the compiler! Add it as a linked resource.

Yami
  • 1,405
  • 1
  • 11
  • 16
  • 3
    While I agree with the "don't do it" part, this doesn't answer the question (which problems are you talking about?) – ken2k Apr 16 '13 at 17:25
  • I didn't even know you had the option. It's just locked at linked resource for non-media (pictures, music, etc) files. – ElectroBit Apr 12 '16 at 21:10