Compiler error cs0120

This repository contains .NET Documentation. Contribute to dotnet/docs development by creating an account on GitHub.
description title ms.date f1_keywords helpviewer_keywords ms.assetid

Compiler Error CS0120

Compiler Error CS0120

07/20/2015

CS0120

CS0120

3ff67f11-bdf9-436b-bc0c-4fa3cd1925a6

Compiler Error CS0120

An object reference is required for the nonstatic field, method, or property ‘member’

In order to use a non-static field, method, or property, you must first create an object instance. For more information about static methods, see Static Classes and Static Class Members. For more information about creating instances of classes, see Instance Constructors.

Example 1

The following sample generates CS0120:

// CS0120_1.cs
public class MyClass
{
    // Non-static field.
    public int i;
    // Non-static method.
    public void f() {}
    // Non-static property.
    int Prop
    {
        get
        {
            return 1;
        }
    }

    public static void Main()
    {
        i = 10;   // CS0120
        f();   // CS0120
        int p = Prop;   // CS0120
    }
}

To correct this error, first create an instance of the class:

// CS0120_1.cs
public class MyClass
{
    // Non-static field.
    public int i;
    // Non-static method.
    public void f() { }
    // Non-static property.
    int Prop
    {
        get
        {
            return 1;
        }
    }

    public static void Main()
    {
        var mc = new MyClass();
        mc.i = 10;
        mc.f();
        int p = mc.Prop;
    }
}

Example 2

CS0120 will also be generated if there is a call to a non-static method from a static method, as follows:

// CS0120_2.cs
// CS0120 expected
using System;

public class MyClass
{
    public static void Main()  
    {  
        TestCall();   // CS0120
   }

   public void TestCall()
   {
   }
}

To correct this error, first create an instance of the class:

// CS0120_2.cs
// CS0120 expected
using System;

public class MyClass
{
    public static void Main()
    {
        var anInstanceofMyClass = new MyClass();
        anInstanceofMyClass.TestCall();
    }

    public void TestCall()
    {
    }
}

Example 3

Similarly, a static method cannot call an instance method unless you explicitly give it an instance of the class, as follows:

// CS0120_3.cs
using System;

public class MyClass
{
   public static void Main()
   {
      DoIt("Hello There");   // CS0120
   }
  
   private void DoIt(string sText)
   {
      Console.WriteLine(sText);
   }
}

To correct this error, you could also add the keyword static to the method definition:

// CS0120_3.cs
using System;

public class MyClass
{
   public static void Main()
   {
      DoIt("Hello There");   // CS0120
   }
  
   private static void DoIt(string sText)
   {
      Console.WriteLine(sText);
   }
}

See also

  • The C# type system

Содержание

  1. C# Error CS0120 – An object reference is required for the nonstatic field, method, or property ‘member’
  2. C# Compiler Error
  3. Reason for the Error
  4. Solution
  5. Error cs0120 an object reference is required to access non static member
  6. Answers
  7. All replies
  8. Error cs0120 an object reference is required to access non static member
  9. Answered by:
  10. Question
  11. Answers
  12. All replies
  13. Error cs0120 an object reference is required to access non static member
  14. Answered by:
  15. Question
  16. Answers
  17. All replies

C# Error CS0120 – An object reference is required for the nonstatic field, method, or property ‘member’

In this tutorial, you’ll learn everything about the error “CS0120 – An object reference is required for the nonstatic field, method, or property ‘member’ in C#, why this error appears in your .NET Code and how you can fix them in simple steps.

C# Compiler Error

This is how the CS0120 error in C# looks like in general.

CS0120 – An object reference is required for the nonstatic field, method, or property ‘member’

Reason for the Error

You will receive the CS0120 error in C# when you are trying to access an non-static field, property or method from a static class.

For example, the below code snippet contains a non-static property MyProperty defined in the class by name “DeveloperPublish” and you are trying to access this non-static property from a static method (“Main”) defined in the same class.

This will result with the compiler error CS0120.

Error CS0120 An object reference is required for the non-static field, method, or property ‘DeveloperPublish.MyProperty’ ConsoleApp1 C:UsersSenthilsourcereposConsoleApp1ConsoleApp1Program.cs 9 Active

