dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.09k stars 2.03k forks source link

GenerateCodeForDeclaringAssembly is critical and undocumented #8520

Open yoDon opened 1 year ago

yoDon commented 1 year ago

Doc Suggestion: GenerateCodeForDeclaringAssembly should be discussed in both Orleans 7 Serializer Docs and the Orleans 3.x -> Orleans 7 migration guide, including guidance on how to apply this type of attribute (speaking as a C# developer since .NET 1.1, I haven't needed to add an assembly attribute since the days of AssemblyInfo.cs files, so I suspect I'm not the only Orleans dev who is unfamiliar with how to add attributes to assemblies).

Context: In #8312, @david-obee mentions the need for GenerateCodeForDeclaringAssembly Attributes when placing serialized classes in assemblies. Without finding that GH Issue comment, it's unlikely I would have been able to successfully port a project from Orleans 3.x to Orleans 7. The only other mention I could find of GenerateCodeForDeclaringAssembly in the Orleans docs was in the GitHub repo sample code for an Orleans Visual Basic interop example).

kzu commented 1 week ago

Related, MSBuild support for improved discoverability and ease of consumption from nugets: https://github.com/dotnet/orleans/issues/9202