MSBuild Error in Godot 4.2.2

Godot Version

4.2.2.stable.mono

Question

Hello!
Up until this summer, I have been working with Godot 4.03 on my Windows 10 PC with no issues. I’ve built projects with GD script and recently decided to switch to 4.2.2 to make projects with C#. I have created a basic project with C# and have been trying to test a player movement script, but when I try to run my project, it instantly fails and I receive this error:

“MSB4186: Invalid static method invocation syntax:[MSBuild]::VersionGreaterThanOrEquals($(MSBuildAssemblyVersion), ‘17.3’)”. [MSBuild]::VersionGreaterThanOrEquals Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(a, b)). C:\Users\12sl.nuget\packages\godot.net.sdk\4.2.2\Sdk\Sdk.props(15,28)"

I have tried to look for solutions online, but haven’t seen one for the same exact issue I’m experiencing in Godot. I saw one suggestion for an error slightly similar (but for a different software) suggesting something about using a certain version of Visual Studio 17 but I don’t even have that installed. I use Visual Studio Code for school related projects, though. To be honest, I have no idea what this error means and trying to find a solution online that will help me understand what exactly yields this MSBuild error has been fruitless. Any pointers in the right direction would be greatly appreciated!

Perhaps try installing VS 2022 community?

There is a debate, but ‘Big’ Visual Studio and C# are kind of in-love with one another.

Then once you’ve got VS 2022 installed, you can configure it to be the editor under ‘editor settings’.

It seemed to go pretty well for me.

This worked for me! Thank you so much! I honestly had no idea what was wrong.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.