Solution

To fix the CS0120 Error in C# , avoid accessing the non-static member directly from the static method.

Источник

Error cs0120 an object reference is required to access non static member

I’m getting compiler error «error CS0120: An object reference is required for the non-static field, method, or property» ‘Test.C.a’ on the following code at the line where class «C» calls the constructor for class «B»:

The error is on the «a» in «: base(a)» in the fourth last line.

Does this mean that a base class constructor is called before any members are instantiated? If so, how do I get around this? I don’t want to pass an instance of A to the constructor of C, which seems to be the only way I can get it to work.

Answers

With some more clever tricks, we can do this without modifying the code for B!

The following is the «trick» you are probably looking for:

For simple expressions like new A(), this can be simplified further:

Thanks BinaryCoder. The problem with your suggestion is that I lose all reference to the instance of A within C. (I don’t want the instance of A to be static, either, which is the other way to make it work).

I can now see two options:

1. Create the instance of A in the manner you described and create a protected property within B to provide access to it, OR

2. In B, define a protected abstract property that returns an instance of A. Implement this property in C, which will be called by B whenever required.

In the real situation that I’m looking at, option 2 is the way to go, but I’d still rather be able to pass the reference to the instance of A to the base class.

Источник

Error cs0120 an object reference is required to access non static member

Answered by:

Question

Hi i am getting the following error message «CS0120: An object reference is required for the nonstatic field, method, or property ‘object.ToString()’, the error seems to be coming from the following lines of code;

Line 75: //StrText += «»;
Line 76: string scon = SqlConnection.ToString();
Line 77: SqlConnection sqlConn = new SqlConnection(scon);

The following is my code behind file, can someone with more technical knowledge help me solve this problem, thank you.

public partial class index : System.Web.UI. Page

protected string strLoginMsg = @»» ; private void Page_Load( object sender, System. EventArgs e)

// Put user code to initialize the page here

if (Request.QueryString.Count > 0)

if (Request.QueryString[ «log_out» ].ToString() == «1» )

strLoginMsg = strLoginMsg + «Log out is successful!» ;

Session[ «UserAccess» ] = null ;

strLoginMsg = strLoginMsg + «Your session has expired. » ; Session[ «UserAccess» ] = null ;

#region Web Form Designer generated code override protected void OnInit( EventArgs e)

// CODEGEN: This call is required by the ASP.NET Web Form Designer.

/// Required method for Designer support — do not modify

/// the contents of this method with the code editor.

private void InitializeComponent()

this .btnLogin.ServerClick += new System. EventHandler ( this .btnLogin_ServerClick);

this .Load += new System. EventHandler ( this .Page_Load);

public DataSet GetDataSet( string StrText)

StrText = «SELECT * FROM tblUser WHERE Username = » + «‘» + txt_Username.Text + «‘» ;

string scon = SqlConnection .ToString();

SqlConnection sqlConn = new SqlConnection (scon);

SqlDataAdapter sqlDA = new SqlDataAdapter (StrText, sqlConn);

sqlDA.SelectCommand.CommandType = CommandType .Text;

DataSet ds = new DataSet ();

return ds; if (dsetRecordFound.Tables[0].Rows.Count > 0)

Session[ «UserAccess» ] = dsetRecordFound.Tables[0].Rows[0][ «Access_Right_ID» ].ToString().Trim();

Session[ «UserFullName» ] = dsetRecordFound.Tables[0].Rows[0][ «User_Forename» ].ToString().Trim() + » » + dsetRecordFound.Tables[0].Rows[0][ «User_Surname» ].ToString().Trim();

Session[ «UserID» ] = dsetRecordFound.Tables[0].Rows[0][ «User_ID» ].ToString().Trim(); Session[ «Username» ] = dsetRecordFound.Tables[0].Rows[0][ «Username» ].ToString().Trim();

Response.Redirect( «home.aspx» , false );

strLoginMsg = strLoginMsg + «Invalid login» ;

catch ( ThreadAbortException ex)

catch ( Exception ex1)

private void btnLogin_ServerClick( object sender, System. EventArgs e)

