I am getting this compile time error in my wpf project suddenly in VS 2019, which was working fine till now.
Error:Severity Code Description Project File Line Suppression State Error CS7069 Reference to type '(, )' claims it is defined in 'mscorlib', but it could not be found
Same project if i run in VS 2017 it works fine, i tried many things like clearing temp files, re clone my code base but nothing helped me. I do not get which type it is claiming from the error as '(,)'.
Could someone please assist me what is this issue and why am i getting only in VS2019 and not in VS2017 and any way to resolve this. I have spent lots of my time already any help would be appreciated.
In addition to AngryHacker's suggestion, make sure that if you have multiple projects, that their .NET versions all match up.
In my case, I had a project built with .NET Framework 4.7.2 where I defined a method that returned a ValueTuple and then I called that method from another project built with .NET Framework 4.6.1. After upgrading the project's .NET version from 4.6.1 to 4.7.2 and relaunching VisualStudio, I was able to build the code.
Install System.ValueTuple package into your project. That's what is likely causing errors for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With