Oxygene 10.0.0.2409
Visual Studio 2017
Synopsis:
In VS 2017, create a very basic WinForms .NET app:
WinForms1.zip (126.8 KB)
Build, run … everything is OK. Actually, this works with much more complex WInForm apps using basic controls.
Then, just add the Chart control from Tools to the main form:
WinForms2.zip (129.5 KB)
No go, with the error:
Reference ‘*System.Windows.Forms.DataVisualization:[4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]’ could not be resolved for target ‘Echoes’ (Echoes .NET anycpu).
The log is:
E: Reference '*System.Windows.Forms.DataVisualization:[4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
Reference 'mscorlib' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll' for target 'Echoes'.
Reference 'System' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll' for target 'Echoes'.
Reference 'System.Data' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.dll' for target 'Echoes'.
Reference 'System.Drawing' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Drawing.dll' for target 'Echoes'.
Reference 'System.Windows.Forms' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Windows.Forms.dll' for target 'Echoes'.
Reference 'System.Windows.Forms.DataVisualization' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Windows.Forms.DataVisualization.dll' for target 'Echoes'.
Reference 'System.Xml' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.dll' for target 'Echoes'.
Reference 'System.Core' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Core.dll' for target 'Echoes'.
Reference 'System.Xml.Linq' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.Linq.dll' for target 'Echoes'.
Reference 'System.Data.DataSetExtensions' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.DataSetExtensions.dll' for target 'Echoes'.
Project 'WinForms2' failed to build.
Solution 'WinForms1' failed to build all projects.
And yes, the file “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Windows.Forms.DataVisualization.dll” does exist.
What is causing this? How to fix it?