private void txt_Username_ServerChange( object sender, System. EventArgs e)

Answers

Instead of doing this:

string scon = SqlConnection .ToString();

You need to set ‘scon’ to the actual value of your connection string. Often this done by saving the connection string in the web.config file. Assuming you have a valid connection string in the web.config with the key ‘DbConnString», you could use this code:

string scon = ConfigurationManager.ConnectionStrings[«DbConnString»].ConnectionString;

That will pull the connection string value from the web.config so can then use it to initialize your SqlConnection on the next line.

Let me know if that helps.

It is because SqlConnection is an object type. At best, it would return something like «System.Data.SqlClient.SqlConnection» which is still not what you are looking for.

It looks like your variable «scon» is supposed to be set equal to your connection string.

Instead of doing this:

string scon = SqlConnection .ToString();

You need to set ‘scon’ to the actual value of your connection string. Often this done by saving the connection string in the web.config file. Assuming you have a valid connection string in the web.config with the key ‘DbConnString», you could use this code:

string scon = ConfigurationManager.ConnectionStrings[«DbConnString»].ConnectionString;

That will pull the connection string value from the web.config so can then use it to initialize your SqlConnection on the next line.

Let me know if that helps.

Incase you need help with your connection string, check out this great resource that has all you need to know about .NET connection strings:

Once you have your connection string, you can save it your web.config like this:

Hope that helps.

If you are storing your connection string in your Web.config file, you would do it like Todd suggested. Just replace «DbConnString» with the name of your connection string in the Web.config file.

Hi Tanglin05 i think that solved that issue,, I am now getting this issue «CS0103: The name ‘dsetRecordFound’ does not exist in the current context», thank you very much for your help so far.

Line 91: return ds;
Line 92:
Line 93: if (dsetRecordFound.Tables[0].Rows.Count > 0)
Line 94: <
Line 95:

1. The dataset you created is named ds. You need to use:
if(ds.Tables[0].Rows.Count > 0)

2. You returned the dataset on line 91. This terminates the current function, so the rest of the stuff won’t run anyway.

Thank you i will be trying that when i get back to the office, thank you very much for your help.

Источник

Error cs0120 an object reference is required to access non static member

Answered by:

Question

I’m getting the error ‘An object reference is required for the nonstatic field, method, or property ‘ when I attempt to run my application in Visual Web Developer. I am not sure what is wrong and I’m new to programming, and I’m following examples from a book. The page allows a logged in user to view their profile which the attributes such as Firstnames, Lastnames etc. are within my web.config file. Does anyone know what I am doing wrong? My error, along with code, is below. T hanks in advance!

Compiler Error Message: CS0120: An object reference is required for the nonstatic field, method, or property ‘System.Web.UI.Control.FindControl(string)’

public partial class SecurePage : System.Web.UI. Page

protected void Page_Load( object sender, EventArgs e)

if (User.Identity.IsAuthenticated == false )

protected void CancelButton_Click( object sender, EventArgs e)

protected void SaveButton_Click( object sender, EventArgs e)

Profile.Firstnames = (( TextBox ) LoginView .FindControl( «FirstNamesTextBox» )).Text;

Profile.Lastname = (( TextBox ) LoginView .FindControl( «LastNameTextBox» )).Text;

Profile.FirstLineOfAddress = (( TextBox ) LoginView .FindControl( «FirstLineOfAddressTextBox» )).Text;

Profile.SecondLineOfAddress = (( TextBox ) LoginView .FindControl( «SecondLineOfAddressTextBox» )).Text;

Profile.TownOrCity = (( TextBox ) LoginView .FindControl( «TownOrCityTextBox» )).Text;

Profile.County = (( TextBox ) LoginView .FindControl( «CountyTextBox» )).Text;

protected void LoginView_ViewChange( object sender, System. EventArgs e)

private void DisplayProfileProperties()

TextBox FirstNamesTextBox = ( TextBox ) LoginView .FindControl( «FirstNamesTextBox» );

if (FirstNamesTextBox != null )

(( TextBox ) LoginView .FindControl( «FirstNamesTextBox» )).Text = Profile.FirstNames;

