I want to install the Godot mono version, I followed all the steps, installed mono, gtk#, I also have Visual Studio installed, my preferred text editor is atom, but it won't autocomplete(I installed the c# packages and also omnisharp) . And when I build the game to test it, it will throw some errors. This is really frustrating. I use Unity, but want to move to Godot, but Im really struggling. Can someone help me out. I followed GDquests tutorial but still can't get it to WORK. Someone please hell me out.

@Anderoo99 said: And when I build the game to test it, it will throw some errors. This is really frustrating.

For starters a good idea might be to share the actual errors you are getting.

Project "Test Game.sln" (Build target(s)):
	Message: Building solution configuration "Tools|Any CPU".
	Project "Test Game.csproj" (default targets):
		C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [D:\Software Files\Godot Files\Test Game\Test Game.csproj]
	Done building project "Test Game.csproj" -- FAILED.
Done building project "Test Game.sln" -- FAILED.

The above error was shown when i tries to build the project. It was set to vs build tools in editor settings > Mono > Build

Project "Test Game.sln" (Build target(s)):
	Message: Building solution configuration "Tools|Any CPU".
	Project "Test Game.csproj" (default targets):
		C:\Program Files\Mono\lib\mono\msbuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(2130,5): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object
  at Microsoft.Build.Tasks.Reference.get_DirectoryName () [0x0003b] in <93b3f5ac93c94648aeb31f65003f93fd>:0 
  at Microsoft.Build.Tasks.ReferenceTable.FindAssociatedFiles () [0x00046] in <93b3f5ac93c94648aeb31f65003f93fd>:0 
  at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure () [0x0000a] in <93b3f5ac93c94648aeb31f65003f93fd>:0 
  at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure (System.Collections.Generic.IEnumerable`1[T] remappedAssembliesValue, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x0002e] in <93b3f5ac93c94648aeb31f65003f93fd>:0 
  at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute (Microsoft.Build.Shared.FileExists fileExists, Microsoft.Build.Shared.DirectoryExists directoryExists, Microsoft.Build.Tasks.GetDirectories getDirectories, Microsoft.Build.Tasks.GetAssemblyName getAssemblyName, Microsoft.Build.Tasks.GetAssemblyMetadata getAssemblyMetadata, Microsoft.Build.Shared.GetRegistrySubKeyNames getRegistrySubKeyNames, Microsoft.Build.Shared.GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, Microsoft.Build.Tasks.GetLastWriteTime getLastWriteTime, Microsoft.Build.Tasks.GetAssemblyRuntimeVersion getRuntimeVersion, Microsoft.Build.Shared.OpenBaseKey openBaseKey, Microsoft.Build.Tasks.GetAssemblyPathInGac getAssemblyPathInGac, Microsoft.Build.Tasks.IsWinMDFile isWinMDFile, Microsoft.Build.Tasks.ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [0x0050b] in <93b3f5ac93c94648aeb31f65003f93fd>:0 
  at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000] in <93b3f5ac93c94648aeb31f65003f93fd>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <d5204543de13417fbab243b93fc486c1>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x001f6] in <d5204543de13417fbab243b93fc486c1>:0  [D:\Software Files\Godot Files\Test Game\Test Game.csproj]
	Done building project "Test Game.csproj" -- FAILED.
Done building project "Test Game.sln" -- FAILED.

The above error was shown when i tries to build the project. It was set to vs Mono in editor settings > Mono > Build

This script was attached to the kinematic body 2d which was attached to a node.

using Godot;
using System;

public class KinematicBody2D : Godot.KinematicBody2D
{
  [Export]
  public int moveSpeed = 250;

  public override void _PhysicsProcess(float delta)
  {
    Vector2 motion = new Vector2();
    motion.x = Input.GetActionStrength("move_right") - Input.GetActionStrength("move_left");
    motion.y = Input.GetActionStrength("move_down") - Input.GetActionStrength("move_up");

    MoveAndCollide(motion.Normalized() * moveSpeed * delta);
  }
}

I also cant get autocomplete to work in atom, I have installed the c# support package. Sorry for the late reply. :-)

If using windows, make sure you have either the latest version of Visual Studio or Visual Studio Build Tools installed.

You also have to make sure that you have the .NET Framework 4.5 targeting pack installed(I'm guessing based on the errors that this is what you are missing). If you are certain you have all of the above previously installed, try repairing your install.

If using mac or linux you should only need the Mono SDK.

https://github.com/godotengine/godot-docs/blob/master/getting_started/scripting/c_sharp/c_sharp_basics.rst

Hey, I tries installing .NET Framework 4.5, but it shows this message.

Just an Update, I was able to successfully install .net framework developer pack 4.5.2,. It stll displays the sae error.

Hey thanks, I was finally able to get it to work. I installed the .NET Framework target pack using the Visual Studio Installer under the individual components tab. :-) :-) :-)

Btw I still cannot get atom to do m autocompletes and syntax highlighting for some features like [Export] and vectors. I have the C# packages installed in atom. Really cant figure out why it is not working.

You might need to edit the .csproj file so it points to the version of the .NET framework you are using, or at least that seemed to fix autocompletion for the user Riggeot on Reddit.

@TwistedTwigleg said: You might need to edit the .csproj file so it points to the version of the .NET framework you are using, or at least that seemed to fix autocompletion for the user Riggeot on Reddit.

Still not working :-(

@Anderoo99 said:

@TwistedTwigleg said: You might need to edit the .csproj file so it points to the version of the .NET framework you are using, or at least that seemed to fix autocompletion for the user Riggeot on Reddit.

Still not working :-(

I did some Google searches with Atom, C# autocomplete, and Godot autocomplete with Atom, but I couldn't find anything helpful.

Do you get any errors in Atom's console log? Maybe something there will help point towards why it is not working.

Hello, I'm sympathetic that you want to use C# and Atom with Godot, however as someone who has been enjoying Godot's built in tools have you given the defaults a fair chance? I've grown relatively quickly to really like Gdscript. It's loads better than what Unity tried with Unityscript. Which is my only point of reference on what a game engine language might look like.

I greatly prefer Gdscript over even C# these days and the code editor included with Godot is super convenient. I don't want to suggest it's better than the tools you want to use, but in order to reduce your frustration maybe my suggestion will help.

@Kequc said: Hello, I'm sympathetic that you want to use C# and Atom with Godot, however as someone who has been enjoying Godot's built in tools have you given the defaults a fair chance? I've grown relatively quickly to really like Gdscript. It's loads better than what Unity tried with Unityscript. Which is my only point of reference on what a game engine language might look like.

I greatly prefer Gdscript over even C# these days and the code editor included with Godot is super convenient. I don't want to suggest it's better than the tools you want to use, but in order to reduce your frustration maybe my suggestion will help.

I would love to learn gdscript but the aim is also to learn c# programming. It's part of my syllabus and making video games is a fun way to learn it. :-)

I had problems with Atom before in the past as well, I switched to Visual Studio Code for all of my non-Gdscript programming and never looked back really. Maybe that will be better. The built in editor in Godot also supports C# I think.

Would you consider switching editors?

@Kequc said: I had problems with Atom before in the past as well, I switched to Visual Studio Code for all of my non-Gdscript programming and never looked back really. Maybe that will be better. The built in editor in Godot also supports C# I think.

Would you consider switching editors?

Of course, I don't have problem changing editors. I will install VS code as soon as I get back home. ?

Yes, VS Code should be officially supported AFAIK, and its basically a fork of atom anyways(not really but close enough), basically a better version(IMO).

Update: Auto Completion is working in VS code. Thanks @Megalomaniak @Kequc @TwistedTwigleg :-) :-)

4 years later