Can anyone tell me what is this building to the assets folder is not allowed..

“building to the assets folder is not allowed”

this is the error i got when i try to build my project… i don’t have any idea how to fix this can anyone help me…

Hello, I had same error, simply change the folder in your explorer when asking where to build (actually, never ask, that’s the mistake, it is pointing to the assets, just change it to the main folder, out of the assets folder and done)
Hope it solve it for you.

Finally I found the solution. Unity does not allow /Assets/ folders to be included in the path anymore.

Use Path.GetFullPath(".") instead of Application.dataPath for BuildPipeline.BuildPlayer()'s locationPathName param.