Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProduceReferenceAssembly causes stale assemblies in legacy C# project system #2431

Open
Suchiman opened this issue Aug 15, 2017 · 6 comments
Labels

Comments

@Suchiman
Copy link

Version used: VS15.3

Reproduction steps:

  1. Create a new .NET 4.7 console application
  2. Add a class library project
  3. Add a project reference from the console application to the class library
  4. Unload the class library and add this to the first unconditional property group
    <Deterministic>true</Deterministic>
    <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
  5. Reload the class library
  6. (optional, doesn't change the outcome) Close VS and remove the .vs, obj and bin folder and reopen VS
  7. 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");
            }
        }
    }
  8. Call this method from the console application
    using Lib;
    
    namespace Startup
    {
        class Program
        {
            static void Main(string[] args)
            {
                Tester.Test();
            }
        }
    }
  9. Ensure that the console application is the startup project
  10. Start debugging by pressing F11
  11. Step through the entire program once to confirm everything is working as expected
  12. Stop debugging
  13. In the class library, modify Console.WriteLine("Hello you"); to Console.WriteLine("Hello World");
  14. Save
  15. Start debugging again using F11
  16. 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

@rainersigwald
Copy link
Member

@jcouv, did we get the reference-assembly-as-project-input fix into the legacy project system for 15.3? I remember it being tight for the new project system . . .

@jcouv
Copy link
Member

jcouv commented Aug 15, 2017

Only the new project system works, and still the feature is not finalized (consider beta).
The Roslyn team just started dogfooding. The plan is to announce for general availability in version 15.5, assuming we can iron out sufficiently.

@srivatsn @Pilchie can you triage/assign while I'm away? Thanks

@rainersigwald rainersigwald changed the title ProduceReferenceAssembly causes stale assemblies in startup projects ProduceReferenceAssembly causes stale assemblies in legacy C# project system Aug 16, 2017
@dasMulli
Copy link
Contributor

The plan is to announce for general availability in version 15.5, assuming we can iron out sufficiently.

Any update on how well the feature works now that 15.5 is out?

@nguerrera
Copy link
Contributor

Is this a duplicate of dotnet/project-system#4079, which was closed "won't fix"? @tmeschter

@tmeschter
Copy link
Contributor

@nguerrera Related to dotnet/project-system#4079, but this goes beyond the issues listed there. That is, fixing dotnet/project-system#4079 is probably required but not sufficient to fix this.

@rainersigwald rainersigwald removed their assignment Jul 22, 2019
@rainersigwald
Copy link
Member

@drewnoakes @donJoseLuis is there a better tracking item for this csproj.dll work? It's been lost here for years but we also keep talking about it internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants