I am trying to build a NuGet package from a Framework 4.8 .csproj file for a library. The project compiles fine. I have some unit tests that run fine. I run the "nuget pack" command and get the error in the title.
I have an interface defined in a .NET Standard 2.0 project. I need to implement this interface for both Core and Framework projects. There are platform-specific dependencies in the implementation. The core package is easily generated because I have a GeneratePackageOnBuild element with a True value in the project file.
The Framework package would be built with a command line. Nuget v6.0.0.280, MSBuild v17.1.0.7609
& nuget pack -includeReferencedProjects -Symbols -SymbolPackageFormat snupkg -Properties Configuration=Release
I have removed the System.Memory package from the Framework project. System.Memory is not in the project with the interface. I removed the System.Buffers package after reading about another person who had trouble with System.Memory. I find no explicit reference to System.Memory in either the Standard 2.0 project or the Framework 4.8 project. I have erased the bin and obj files and cleaned the solution, and restarted the compiler, and booted the machine.
What is trying to reference System.Memory 4.0.1.1, and how do I make it stop?