Should assembly guid attribute vary for different target framework builds of the same .NET library?

China☆狼群 提交于 2019-12-06 11:54:45

问题


I am developing a .NET library in C# which has to address a wide set of target frameworks. I want to produce a nuget package that would install correctly according to the settings of the target project.

In order to achieve that, I am using multiple .csproj files. Each of them is addressing a particular target framework (for example MyLibrary.net45.csproj would create the binaries in bin/*/net45, MyLibrary.netstandard1.2.csproj would create the output in bin/*/netstandard1.2, and so on). Then I create a single nuget package with the outputs of the above projects.

At this stage, the different .csproj files re-use the same AssemblyInfo.cs file and thus use the shared settings there.

I've been wondering whether it is correct for all the different target frameworks to use the same value for the [assembly: Guid("...")] attribute, or should each target framework binary be built with its own distinct one?

来源:https://stackoverflow.com/questions/43778309/should-assembly-guid-attribute-vary-for-different-target-framework-builds-of-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!