Ask a questionAsk a question
 

QuestionClickOnce and DEP

  • Monday, June 23, 2008 8:17 PMRowena2 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

     

    I have an application built in Visual Studio 2005 and compiled on XP. I deploy it with ClickOnce. It works fine on XP and Vista. I added an ActiveX control (ESRI's ArcReader control) and now it crashes on Vista.

     

    I added:

     

    call "$(DevEnvDir)..\tools\vsvars32.bat"
    editbin.exe /NXCOMPAT:NO "$(TargetPath)"

     

    to my post build. If I just copy the executable over to the Vista machine it will run. But if I try to deploy it with ClickOnce it crashes.

     

    Also, if I turn off DEP on the Vista machine with:

     

    bcdedit.exe /set {current} nx AlwaysOff

     

    my application works. When I turn DEP back on it doesn't work. So the problem is definately something with ClickOnce and DEP.

     

    Any ideas why my post build commands aren't working?

     

    Also, I tried turning DEP on with the Optout option. But Vista won't let me add my application to the exclusion list. Any ideas about this?

     

    Thanks!

All Replies

  • Tuesday, June 24, 2008 2:13 AMRobinDotNetMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I don't know what DEP is, and I don't understand what you are doing with the post-build commands.

     

    If you want something included in your deployment, then you must add it to your project in Visual Studio, set the Build Action to "Content", and "copy to output directory" to "Copy Always".

     

    The component will be deployed along with the rest of your application. It will reside in System.WindowsForms.Application.StartupPath (programmatically speaking).

     

    Hope this helps.

    RobinS.

    GoldMail.com

     

  • Monday, June 30, 2008 3:27 AMJun Wang Tim Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Rowena2,

     

    We are changing the issue type to “Comment” because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question” by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

    Thank you!

     

    Best wishes,

    Jun Wang

     

  • Monday, November 02, 2009 4:55 PMKJohnstone Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello

    I am having the same problem.

    DEP is Data Execution Prevention.

    The editbin.exe utility is used to mark an executable as not compatible with the NX (no-execute) bit.  My app is a WPF smart client (ie ClickOnce) app which has an activeX conrtol which is not DEP/NX compatible.  Using editbin works locally, but it seems that work is undone, and the app fails, when packaged with ClickOnce.

    Is this by design, and is there anything I can do to correct this?

    Thanks
    Kieren Johnstone
  • Wednesday, November 04, 2009 1:10 PMKJohnstone Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Is the usual routine to keep bumping this until someone says something?