Tags: built, debug, edition, enabled, error, express, following, installed, microsoft, module, msdn, optimizations, project, software, studio, visual

The following module was built either with optimizations enabled or without debug information

On Microsoft » Microsoft Visual Studio

1,569 words with 1 Comments; publish: Fri, 21 Dec 2007 15:40:00 GMT; (300140.14, « »)

Hi,

I have just installed Visual C# 2005 Express Edition and all was well.

One day later and I can't debug a new project as I get the error: "The following module was built either with optimizations enabled or without debug information"

I can create a new command line project and add the following line of code:

Console.WriteLine("Test");

This runs fine...no problem. However when I change that line to:

Console.WriteLine("Another Test");

I get the above error. I cannot debug any code once it has changed. I've seen some other posts with the same error but no clear solution.

I have worked out that when I delete the .exe file from the bin\debug directory it all works again. The code debugs fine and runs.

It is as if C# cannot overwrite the .exe in the debug phase. It's not in the user configuration as I have logged in as another user and run C# 'for the first time' and the problem remains. I have also reinstalled C#.

Any ideas?

Gary

All Comments

Leave a comment...

  • 1 Comments
    • I assume you're running a debug build ?

      I'll move this to an appropriate forum. Your question has nothing to do with VSTS, as far as I can see.

      #1; Mon, 10 Sep 2007 18:34:00 GMT