Question

cmarsh on Wed, 29 Oct 2014 22:29:39


Hi - I'm going crazy trying to figure out why my build went from 7.72MB to 19MB. I don't see what I did or didn't do to create this difference. I have looked everywhere trying to find the problem / solution. A long time ago this happened and then I resolved it but now again its back to being a large exe. I have a hunch someone else is selecting something different in the project and then checking it in but I am unclear what it might be.

Next time I will take a picture with my cell phone so I remember what's been checked.


Chris

Thanks for the replies so far. To be clear I an talking about the exe that is generated when I build or publish. The exe has nearly tripled in size one-day-to the next.

Sponsored



Replies

Jack-Zhai on Thu, 30 Oct 2014 10:50:39


Hi Chris,

Thank you for posting in the MSDN forum.

To make this issue clearly, would you mind letting us know more information about this issue?

Which VS version did you use? Which kind of project did you create?

If the project file size changed, we need to check which file has been changed or it generated new file in your project folder.

So you could open your project folder, and then check the real size of every file, and get more information.

I met this issue in a VC++ project before, it is related to the .sdf file in project folder, and we could disable it under Tools -> Options -> Text Editor -> C/C++ -> Advanced.

Reference:

http://stackoverflow.com/questions/7706984/visual-studio-2010-c-project-remove-sdf-file

In addition, please also make sure that it is not the references files, for example, we set the Copy local=true, so it would copy the files automatically to our project folder.

Please share us more information if still no help.

Best Regards,

Jack

Noel Carboni on Thu, 30 Oct 2014 11:44:19


A VERY wild guess:  Linking statically vs. linking to DLLs?

 

-Noel


Detailed how-to in my eBooks:  

Configure The Windows 7 "To Work" Options
Configure The Windows 8 "To Work" Options

cmarsh on Sat, 08 Nov 2014 18:10:17


I learned the problem was with a setting in Red-Gate's SmartAssembly - by turning on "Resources Compression and Encryption" I killed the exe due to a call in my application.

Can I also please check--by any chance are you calling on GetManifestResourceNames in your application? If so, this is one of the situations in which you unfortunately can't use resource compression. (The way resource compression and encryption works is by hooking into the ResourceResolve event--when the application first needs a resource, it should call on ResourceResolve and trigger the resources to be decompressed and decrypted. However, when you use GetManifestResourceNames, this does not hit the ResourceResolve event, so we cannot decompress the resources as required.) If you do call on GetManifestResourceNames, I'm afraid you will need to disable the resource compression and encryption. :/

Jack-Zhai on Mon, 10 Nov 2014 05:42:09


Hi Chris,

Do you mean that this issue has been resolved? It is related to "Resources Compression and Encryption", am I right?

Best Regards,

Jack

cmarsh on Mon, 10 Nov 2014 13:41:18


It is resolved from this thread but not necessarily from Red-Gate. What I learned from Red-Gate is that we are using "GetManifestResourceNames" in our code and this is the root of the cause. We are looking into that next.