locked
App Packaging and Re-build

    Question

  • When I build my app, vs2012 puts the exe (along with other files) in \bin\x64\release directory.

    When I package my app, vs2012 puts the package files in \AppPackages directory. But it first does a rebuild to create a new exe. How can I stop the rebuilding from happening?

    My goal is to take the exe file, obfuscate it, and then put it back into \bin\x64\release directory, and then package it to create a somewhat obfuscated package.

    Sunday, February 03, 2013 4:57 PM

Answers

  • VS will always build the project before creating package and there is no option to disable it. One option would be to use MakeAppx.exe and you can use the layout which VS creates after replacing exe with new exe. You can also extend the build to add a step for obfuscating the binaries before packaging. That would be the ideal way to fix your issue. Packaging targets are hooked up in to execute before PrepareForRun. So you can change $(PrepareForRunDependsOn) = You obfuscating target;$( PrepareForRunDependsOn) so that you target is executed before PrepareForRun (which would normally be executed after build has completed). The other way to do the same is by <Target Name=” obfuscating” BeforeTargets=”PrepareForRun”> your logic </Target>. These targets can be defined in your project file.

    Thursday, February 07, 2013 12:29 AM

All replies

  • Hi phorego,

    Thank you for your question.

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
     
    Thank you for your understanding and support.


    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 05, 2013 8:53 AM
    Moderator
  • If my scenario is the norm, does it mean that no one at this point can submit an obfuscated app to the store for certification? If this is the case, can this issue be escalated to the proper channel for resolution?

    Wednesday, February 06, 2013 7:35 PM
  • VS will always build the project before creating package and there is no option to disable it. One option would be to use MakeAppx.exe and you can use the layout which VS creates after replacing exe with new exe. You can also extend the build to add a step for obfuscating the binaries before packaging. That would be the ideal way to fix your issue. Packaging targets are hooked up in to execute before PrepareForRun. So you can change $(PrepareForRunDependsOn) = You obfuscating target;$( PrepareForRunDependsOn) so that you target is executed before PrepareForRun (which would normally be executed after build has completed). The other way to do the same is by <Target Name=” obfuscating” BeforeTargets=”PrepareForRun”> your logic </Target>. These targets can be defined in your project file.

    Thursday, February 07, 2013 12:29 AM
  • Thanks.
    Thursday, February 07, 2013 3:08 PM