问题
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