Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 140141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:33:41+00:00 2026-05-11T07:33:41+00:00

I have a WinForms app that I deploy using ClickOnce. In the application project

  • 0

I have a WinForms app that I deploy using ClickOnce. In the application project I have some files marked as Content which is also marked as ‘Data File’ in the Application Files dialog in the Publish settings. I have also some content files that are marked as ‘Include Auto’.

When I publish, install the application and then execute it crashes immediately on startup with a DirectoryNotFoundException (full stacktrace below).

Looking into the application folder I can find all files that was marked ‘Include Auto’, neatly placed along with the executables. The files marked as ‘Data File’ though is not installed (I have checked both the executable folders and the Data folder).

Note that publish and install is both done from a folder on my local machine, not via a website.

If I change from ‘Data File’ to standard include on all content files, everything works as a charm.

I’m running (gasp) Windows XP SP3 and .Net 3.5 SP1.

System.IO.DirectoryNotFoundException was unhandled Message=’The system cannot find the path specified. (Exception from HRESULT: 0x80070003)’ Source=’mscorlib’ StackTrace: at System.Deployment.Internal.Isolation.IActContext.SetApplicationRunningState(UInt32 dwFlags, UInt32 ulState, UInt32& ulDisposition) at System.ActivationContext.SetApplicationState(ApplicationState s) at System.AppDomain.SetupDomainForApplication(ActivationContext activationContext, String[] activationData) at System.AppDomain.SetupApplicationHelper(Evidence providedSecurityInfo, Evidence creatorsSecurityInfo, ApplicationIdentity appIdentity, ActivationContext activationContext, String[] activationData) at System.AppDomain.SetDomainManager(Evidence providedSecurityInfo, Evidence creatorsSecurityInfo, IntPtr parentSecurityDescriptor, Boolean publishAppDomain) at System.AppDomain.SetDefaultDomainManager(String fullName, String[] manifestPaths, String[] activationData) InnerException:

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T07:33:41+00:00Added an answer on May 11, 2026 at 7:33 am

    After some more trial and error I found that the DirectoryNotFound exception occurs when my data files are located in subfolders of a subfolder. If data files are located in the project root or in a first level subfolder everything works as expected.

    The problem seems also to be related to the fact that in some of these subfolders I had some files marked as Include and some as Data. This probably causes some confusion during deployment in which the data files doesn’t get deployed.

    Finally, what I had to do to get things the way I wanted was to uninstall any previous version of the app. Next, organizing my data files in the project like this:

     \Testfiles\Filegroup1\data1.txt \Testfiles\Filegroup1\data2.txt \Testfiles\Filegroup2\moredata1.txt \Testfiles\Filegroup2\moredata2.txt 

    Then I mark all files within each folder as Data. Now everything gets deployed nice and dandy and the loader doesn’t crash at startup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 203k
  • Answers 203k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try utf-8 for start. Website you download might have different… May 12, 2026 at 8:31 pm
  • Editorial Team
    Editorial Team added an answer Question 1 In this case, following Meyers's algorithm will give… May 12, 2026 at 8:31 pm
  • Editorial Team
    Editorial Team added an answer $('*').data('tag', "tagged"); $('li').each( function() { if( $(this).data('tag') === "tagged" )… May 12, 2026 at 8:31 pm

Related Questions

This is related to my early post today: link text So now I have
i have a winforms applicatoin that has a lot of implementations of IOrderDataLoader. Other
I'm attempting to deploy a WinForms app in a Citrix environment. It's been working
We have a WinForms app, written in VB.NET (CLR 2.0), that does a lot

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.