I'm pretty new at making a windows application (ASP background).

I have successfully developed a small WinForm application that does nothing fancy.

It runs fine it debug mode and operates as expected.

I build the solution and is produces the executable in my release folder bin\release.

I can then run this executable perfectly fine.

If I then move the contents of my release folder (copy & paste) to another location - e.g. my desktop - it will not work.

I get a "has stopped working" error and when expanding the details it says:

Description:
  Stopped working

Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01: someapp.exe
  Problem Signature 02: 1.3.0.0
  Problem Signature 03: 516c5a24
  Problem Signature 04: mscorlib
  Problem Signature 05: 4.0.0.0
  Problem Signature 06: 50484033
  Problem Signature 07: 3fdb
  Problem Signature 08: 105
  Problem Signature 09: System.IO.DirectoryNotFound
  OS Version:   6.0.6002.2.2.0.256.6
  Locale ID:    2057

I'm clueless! It runs fine in the release folder, it runs fine in debug mode, it runs fine in release mode.

Any help would be great.

Recommended Answers

All 4 Replies

You could try the publish option then run the setup.exe to install the app. It should run then.

I have also tried to publish with OneClick etc..it install and then fails with the same above error.

Found the issue.

I had a hard coded resource:

            base.Icon = new System.Drawing.Icon(@"..\..\Images\f_icon.ico");
            base.Visible = true;

To set the toolbar icon and windows icon..removed it and it works fine..

Is there a better way to set the icon of the toolbar?

In solution explorer, rightclick Properties to Open(This is not the properties window)
A window opens, click on the Applications tab. Here you can browse for an application icon, that will be embedded in your solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.