On a quick read-through that makes sense to me. Because you are recompiling the class library only, the updated dll is not copied to the folder where the console project resides - that only happens when you recompile the console. So the running console loads up the old dll. But VS.NET displays the most up-to-date source file it has - the new one. That doesn't look like a bug to me - just you're not compiling the entire solution when you should be.
SImon --------------------------------------------------------------- Simon Robinson http://www.SimonRobinson.com --------------------------------------------------------------- ----- Original Message ----- From: "Howard Bartfield" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 3:20 PM 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.