C# exe runs only with .Net Framewrok SDK 2.0 RRS feed

  • Question

  • Hi,

    I created a Setup package(including my C# code) to be run in which I suppose any Windows environment(W2000 and later).

    In my PC I have Installed VS2005, .NET  Framework 2.0, .Net Framework SDK 2.0(already installed with VS2005), running Wxp SP2.

    I can install in my PC the Setup package I created and I also can run the program .exe file installed, running very well!

    In other circumstance, I successfully installed the Setup package in other XP machine with .net Framework 2.0 on it, but the .exe program did not run. Then, I installed the .Net Framework SDK 2.0 in order to debug where the .exe program is stopping, and ... oh surprise! After installing the SDK I clicked my .exe program and it ran!

    I did the same procedure installing on a W2000 SP4 OS. It ran also only with the SDK 2.0 installed!.

    Seems to be that there is something in the SDK 2.0 that is installed in my Windows system and allows to run my programs well.

    I've been trying by searching on the web, but no success.

    Could you tell me what that SDK 2.0 has that my Setup project doesn't?

    Thanks in advance,


    • Edited by Alshephard Thursday, September 4, 2008 2:36 PM Just re-edited.
    • Moved by Figo Fei Tuesday, September 9, 2008 3:48 AM redirect (Moved from .NET Framework Setup to Where is the Forum For…?)
    Thursday, September 4, 2008 2:26 PM


All replies

  • Please check the following points: 

    What does the C# program do?
    What is the target Windows version?
    What do you mean by "the .exe program did not run", what's the symptom, any error or exception information?

    If you uninstall the .NET 2.0 SDK (remain .NET 2.0 installed). will it work again?

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. http://forums.msdn.microsoft.com/en-US/vssetup/thread/60424309-bd78-4ca2-b618-03c4a16123b6
    Monday, September 8, 2008 4:07 AM
    • The C# programs starts opening a Main Menu Windows form, which has 3 buttons two of them open a windows form each and the othe is to quit the program. Is something simple, nothing relevant in it.
    • Target Windows version: Windows Xp Professional Ver. 2002 with Service Pack 2 installed.
    • When I say "the .exe program did not run" I mean the following: I double click the executable file(MyProgram.exe), that is created in the \bin\Debug\ folder of my solution project, then it crashes displaying the following message:

                    Visual Studio Just - In-Time Debugger
                    An unhandled exception ("System.DllNotFoundException") ocurred in MyProgram.exe[2620]. Just-In-Time debugging failed
                    the following error: No installed debugger has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time debugging
                    can be enabled  form Tools/Options/Debugging/Jut-In-Time.
                    Check  the documentation index for 'Jut-In-Time debugging, errors' for more information.

        I already have in VS the Just-In-Time options checked for 'Managed', 'Native' and 'Script' .

    • When I uninstall the SDK 2.0 (remain .Net 2.0 installed), it crashes displaying same message above just changed from '...MyProgram.exe[2620]' to '...MyProgram.exe[1840]'.

    I install again the SDK V2.0 and the executable works fine! Seems to be that there is some Dll not found in .Net Framework 2.0 that the SDK 2.0 does have(just my thoughts).

    What is in the .Net SDK 2.0 that allows MyProgram.exe work fine?

    Thank you very much for your support,


    Monday, September 8, 2008 3:00 PM
  • Hi! Anybody there?

    Some days have passed and no reply!

    I just want to know, Why when I only install the SDK 2.0 myProgram.exe runs fine? If SDK 2.0 is not installed(remaining .Net Framework 2.0 installed) myProgram.exe crashes with the message stated in last update. What am I missing?

    • Edited by Alshephard Monday, September 15, 2008 1:33 PM
    Monday, September 15, 2008 1:30 PM

      Off-Topic. Read the forum description - especially the CAPs section.

    Sorry but Figo Fei who moved you here doesn't seem to be aware of the area covered by this forum (which is NOT answering technical questions).

    Friday, September 19, 2008 7:50 AM
  • Hi! Where is the best place to put this thread?  Thanks.
    Friday, September 19, 2008 1:24 PM
  • Hello,


    Please,could you have a look on this link ?


    You will find some explanations about the tools included in the SDK

    Your error is System.DllNotFoundException : there is a dll missing on your target computer ( usually because you have built a debug exe and not a release exe )

    If you could post the using you have put at the beginning of your source, we ( maybe ) might help you more efficiently

    For example, when you include
    using Microsoft.SqlServer.Management.Common;
    you must have installed the dll corresponding to Sql Server Management Objects

    That is only an example

    Have a nice day

    PS : if you give your usings, it would be easier to move your thread towards the correct forum
    Please remember to click 'Mark as Answer' on the post that helped you. Unmark if it provides no help
    Sunday, September 21, 2008 3:16 PM
  • Thanks Papy for your kindly reply,

    I hadn´t bult a release. I did it ,but I got the same dllNotfound exception.

    My using is as follows:

    using System; //(dll: mscorlib.DLL, System.dll)

    using System.Runtime.InteropServices; //(dll: mscorlib.dll)

    using System.Windows.Forms; //(System.Windows.Forms.dll)

    using System.IO;      //(dll: mscorlib.DLL, System.dll)

    using System.Drawing.Printing;      //(System.Drawing.dll)

    using System.Security;      //(System.Security.dll)

    using System.Security.Permissions;      //(dll: mscorlib.dll)

    using System.Collections.Generic;      //(dll: mscorlib.dll)


    I googled the for the dlls that reference the namespaces(put them in green).

    All the dll referenced to these namespaces are located in the \.Net Framework\v2.0.50727\ folder, so I suppose I am not missing any of them.


    'References' in the Solution Explorer have:




    System. Security

    System Windows Forms

    I agree. There is still a dll missing in the target computer. The fact is that, when I install the .net Framework SDK V 2.0, that DLL is installed(I don't know where!) and myProgram.exe runs fine.

    Which one is that dll that SDK V2.0 installs to my target computer?

    Thank you very much for your help!


    PS: I am not allowed to move to the correct forum, so please, Could you do it for me? Thanks.

    Monday, September 22, 2008 8:38 PM
  • Can any moderator put this Thread into the correct forum? I am not able to do it!

    I am really disappointing, because nobody has an answer to my concern:

    Why do I have to install SDK V2.0 to allow myProgram to run?

    Thanks for your response,

    Tuesday, September 30, 2008 10:53 PM
  •  Hi Alshephard,

    Thank you for your post!  I would suggest posting your question in one of the MS Forum

     located here:  http://social.msdn.microsoft.com/Forums/en-US/category/netdevelopment

    Have a great day!

    Shrikant Maske Tier 2 Application Support Server and Tools Online Engineering Live Services Team
    Friday, October 3, 2008 9:40 AM
  • Please, move. Thanks.

    • Edited by Alshephard Monday, October 6, 2008 1:25 PM
    Friday, October 3, 2008 1:57 PM