Comments
2 comments
-
Add
PrivateAssets="all"
to the reference in your.csproj
file:xmlCopy code
<span><PackageReference Include="SmartAssembly.Attributes" Version="x.y.z" PrivateAssets="all" /></span>
Or include the attribute source files directly if licensing allows.
-
Yes, but...
- PrivateAssets="all" means that you have to add the SmartAssembly Nuget ref to all .dlls (I have over 50), and not just the CommonToAll dll.
- Include the attribute source files directly. This is the solution I've gone with, but unlike using the Nuget, there is no automatic version notification if stuff changes. Also, if multiple dlls include the source you get a clash unless you change the namespace.
Add comment
Please sign in to leave a comment.
It would be better if your nuget worked like the Nullable nuget where it only added files to the project and not a dependency, as it is not required at runtime.
Here is a link to how they do it...
https://github.com/manuelroemer/Nullable/blob/master/src/Nullable.nuspec