-
Hi I'm switching to centralized package management and thought it would be a good idea to replace my MSTest PackageReference ( Unfortunately that does not seem to work, as it now complains about not finding some types and I wasn't able to figure out why, does anyone know what I'm missing? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Beta Was this translation helpful? Give feedback.
-
As @nohwnd pointed out, GlobalPackageReference doesn't get compile assets. Per documentation:
IncludeAssets="Runtime;Build;Native;contentFiles;Analyzers" which doesn't include The doc says:
So that seems like a very intentional design of |
Beta Was this translation helpful? Give feedback.
-
@nohwnd Your fix makes it work fine, it does causes the
Thanks for this workaround, appreciate it. |
Beta Was this translation helpful? Give feedback.
NuGet/Home#13522 (comment) there is this comment which describes how to fix, it using the same source you are linking. Following the advice there, will make the project work. Attached an example project where it works.
TestProject124.zip
To me the naming is pretty unfortunate, and I would not expecte that global package reference is different from package reference, same as I would not expect global using to have different effect than normal using, but for all.
Here is how the project looks like for future reference.
This needs to be fixed or better documented on Nuget side, I've summarized my view in this nuget issue: NuGet/Home#14223