none
My C# program runs only if I install the SDK V2.0 in target computer RRS feed

  • Question

  •  
    Hello,

    I hope you can do a follow up to my problem. Up to now, I had not received a response, I am feeling frustrated because there has not been an accurate post.

    The post starts here:

    _______________________________________________________________________________________________________


    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,

    Al

    Edited by Alshephard on Thursday, September 04, 2008 9:36:31 AM
    Note: Just re-edited.
    Moved by Figo Fei on Monday, September 08, 2008 10:48:45 PM
    Note: redirect (Moved from .NET Framework Setup to Where is the Forum For…?)
    _______________________________________________________________________________________________________

  • Figo FeiMSFT, Moderator - Posted on Sunday, September 07, 2008 11:07:31 PM
    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?

    Thanks.
    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
  • _______________________________________________________________________________________________________
  • Alshephard - Posted on Monday, September 08, 2008 10:00:08 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,

    Alvaro.

  • _______________________________________________________________________________________________________

  • Alshephard - Posted on Monday, September 15, 2008 8:30:31 AM
    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?

    Al.
    Edited by Alshephard on Monday, September 15, 2008 8:33:12 AM
  • _______________________________________________________________________________________________________
  • Mike Walsh MVPMVP - Posted on Friday, September 19, 2008 2:50:29 AM
     

      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)
    _______________________________________________________________________________________________________

  • Alshephard - Posted on Friday, September 19, 2008 8:24:10 AM
  •  
    Hi! Where is the best place to put this thread?  Thanks.
  • _______________________________________________________________________________________________________
  • Papy Normand - Posted on Sunday, September 21, 2008 10:16:04 AM

    Hello,

    Please,could you have a look on this link ?

    http://msdn.microsoft.com/en-us/library/d9kh6s92(VS.80).aspx

    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
    Edited by Papy Normand on Sunday, September 21, 2008 10:17:47 AM

  • _______________________________________________________________________________________________________

    Alshephard - Posted on Monday, September 22, 2008 3:38:50 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

    System.Drawing

    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!

    Al

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


    _______________________________________________________________________________________________________
  • Alshephard - Posted on Tuesday, September 30, 2008 5:53:23 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,

    Al.

    _____________________________________________________________________________________________________
  • Proposed AnswerProposed Answer
    Shrikant Maske - Posted 4 hours 1 minutes ago
     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 1:55 PM