Closed
Description
Version used: VS15.3
Reproduction steps:
- Create a new .NET 4.7 console application
- Add a class library project
- Add a project reference from the console application to the class library
- Unload the class library and add this to the first unconditional property group
<Deterministic>true</Deterministic> <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
- Reload the class library
- (optional, doesn't change the outcome) Close VS and remove the .vs, obj and bin folder and reopen VS
- In the class library project, add a class like the following:
using System; namespace Lib { public static class Tester { public static void Test() { Console.WriteLine("Hello you"); } } }
- Call this method from the console application
using Lib; namespace Startup { class Program { static void Main(string[] args) { Tester.Test(); } } }
- Ensure that the console application is the startup project
- Start debugging by pressing F11
- Step through the entire program once to confirm everything is working as expected
- Stop debugging
- In the class library, modify
Console.WriteLine("Hello you");
toConsole.WriteLine("Hello World");
- Save
- Start debugging again using F11
- Step into
Tester.Test();
Expected Result
Works the same as the first time
Actual Result
the source file is different from when the module was built