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

Add reference to ProduceReferenceAssembly #29445

Closed
redwyre opened this issue May 13, 2022 · 6 comments · Fixed by #29569
Closed

Add reference to ProduceReferenceAssembly #29445

redwyre opened this issue May 13, 2022 · 6 comments · Fixed by #29569
Assignees
Labels
doc-enhancement Improve the current content [org][type][category] dotnet-fundamentals/svc Pri2

Comments

@redwyre
Copy link

redwyre commented May 13, 2022

[Enter feedback here]
reference ProduceReferenceAssembly to make this discoverable from search


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label May 13, 2022
@gewarren gewarren self-assigned this May 17, 2022
@gewarren gewarren added the doc-enhancement Improve the current content [org][type][category] label May 17, 2022
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label May 17, 2022
@gewarren
Copy link
Contributor

@redwyre It looks like ProduceReferenceAssembly defaults to true for projects that target .NET 5 and later, so most people wouldn't be setting it explicitly. But I'm interested in why you think people would be searching on it.

@gewarren
Copy link
Contributor

@baronfel Do you think a reference to ProduceReferenceAssembly should be added, and if so, in what context?

@baronfel
Copy link
Member

The option is already quite well documented in the c# compiler options so I'm inclined to say we shouldn't need to add anymore. I'm definitely amenable to changing that feeling based on @redwyre's context, though. The wording of this page might be changed to suggest that reference assemblies aren't required to be generated from a given build? They're a performance optimization, after all.

@redwyre
Copy link
Author

redwyre commented May 20, 2022

I enable ProduceReferenceAssembly because we ship them, and the new change broke the build, but ProduceReferenceAssembly is all I was setting in my csproj so there's nothing to link that you now need ProduceReferenceAssemblyInOutDir to get the same behaviour when you were relying on it. So just adding that to the page would make it discoverable for people like me that were wondering "why isn't ProduceReferenceAssembly working any more?"

@baronfel
Copy link
Member

Proposed new verbiage for the Old behavior section:

Old behavior

Since reference assemblies were added, the .NET SDK has written reference assemblies to the ref directory in the OutDir directory of the compilation. In .NET 5, the ProduceReferenceAssembly property was introduced and defaulted to true for .net5.0 and higher applications, so many applications began generating reference assemblies to this directory implicitly.

@redwyre you set this property to true explicitly, so I'm gathering that you're not targeting net5.0+ for these projects?

@redwyre
Copy link
Author

redwyre commented May 20, 2022

The projects have been updated from .net core -> net5 -> net6, but I set it to true originally because I explicitly use the reference dlls as build outputs (which is why it's a breaking change).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org][type][category] dotnet-fundamentals/svc Pri2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants