Reference could not be resolved for target 'Echoes' (Echoes .NET anycpu)

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?

I have the same - after adding a chart to a winforms project, compile and you get the above error.

It looks like you have 2 references, I think the 1st one starting with the * is invalid

Where does the asterisk come from? That seems wrong and should fail to resolve.

No idea where it came from. I was just clicking and didn’t add it myself. And I didn’t notice the asterisk.

Now, when I delete this reference in VS 2017, it keeps coming back.

But when I delete it myself from *.elements, the project builds fine.

Thank to all of you for a prompt and effective support,

Marko

I is added somehow when you add the chart component from the toolbox.
I had the same when I took an existing WinForm app, and added the chart component to a form.

Ok, kill see if we can repro this, seems like an issue with the WinForm (I assume?) designer. Does it happen for any control or only the Chart?

I think only the chart, as I did not see it before.

Thanks, logged as bugs://82970

bugs://82970 got closed with status fixed.

1 Like