(( TextBox ) LoginView .FindControl( «LastnameTextBox» )).Text = Profile.Lastname;

(( TextBox ) LoginView .FindControl( «FirstLineOfAddressTextBox» )).Text = Profile.FirstLineOfAddress;

(( TextBox ) LoginView .FindControl( «SecondLineOfAddressTextBox» )).Text = Profile.SecondLineOfAddress;

(( TextBox ) LoginView .FindControl( «TownOrCityTextBox» )).Text = Profile.TownOrCity;

(( TextBox ) LoginView .FindControl( «CountyTextBox» )).Text = Profile.County;

(( TextBox ) LoginView .FindControl( «ContactNumTextBox» )).Text = Profile.ContactNum;

Answers

LoginView is the name of a class. Here you want the name of the LoginView object that is a control on your form. Most likely the name of something line «loginView1»

Profile.Firstnames = (( TextBox ) LoginView .FindControl( «FirstNamesTextBox» )).Text;

Profile.Firstnames = (( TextBox ) loginView1 .FindControl( «FirstNamesTextBox» )).Text;

That runtime error is telling you that: LoginView is null, or Profile is null, or that FindControl returned null.

For questions and discussions relating to ASP.NET, please see http://forums.asp.net/

Since LoginView is the class name, not the name of an isntance, it doesn’t understand instance concepts. Technically all your code that references LoginView.FindControl(. ) should throw that error, however I think because of the environment and it being caused during run-time means you’ll only see the first time it occurs. Just out of curiousity, could you cause the DisplayProfileProperties method to be called and see if you get the same error there.

I assume that you have an instance of LoginView that is/was shown to the user that you now need to get the data out of. You’ll need to reference the instance of that class rather than the class. However, I can’t tell you how to do that with the current information I have of your code as I don’t know what LoginView is nor how it is created and shown to the user. I’m also unsure of how it being a web project would effect how you’ll need to do that.

Источник

In this tutorial, you’ll learn everything about the error “CS0120 – An object reference is required for the nonstatic field, method, or property ‘member’ in C#, why this error appears in your .NET Code and how you can fix them by following simple steps.

C# Compiler Error

This is how the CS0120 error in C# looks like in general.

CS0120 – An object reference is required for the nonstatic field, method, or property ‘member’

Reason for the Error

You will receive the CS0120 error in C# when you are trying to access an non-static field, property or method from a static class.

For example, the below code snippet contains a non-static property MyProperty defined in the class by name “DeveloperPublish” and you are trying to access this non-static property from a static method (“Main”) defined in the same class.

namespace DeveloperPublishNamespace
{

    public class DeveloperPublish
    {
        public int MyProperty { get; set; }
        public static void Main()
        {
            MyProperty = 1;
        }
    }
}

This will result with the compiler error CS0120.

Error CS0120 An object reference is required for the non-static field, method, or property ‘DeveloperPublish.MyProperty’ ConsoleApp1 C:UsersSenthilsourcereposConsoleApp1ConsoleApp1Program.cs 9 Active

C# Error CS0120 – An object reference is required for the nonstatic field, method, or property 'member'

Solution

To fix the CS0120 Error in C#, avoid accessing the non-static member directly from the static method.

I’m getting the error ‘An object reference is required for the nonstatic field, method, or property ‘ when I attempt to run my application in Visual Web Developer. I am not sure what is wrong and I’m new to programming, and I’m following examples from a book. The page allows a logged in user to view their profile which the attributes such as Firstnames, Lastnames etc. are within my web.config file. Does anyone know what I am doing wrong? My error, along with code, is below. Thanks in advance!

Compiler Error Message: CS0120: An object reference is required for the nonstatic field, method, or property ‘System.Web.UI.Control.FindControl(string)’

Source Error:

Line 32:      protected void SaveButton_Click(object sender, EventArgs e)
Line 33:     {
Line 34:         Profile.Firstnames = ((TextBox)LoginView.FindControl("FirstNamesTextBox")).Text;

using System;

using System.Collections;

using System.Configuration;

using System.Data;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.HtmlControls;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

public partial class SecurePage : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (User.Identity.IsAuthenticated == false)

{

Server.Transfer(«login.aspx»);

}

if (!Page.IsPostBack)

{

DisplayProfileProperties();

}

}

