First, this is not a duplicate of:
I downloaded MimeKit and opened it in VS2019. I attempted to update the project from .NET 4.5 to .NET 4.7.2. After doing this, it won't compile. I get the following error:
Your project does not reference ".NETFramework,Version=v4.7.2" framework.
After finding the SO post above, I was very hopeful, but it didn't work. I followed the steps described in the accepted answer. Specifically, I did the following:
- I deleted the bin/obj folders from the project root down.
- I cleaned the project. (multiple times)
- I rebuilt the project. (multiple times)
- I right-clicked on the solution in VS2019 and chose Restore Nuget Packages.
- I opened the .csproj file and looked for references to .json files but found none.
- I tried all of the above in VS2017 also.
I don't know what else to try. Thanks in advance for any advice.
This is a horrible bug in VS2017 and VS2019 that I was never able to solve per se. My workaround was to add the NuGet package for MailKit and MimeKit to my custom solution and simply grab the DLLs I needed. I wish MS would fix this.