What you say is true, but what happens is that it looks as though it is stepping through one piece of code, whilst it is actually executing another.
It's not even as if you're making a change to the code in the middle of debugging. You start afresh and yet the code that looks like it's being debugged is not actually run. -----Original Message----- From: Axel Heitland [mailto:[EMAIL PROTECTED]] Sent: 12 April 2002 15:55 To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Possible bug in VS.NET This is not a bug! The classlib and your app both have a bin folder. This bin folder contains the latest binaries including the latest binaries of the referenced projects/classlibs. The referenced bin's are copied to that location only when you build the MAIN (referencing), but not when you build the classlib (referenced). So when you only build your classlib the IDE doesn't copy the latest version to your applications bin-folder. This happens only when you build your application. That behaviour looks quite ok for me, doesn't it?! My regards Axel -----Original Message----- From: Howard Bartfield [mailto:[EMAIL PROTECTED]] Sent: Freitag, 12. April 2002 16:20 To: [EMAIL PROTECTED] Subject: [DOTNET] Possible bug in VS.NET I've observed something happening in VS.NET using C# and would like to know whether this is a bug or not. Recreating it is simple: 1. Create a Class Library project. 2. The Class Library should contain the following: using System; namespace TestDebugging { public class SomeClass { public static int Method1() { int i=10; return i; } } } 3. Compile the Class Library. 4. Create a ConsoleApplication. 5. Add a reference within the console app to the Class Library above, with Copy Local set to True. 6. The console app should contain the following: using System; namespace TestDebugging { class ConsumerClass { static void Main(string[] args) { int i = SomeClass.Method1(); Console.WriteLine( i.ToString() ); Console.Read(); } } } 7. Compile the console app. 8. Put a breakpoint within the Method1() method in the class library, set the class library's Debug Mode to Program, and set the Start Application to the console app above. 9. Hit F5 - everything works as expected. 10. Now the good part - make a change to the Class Library by altering the integer returned in Method1() - say i=99. Recompile the Class Library ONLY. 11. Hit F5 again - VS.NET steps into the class library, and runs the line i=99. However, the Console reads the old number, 10. Comments please. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.