locked
build problems RRS feed

  • Question

  • hi everyone! i have just started using visual studio so i can learn C# (i know java but i need to know the syntax differences). on my first project which literally just says "hello" in the console, i get debugging and build issuses. when i run my code i get a pop-up message the says " visula studio cannot start debugging because the debug target C:\folders\folders\project name\bin\Debug\project name.exe is missing. please build the project and retry or set the output path and assembly name properties appropriately to point at the correctlocation for the target assembly." . i have already searched countless other forums and nothing works. please help if you have any idea of what might work - any help is appreciated. 
    Sunday, February 7, 2016 5:44 PM

Answers

  • Basic steps,

    1. Create a new console project.
    2. In main type in Console.WriteLine("Hello");
    3. Next line Console.ReadLine();
    4. From Solution Explorer right click on the solution name
    5. Select Build - without a build Visual Studio should do a build for you. 
    6. Now run the project.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                Console.WriteLine("Hello");
                Console.ReadLine();
            }
        }
    }
    
    So what have you done different than the above?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Proposed as answer by Fouad Roumieh Monday, February 8, 2016 11:54 AM
    • Marked as answer by DinosRoar Tuesday, February 16, 2016 3:20 PM
    Monday, February 8, 2016 1:03 AM

All replies

  • i have just started using visual studio so i can learn C#

    when i run my code i get a pop-up message the says " visula studio cannot start debugging because the debug target C:\folders\folders\project name\bin\Debug\project name.exe is missing.

    Why did you post this in a Visual Basic forum? Use the Visual C# forum:

    https://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/threads

    Two common causes:

    Not creating a project, Source code must be part of a project. Projects are what get built
    and executed. If you just open a source code file in the IDE editor and try to build/run
    it then nothing will get built - there won't be any .exe file to run/debug.

    Errors in the build. If any errors occur in the build then no exe will be created.
    Don't try to "Run" or "Debug" without doing a Build or Rebuild first. Always check for
    and fix build errors before trying to run the program.

    - Wayne

    • Proposed as answer by Fouad Roumieh Monday, February 8, 2016 11:54 AM
    • Unproposed as answer by DinosRoar Tuesday, February 16, 2016 3:20 PM
    Sunday, February 7, 2016 9:27 PM
  • Basic steps,

    1. Create a new console project.
    2. In main type in Console.WriteLine("Hello");
    3. Next line Console.ReadLine();
    4. From Solution Explorer right click on the solution name
    5. Select Build - without a build Visual Studio should do a build for you. 
    6. Now run the project.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                Console.WriteLine("Hello");
                Console.ReadLine();
            }
        }
    }
    
    So what have you done different than the above?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Proposed as answer by Fouad Roumieh Monday, February 8, 2016 11:54 AM
    • Marked as answer by DinosRoar Tuesday, February 16, 2016 3:20 PM
    Monday, February 8, 2016 1:03 AM