38
49

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【C#】Visual Studioで「参照されていないアセンブリに定義されています」のエラーが出た

Last updated at Posted at 2022-01-30

エラーの対処法を、個人の備忘録的に記事にいたします。

環境

  • Windows10
  • C# 7.3
  • Visual Studio Community 2022

エラー内容

CS0012 型 'DataTable' は、参照されていないアセンブリに定義されています。
アセンブリ 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 
に参照を追加する必要があります。

解決方法

ソリューションエクスプローラー > 参照 > 参照の追加

1.png

追加してと言われている項目を追加。

今回だとSystem.Data を探してチェック。

2.png

最後に「OK」をクリック。

以上となります。

38
49
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
38
49

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?