protected void CancelButton_Click(object sender, EventArgs e)

{

DisplayProfileProperties();

}

protected void SaveButton_Click(object sender, EventArgs e)

{

Profile.Firstnames = ((TextBox)LoginView.FindControl(«FirstNamesTextBox»)).Text;

Profile.Lastname = ((TextBox)LoginView.FindControl(«LastNameTextBox»)).Text;

Profile.FirstLineOfAddress = ((TextBox)LoginView.FindControl(«FirstLineOfAddressTextBox»)).Text;

Profile.SecondLineOfAddress = ((TextBox)LoginView.FindControl(«SecondLineOfAddressTextBox»)).Text;

Profile.TownOrCity = ((TextBox)LoginView.FindControl(«TownOrCityTextBox»)).Text;

Profile.County = ((TextBox)LoginView.FindControl(«CountyTextBox»)).Text;

}

protected void LoginView_ViewChange(object sender, System.EventArgs e)

{

DisplayProfileProperties();

}

private void DisplayProfileProperties()

{

TextBox FirstNamesTextBox = (TextBox)LoginView.FindControl(«FirstNamesTextBox»);

if (FirstNamesTextBox !=null)

{

((TextBox)LoginView.FindControl(«FirstNamesTextBox»)).Text = Profile.FirstNames;

((TextBox)LoginView.FindControl(«LastnameTextBox»)).Text = Profile.Lastname;

((TextBox)LoginView.FindControl(«FirstLineOfAddressTextBox»)).Text = Profile.FirstLineOfAddress;

((TextBox)LoginView.FindControl(«SecondLineOfAddressTextBox»)).Text = Profile.SecondLineOfAddress;

((TextBox)LoginView.FindControl(«TownOrCityTextBox»)).Text = Profile.TownOrCity;

((TextBox)LoginView.FindControl(«CountyTextBox»)).Text = Profile.County;

((TextBox)LoginView.FindControl(«ContactNumTextBox»)).Text = Profile.ContactNum;

}

}

}

Здравствуйте, начал изучать C# и ООП, соответственно.
Использую для этого VS 2010.

Вот код, в котором возникает ошибка:

Кликните здесь для просмотра всего текста

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace ConsoleApplication4
{
    public abstract class Vehicle
    {
 
    }
    public abstract class Train : Vehicle
    {
    }
    public abstract class Car : Vehicle
    {
    }
    public class Compact : Car, IPassengerCarrier
    {
    }
    public class SUV : Car, IPassengerCarrier
    {
    }
    public class Pickup : Car, IHeavyLoadCarrier
    {
    }
    public class PassengerTrain : Train, IPassengerCarrier
    {
    }
    public class FreightTrain : Train, IHeavyLoadCarrier
    {
    }
    public class DoubleBogey424 : Train, IHeavyLoadCarrier
    {
    }
    public interface IPassengerCarrier
    {
    }
    public interface IHeavyLoadCarrier
    {
    }
    class Program
    {
        string Show(Vehicle inside)
        {
            return inside.ToString();
        }
        static void Main(string[] args)
        {
            DoubleBogey424 TrainType1 = new DoubleBogey424();
            FreightTrain TrainType2   = new FreightTrain();
            PassengerTrain TrainType3 = new PassengerTrain();
            Pickup CarType1           = new Pickup();
            SUV CarType2              = new SUV();
            Compact CarType3          = new Compact();
            Console.Beep(100,100);
            Console.WriteLine(Show(TrainType1));
            Console.ReadKey();
        }
    }
}

Скрин, ошибки:

Ошибка компилятора CS0120

Натыкаюсь на неё уже не впервые, однако не могут понять, в чем проблема.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

Привет всем.
сегодня хотел сделать нажатие кнопки по нажатию клавиши на клавиатуре, но столкнулся с проблемой которую я не знаю как решать. Надеюсь подскажите как её решить. заранее спасибо
код:

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
class MyButtonClass : Form
{

    private Button One, Two, Three, Four, Fife, Six, Seven, Eight, Nine, Zero, Plus, Minus, multiply, division, Equally, dot, Delete, clear, copy, past;
    private TextBox FirstText, SecondText, ThirdText;


