Global Using Directive Issue

Hello, I’ve never used this platform before, but I would really appreciate some help. Since yesterday, I haven’t been able to use Unity at all because of this strange error that keeps appearing anytime Unity compiles. I don’t know what I did, but if I can’t fix this, I don’t think I will be able to use Unity for the time being.

Error in question: “error CS8773: Feature ‘global using directive’ is not available in C# 9.0. Please use language version 10.0 or greater.”

Check if in a script the global keyword is being used like this: global using ...

If it isn’t, check if in a .csproj file in the directory of your project, if the following exists <ImplicitUsings>enable</ImplicitUsings> and delete it.

I cannot provide any help but I am so glad someone else have asked this question. I also have this issue since today. For me I am using VSCode I don’t know if it has anything to do with C# extension updates. I just keep deleting the generated obj and bin files every once in a while, which is very annoying.


But if I try to change anything it says it will overwrite changes.

When unity compiles it for reason creates these scripts and every time I delete them they are recreated.

Which version of Unity are you using (please provide the exact version, e.g., 6000.1.2f1)? Also, what are the names of the scripts that use global using so I can check them on my machine when I get the chance?

6000.1.2f1
Script: LineWave.GlobalUsings.g

This doesn’t look like a typical name of a C# script. Where is it from? Was it created by an asset? Is it part of Unity? From a package? Could you provide the full path to the file’s location?

Its autogenerated i dont know why its keeps appearing.
Screenshot 2025-05-15 at 3.30.19 PM

This file is not generated by Unity, it is likely created by something else, such as an asset. It does not appear in a new Unity project. Identify what is generating this file and contact its maintainer.

I’m not sure because i’ve tried multiple projects and the same thing happens except with a different file.

Is this from modding or some kind of modding / decompilation tool?

If so, those subjects are not appropriate for this forum.

I don’t think so, i just cant use unity at the moment.

Perhaps it’s yet another unwanted package suddenly being shoved down your throat.

Blow away anything you don’t need. Here’s how:

Extra unwanted packages in new projects (collab, testing, plastic and other problem packages):

Upgrades:

If you need packages and they’re not working, one easy solution is to make a new project, add the packages there until they work, then copy the Packages/manifest.json file to your current project. This obviously assumes you are using source control and can instantly back out any and all changes!!

New project:

About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122

Unless you tell us the steps to reproduce those errors, no one can really help you.

By reading the errors you captured, I can tell that you did something that is not supposed to be done so with Unity. Unity is a different environment, not a typical .NET project.

I’ll take a wild guess: did you use Nuget to install something into your project?

No pre-installed package on a new project generates such file into that unlikely directory. The file path in that error log suggests it’s from a 3rd library that’s not compatible with Unity.

[quote=“Kurt-Dekker, post:14, topic:1643578”]
file to your current project. This obviously
[/quote
No i just opened it, this error now happens for all of my projects even new ones.

You mentioned that the same issue occurs, but with a different file. Could you provide examples, including the names and locations of the files where this happens in each project?

If the issue is related to Unity, it would likely involve a file that also exists in other users’ new projects. In new projects is it always the same file, or is it a different one? What is/are the name(s) and location(s) of the file(s) causing errors in completely new projects?

Its whatever file i change, as soon as i compile, i get an auto generated script that i posted earlier.

In a new project, you don’t change a file. You mentioned that it also happens in new projects, give us the name of the file that has the errors in those completely new projects, so that we can test it on our machines.