Godot 3.2.3, Visual Studio 2019
This is a step by step guide to using this workaround for Godot 3.2.3+ support in Visual Studio: godotengine/godot-csharp-visualstudio#10 (comment)
-
In the solution explorer, add a new project to your solution.
-
Search for
library .net framework
to find the "old-style" project style. Select it and press Next. -
Set up the project.
- Name:
StubProj
- Location: make sure this is your project directory.
- Framework: the default is fine, we're going to replace this later anyway.
- Name:
-
Open the StubProj directory. You can use Open Folder in File Explorer to do this easily.
-
Close Visual Studio. Press Yes if prompted to save files.
-
In the StubFolder directory, delete all files and directories except
StubProj.csproj
. (Deletebin
,obj
,Properties
,Class1.cs
.) -
Open
StubProj.csproj
in a text editor. (Not Visual Studio.) Delete the content, then paste this text (a slightly modified version of the original workaround)<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{B83A5A30-7D9A-4BCC-BB56-2974A2AAE767}</ProjectGuid> <OutputType>Library</OutputType> <RootNamespace>StubProj</RootNamespace> <AssemblyName>StubProj</AssemblyName> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <Deterministic>true</Deterministic> <ProjectTypeGuids>{8F3E2DF0-C35C-4265-82FC-BEA011F4A7ED};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\*.csproj"> <Private>False</Private> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
-
Start Visual Studio. Open your Godot project back up.
-
Set
StubProj
as your Startup Project. -
See the extension's debugging options are there!
If you hit an error like this (image credit to @Atlinx, asking about this on the Godot Discord), it seems to mean the StubProj folder isn't inside the Godot project directory:
Make sure the StubProj folder is inside your Godot project folder.