    private void InitializeComponent()
    {
        this.SuspendLayout();
        // 
        // MyButtonClass
        // 
        this.ClientSize = new System.Drawing.Size(280, 525);
        this.Name = "MyButtonClass";
        this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
        this.ResumeLayout(false);

    }

    double n, k, res;
    int v, b;

    public MyButtonClass()
    {
        v = 0;
        b = 0;

        Plus = new Button();
        Plus.Text = "+";
        Plus.Top = 150;
        Plus.Left = 210;
        Plus.Height = 100;
        Plus.Width = 70;
        Plus.Click += new System.EventHandler(PlusButton);
        this.Controls.Add(Plus);
        //Declare, properties and call a button

        FirstText = new TextBox();
        FirstText.Text = $"0";
        FirstText.Top = 10;
        FirstText.Left = 0;
        FirstText.Height = 50;
        FirstText.Width = 210;
        this.Controls.Add(FirstText);
        //Declare, properties and call a TextBox

        SecondText = new TextBox();
        SecondText.Text = $"";
        SecondText.Top = 50;
        SecondText.Left = 0;
        SecondText.Height = 50;
        SecondText.Width = 210;
        this.Controls.Add(SecondText);
        //Declare, properties and call a TextBox

        ThirdText = new TextBox();
        ThirdText.Text = $"0";
        ThirdText.Top = 100;
        ThirdText.Left = 0;
        ThirdText.Height = 50;
        ThirdText.Width = 210;
        this.Controls.Add(ThirdText);
        //Declare, properties and call a TextBox

        InitializeComponent();
        this.StartPosition = FormStartPosition.Manual;
        this.Location = new Point(-5, 0);
    }
    [STAThread]
    static void Main()
    {
        Application.Run(new MyButtonClass());
        //starting objects of class MyButtonClass
    }
    void PlusButton(object sender, EventArgs e)
    {

        if (v == 0)
        {
            SecondText.Text = "+";
            v = 1;
        }
        else if (v == 1)
        {

            n = double.Parse(FirstText.Text);
            k = double.Parse(ThirdText.Text);
            if (SecondText.Text == "+")
            {
                res = n + k;
            }
            else if (SecondText.Text == "-")
            {
                res = n - k;
            }
            else if (SecondText.Text == "x")
            {
                res = n * k;
            }
            else if (SecondText.Text == "/")
            {
                res = n / k;
            }
            string r = Convert.ToString(res);
            FirstText.Text = r;
            SecondText.Text = "+";
            ThirdText.Text = "0";
            v = 1;
        }
    }
    public class FilteredTextBox : TextBox
    {
        protected override void OnKeyPress(KeyPressEventArgs e)
        {
            if (e.KeyChar == '+')
            {
                Plus.PerformClick();
                // здесь ошибка
            }
            base.OnKeyPress(e);
        }
    }
}

Добрый день, уважаемые форумчане!

Несколько лет писал на JS, сейчас переписываю проекты на C#, столкнулся с непоняткой.

Есть скрипт1, отвечающий за обновление данных в UI-элементах (в данном случае просто меняет текст в textName на «test»).
К textName прикреплен в инспекторе UI Text.

Используется csharp

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Main : MonoBehaviour {

        public Text textName;

        public static void updatePanel()
        {
                textName.text = «test»;
        }
}

Main.updatePanel() вызывается в других скриптах, чтобы когда нужно — обновить данные в UI элементах.

Итог: Assets/Main.cs: error CS0120: An object reference is required to access non-static member `Main.textName’

Конечно же, если написать:

Используется csharp

public static Text textName;

ошибка исчезает, но тогда теряется привязка в инспекторе к UI элементу.

Я понимаю, что ошибка примитивная, но уже пол день бьюсь с ней. Подскажите, где я ошибся?
Спасибо заранее.

Понравилась статья? Поделить с друзьями:
  • Compiler error cs0030
  • Compiler error cs0029
  • Compiler error cs0019
  • Compiler error c2360
  • Compiler debug log error unable to generate contract bytecode and abilities