Share via

Cannot reference System.Windows.Forms.DataVisualization in a console app.

Anonymous
2022-12-02T15:41:43+00:00

Hi,

I'm in a Console App (.Net Framework) project and cant use windows.forms, I'm using a .Net Framework Console App because I was not able do it in a .Net Core app either. Specifically trying to call a class from System.Windows.Forms.DataVisualization.

In order to find it at all in Console App I used nuget to retrieve HIC.System.Windows.Forms.DataVisualization, however when I try to reference it I get the below message. I'm new to .net/visual studio, is there a simple fix to this someone can assist me with?

A reference to 'System Windows_Forms' could not be added.

The ActiveX type library

'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Windo ws.Forms.tlb' was exported from a .NET assembly and cannot be added as a reference.

Add a reference to the .NET assembly instead.

Windows for home | Windows 10 | Input and language

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2022-12-02T20:43:06+00:00

    HI,

    thanks! Just posted there.

    Cheers.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-12-02T16:14:33+00:00

    Hi MM_922,

    I am Dave, I will help you with this.

    I apologize, Community is just a consumer forum, due to the scope of your question (.Net programming) can you please post this question to our sister forum on Microsoft Q&A (The Developers Forum) in the Visual Studio section (linked below)

    Over there you will have access to a host of Developers and Visual Studio experts and will get a knowledgeable and quick answer to this question.

    https://learn.microsoft.com/en-us/answers/topic...

    Was this answer helpful?

    0 comments No comments