orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Allow adding assembly-level attribute for code generation via MSBuild

Open kzu opened this issue 1 year ago • 1 comments

Having to add [assembly: GenerateCodeForDeclaringAssembly] is a bit hard to discover, especially when types being used come from nuget packages.

It might be valuable to also offer an MSBuild alternative, just like [InternalsVisibleTo...] can now be done with <InternalsVisibleTo Include=".." /> directly in the csproj.

Something like the following:

<ItemGroup>
   <OrleansGenenerator Include="AssemblyPotentiallyFromPackage" />
</ItemGroup>

This way, it should even be possible for the nuget packages themselves to provide this item automatically so that scenarios that use those types in Orleans context, Just Work.

kzu avatar Oct 23 '24 18:10 kzu

@ReubenBond if you think this is useful (I do 😉 ), I can work on a PR as outlined in the description.

kzu avatar Nov 07 '25 19:11 kzu