The name 'transform' does not exist in the current context (Fixed, was my fault)

EDIT: I accidentaly created a new public class named MonoBehaviour so this was my own fault and it is fixed now. Thanks to everyone who tried to help.

Can someone please explain to me why this code is giving me the error "CS0103: The name ‘transform’ does not exist in the current context’ in Visual Studio?

using UnityEngine;
using System.Collections;

public class test : MonoBehaviour {

	// Use this for initialization
	void Start () {
        transform.position = Vector3.zero;
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}

I created this class as a test but I have multiple other classes that give me the same error in Visual Studio and in Unity as well. Some months ago the project worked perfectly fine.

EDIT:
After restarting, the error now doesn’t show up in Unity anymore and I can add the affected scripts to a GameObject again but the error is still present in VisualStudio.

EDIT 2:
It reappeared in Unity after I changed the name of the test class and it’s file. But it only appeared for the test class.

Could be that the script isn’t assigned to a game object and so there is no parent to the script (transform). To fix it you could add the script as a component to any games object in unity and then that game object would be the transform for that script.

And what if you use the fully-qualified version?

GetComponent<Transform>.position = Vector3.zero;

I found the error.

I wanted to do some unit testing but it threw an Exception so I tried this solution:

https://community.unity.com/t5/Editor/Security-Exception-ECall-methods-must-be-packaged-into-a-system/td-p/696943

It kept giving me an exception so I removed the preprocessor directives and then this happened.

Thanks to everyone for trying to help.

If anyone has a solution to the problem in the link, I’d be interested in your solution.