godotengine / godot-csharp-visualstudio Goto Github PK
View Code? Open in Web Editor NEWGodot C# extension for Visual Studio
License: MIT License
Godot C# extension for Visual Studio
License: MIT License
OS/device including version:
Windows 10
Issue description:
When I run the game from the editor Play button it works just fine , as soon as i hit the Play In Editor from visual studio, playing the game/scene from the editor is no longer working and it requires a Editor restart .
Screenshots of issue:
https://youtu.be/-7Jgz2B5VWE
It would be a workflow improvement if Play Scene
was also available via the Visual Studio Godot extension. Ideally without having to select a specific scene each time.
The Godot C# setup doc now points at https://github.com/godotengine/godot-csharp-visualstudio/releases directly from the VS installation steps: https://docs.godotengine.org/en/stable/getting_started/scripting/c_sharp/c_sharp_basics.html#visual-studio-windows-only, as of godotengine/godot-docs#4808.
Maybe the latest release should have a "known issue" section that links to the workaround in #10? (Or maybe the docs shouldn't point to the release page directly?)
I am using visual studio 2022 and godot 3.4.4 both x64. I downloaded the extension and hit install. After some time I got this error:
How to make it work?
Package 'Xamarin.VisualStudio,version=17.2.0.177' failed to install. System.IO.IOException: The file 'C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\Microsoft.VisualStudio.RemoteControl.dll' already exists.
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.g__install|31_1(PackagePart part, Boolean saveExtensionManifest, <>c__DisplayClass31_0& , <>c__DisplayClass31_1& , <>c__DisplayClass31_2& , <>c__DisplayClass31_3& , <>c__DisplayClass31_4& )
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.InstallCoreInternal(String localPath, String installDir, InstallablePackage pkg)
at Microsoft.VisualStudio.Setup.Installer.FileInstaller.<>c__DisplayClass7_0.b__0()
at Microsoft.VisualStudio.Setup.Installer.FileInstaller.DoAction(Func`1 action)
at Microsoft.VisualStudio.Setup.Installer.FileInstaller.InstallCore(String localPath, String installDir, InstallablePackage pkg)
at Microsoft.VisualStudio.Setup.Installer.InstallerBase.InstallHelper(InstallData installData)
As I was scrolling around, I saw a video about how to use VS for Godot 4 and saw the launch workaround that work both in Godot 3 and Godot 4. I don't know but I think there will be a way to implement this
OS/device including version:
Windows 10 Pro 10.0.19043 Build 19043
Issue description:
I followed the documentation to set up Godot with visual studio but received error message when I try to run/debug my project from within the Visual Studio editor. I posted about this on the Godot forums, and someone responded with a video describing the problem and showing a work around that involved manually rewriting the project file. The Godot C# VisualStudio plugin should be updated to reflect the latest versions of Godot and VisualStudio so that solutions can be created that do not involve this amount of manual editing:
Screenshots of issue:
OS/device including version:
Windows 10
Godot_v3.2.3-stable_mono
Visual Studio 2019 Community Version 16.7.6
godot-csharp-visualstudio v1.1.1 (downloaded from github releases)
Issue description:
After installing the VSIX, i can't see the "Play in Editor" in Visual Studio, i just get the name of my project (and i can't run it because it's a library).
I read somewhere that godot is supposed to add ProjectTypeGuids in the csproj for the extension to detect it, but actually, there is nothing like that in mine:
<Project Sdk="Godot.NET.Sdk/3.2.3">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Remove="sources\Core\obj\**" />
<Compile Remove="sources\NinjaImpact\Attributes\**" />
<EmbeddedResource Remove="sources\Core\obj\**" />
<EmbeddedResource Remove="sources\NinjaImpact\Attributes\**" />
</ItemGroup>
</Project>
Is there something to do to enable the extension ?
Thank you in advance.
Screenshots of issue:
Input.IsActionPressed Yes
InputEvent.IsActionPressed NO
<PropertyGroup>
<StartAction>Program</StartAction>
<StartProgram>path to godot</StartProgram>
</PropertyGroup>
{
"profiles": {
"HotReloadTest": {
"commandName": "Project",
"commandLineArgs": "--path C:\\Projects\\HotReloadTest"
}
}
}
Extension refuses to install on VS 2017 Community
7/6/2020 22:12:11 - Microsoft VSIX Installer
7/6/2020 22:12:11 - -------------------------------------------
7/6/2020 22:12:11 - vsixinstaller.exe version:
7/6/2020 22:12:11 - 16.5.2047
7/6/2020 22:12:11 - -------------------------------------------
7/6/2020 22:12:11 - Command line parameters:
7/6/2020 22:12:11 - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\bunni\Downloads\GodotAddinVS.vsix
7/6/2020 22:12:11 - -------------------------------------------
7/6/2020 22:12:11 - Microsoft VSIX Installer
7/6/2020 22:12:11 - -------------------------------------------
7/6/2020 22:12:14 - Skipping product Microsoft.VisualStudio.Product.BuildTools (a8ba3e0d) since it does not support extensions
7/6/2020 22:12:14 - Initializing Install...
7/6/2020 22:12:16 - Extension Details...
7/6/2020 22:12:16 - Identifier : GodotAddinVS
7/6/2020 22:12:16 - Name : Godot Support
7/6/2020 22:12:16 - Author : Ignacio Roldán Etcheverry
7/6/2020 22:12:16 - Version : 1.1.1
7/6/2020 22:12:16 - Description : Support for Godot Engine C# projects, including debugging and extended code completion.
7/6/2020 22:12:16 - Locale : en-US
7/6/2020 22:12:16 - MoreInfoURL :
7/6/2020 22:12:16 - InstalledByMSI : False
7/6/2020 22:12:16 - SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
7/6/2020 22:12:16 -
7/6/2020 22:12:16 - SignatureState : Unsigned
7/6/2020 22:12:16 - Supported Products :
7/6/2020 22:12:16 - Microsoft.VisualStudio.Community
7/6/2020 22:12:16 - Version : [16.0,17.0)
7/6/2020 22:12:16 -
7/6/2020 22:12:16 - References :
7/6/2020 22:12:16 - -------------------------------------------------------
7/6/2020 22:12:16 - Identifier : Microsoft.VisualStudio.MPF.16.0
7/6/2020 22:12:16 - Name : Visual Studio MPF 16.0
7/6/2020 22:12:16 - Version : [16.0,)
7/6/2020 22:12:16 - MoreInfoURL :
7/6/2020 22:12:16 - Nested : No
7/6/2020 22:12:16 -
7/6/2020 22:12:16 - Prerequisites :
7/6/2020 22:12:16 - -------------------------------------------------------
7/6/2020 22:12:16 - Identifier : Microsoft.VisualStudio.Component.MonoDebugger
7/6/2020 22:12:16 - Name : Mono debugger
7/6/2020 22:12:16 - Version : [16.0,)
7/6/2020 22:12:16 -
7/6/2020 22:12:16 - -------------------------------------------------------
7/6/2020 22:12:16 - Identifier : Microsoft.VisualStudio.Component.CoreEditor
7/6/2020 22:12:16 - Name : Visual Studio core editor
7/6/2020 22:12:16 - Version : [16.0,)
7/6/2020 22:12:16 -
7/6/2020 22:12:16 - -------------------------------------------------------
7/6/2020 22:12:16 - Identifier : Microsoft.VisualStudio.Component.Roslyn.LanguageServices
7/6/2020 22:12:16 - Name : Roslyn Language Services
7/6/2020 22:12:16 - Version : [16.0,)
7/6/2020 22:12:16 -
7/6/2020 22:12:16 - -------------------------------------------------------
7/6/2020 22:12:16 - Identifier : Component.Xamarin
7/6/2020 22:12:16 - Name : Xamarin
7/6/2020 22:12:16 - Version : [16.6.30013.169,17.0)
7/6/2020 22:12:16 -
7/6/2020 22:12:16 - Signature Details...
7/6/2020 22:12:16 - Extension is not signed.
7/6/2020 22:12:16 -
7/6/2020 22:12:16 - Searching for applicable products...
7/6/2020 22:12:16 - Found installed product - Global Location
7/6/2020 22:12:16 - Found installed product - Visual Studio Community 2017
7/6/2020 22:12:16 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
OS/device including version:
Windows 10
Godot 3.2.3 beta1
Visual Studio 2019, Version 16.6.4
godot-csharp-visualstudio v1.1.1
Issue description:
The following issues are occurring in a brand new project with a single C# file that is only doing a GD.Print("Hello")
.
Sometimes this plugin will disconnect from the Godot editor even though the Godot editor has remained open. It's unfortunately not very reproducible and if I try again after waiting a while sometimes "Play in Editor" will start working again. If the plugin was disconnected I get this error alert and the following console output:
ERROR: Another resource is loaded from path 'res://scripts/TestScript.cs' (possible cyclic resource inclusion).
At: core/resource.cpp:82
ERROR: godot_icall_GD_pusherror: Unhandled exception in the peer loop
System.Threading.ThreadAbortException: Thread was being aborted.
at System.IO.StreamReader.ReadBufferAsync () [0x001e0] in <34e7ab706f1141f9b981d74fbe2f5560>:0
at System.IO.StreamReader.ReadLineAsyncInternal () [0x00093] in <34e7ab706f1141f9b981d74fbe2f5560>:0
at GodotTools.IdeMessaging.Peer.ReadLine () [0x000b0] in <22b1cc7a6c9542d4958cd3d1d92a6515>:0
at GodotTools.IdeMessaging.Peer.Process () [0x0033a] in <22b1cc7a6c9542d4958cd3d1d92a6515>:0
At: modules/mono/glue/gd_glue.cpp:250
I have also seen this error come up randomly in a similar manner, usually after I close the running game instance:
Other times the "Play in Editor" functionality of this plugin has occasionally crashed the Godot editor. It doesn't seem to be related to errors in the C# code, and again this project is so minimal that nothing I'm doing should be crashing the editor.
These crashes also aren't very reproducible, and I have found no discernible pattern as to what triggers it so far but it has happened more than once.
This is the last mono log before one of these crashes:
Config attempting to parse: 'C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/etc\mono\config'. (in domain Mono, info)
Image addref mscorlib[00000000170FD620] (asmctx DEFAULT) -> C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/mscorlib.dll[000000001726EA80]: 2 (in domain Mono, info)
Prepared to set up assembly 'mscorlib' (C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/mscorlib.dll) (in domain Mono, info)
AOT: image 'C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/mscorlib.dll.dll' not found: The system cannot find the file specified.
(in domain Mono, info)
AOT: image 'C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/aot-cache/amd64/mscorlib.dll.dll' not found: The system cannot find the path specified.
(in domain Mono, info)
Assembly mscorlib[00000000170FD620] added to domain GodotEngine.RootDomain, ref_count=1 (in domain Mono, info)
Assembly mscorlib[00000000170FD620] added to domain GodotEngine.Domain.Scripts, ref_count=2 (in domain Mono, info)
Image addref GodotSharp[00000000170FE430] (asmctx DEFAULT) -> C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharp.dll[00000000172EB340]: 3 (in domain Mono, info)
Prepared to set up assembly 'GodotSharp' (C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharp.dll) (in domain Mono, info)
Assembly GodotSharp[00000000170FE430] added to domain GodotEngine.Domain.Scripts, ref_count=1 (in domain Mono, info)
Loading reference 0 of C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharp.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Config attempting to parse: ''. (in domain Mono, info)
Assembly Ref addref GodotSharp[00000000170FE430] -> mscorlib[00000000170FD620]: 3 (in domain Mono, info)
Image addref GodotSharpEditor[00000000170FE670] (asmctx DEFAULT) -> C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharpEditor.dll[0000000017443A40]: 3 (in domain Mono, info)
Prepared to set up assembly 'GodotSharpEditor' (C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharpEditor.dll) (in domain Mono, info)
Assembly GodotSharpEditor[00000000170FE670] added to domain GodotEngine.Domain.Scripts, ref_count=1 (in domain Mono, info)
Loading reference 0 of C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharpEditor.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref GodotSharpEditor[00000000170FE670] -> mscorlib[00000000170FD620]: 4 (in domain Mono, info)
Loading reference 2 of C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharp.dll asmctx DEFAULT, looking for System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Image addref System[00000000170FE700] (asmctx DEFAULT) -> C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.dll[0000000017497010]: 2 (in domain Mono, info)
Prepared to set up assembly 'System' (C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.dll) (in domain Mono, info)
Assembly System[00000000170FE700] added to domain GodotEngine.Domain.Scripts, ref_count=1 (in domain Mono, info)
Assembly Ref addref GodotSharp[00000000170FE430] -> System[00000000170FE700]: 2 (in domain Mono, info)
Loading reference 0 of C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System[00000000170FE700] -> mscorlib[00000000170FD620]: 5 (in domain Mono, info)
Loading reference 2 of C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.dll asmctx DEFAULT, looking for System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (in domain Mono, info)
Image addref System.Configuration[00000000174BBF10] (asmctx DEFAULT) -> C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Configuration.dll[00000000174CD0A0]: 2 (in domain Mono, info)
Prepared to set up assembly 'System.Configuration' (C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Configuration.dll) (in domain Mono, info)
Assembly System.Configuration[00000000174BBF10] added to domain GodotEngine.Domain.Scripts, ref_count=1 (in domain Mono, info)
Assembly Ref addref System[00000000170FE700] -> System.Configuration[00000000174BBF10]: 2 (in domain Mono, info)
Loading reference 0 of C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Configuration.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Configuration[00000000174BBF10] -> mscorlib[00000000170FD620]: 6 (in domain Mono, info)
Loading reference 2 of C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Configuration.dll asmctx DEFAULT, looking for System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Configuration[00000000174BBF10] -> System[00000000170FE700]: 3 (in domain Mono, info)
Loading reference 1 of C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Configuration.dll asmctx DEFAULT, looking for System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Image addref System.Xml[00000000174BDAA0] (asmctx DEFAULT) -> C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Xml.dll[000000001756A230]: 2 (in domain Mono, info)
Prepared to set up assembly 'System.Xml' (C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Xml.dll) (in domain Mono, info)
Assembly System.Xml[00000000174BDAA0] added to domain GodotEngine.Domain.Scripts, ref_count=1 (in domain Mono, info)
Assembly Ref addref System.Configuration[00000000174BBF10] -> System.Xml[00000000174BDAA0]: 2 (in domain Mono, info)
Loading reference 0 of C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Xml.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Xml[00000000174BDAA0] -> mscorlib[00000000170FD620]: 7 (in domain Mono, info)
DllImport attempting to load: 'BCrypt.dll'. (in domain Mono, info)
DllImport error loading library 'C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5\BCrypt.dll': 'The system cannot find the file specified.
'. (in domain Mono, info)
DllImport error loading library 'C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5\BCrypt.dll': 'The system cannot find the file specified.
'. (in domain Mono, info)
DllImport error loading library 'C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5\BCrypt.dll': 'The system cannot find the file specified.
'. (in domain Mono, info)
DllImport loaded library 'BCrypt.dll'. (in domain Mono, info)
DllImport searching in: 'BCrypt.dll' ('BCrypt.dll'). (in domain Mono, info)
Searching for 'BCryptGenRandom'. (in domain Mono, info)
Probing 'BCryptGenRandomW'. (in domain Mono, info)
Could not find 'BCryptGenRandomW' due to 'The specified procedure could not be found.
'. (in domain Mono, info)
Probing 'BCryptGenRandom'. (in domain Mono, info)
Found as 'BCryptGenRandom'. (in domain Mono, info)
DllImport attempting to load: '__Internal'. (in domain Mono, info)
DllImport loaded library '(null)'. (in domain Mono, info)
DllImport searching in: '__Internal' ('(null)'). (in domain Mono, info)
Searching for 'SetThreadErrorMode'. (in domain Mono, info)
DllImport searching in: '__Internal' ('(null)'). (in domain Mono, info)
Searching for 'GetFileAttributesExW'. (in domain Mono, info)
Probing 'GetFileAttributesExWW'. (in domain Mono, info)
Could not find 'GetFileAttributesExWW' due to 'The specified procedure could not be found.
'. (in domain Mono, info)
Probing 'GetFileAttributesExW'. (in domain Mono, info)
Found as 'GetFileAttributesExW'. (in domain Mono, info)
Loading reference 2 of C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Xml.dll asmctx DEFAULT, looking for System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Xml[00000000174BDAA0] -> System[00000000170FE700]: 4 (in domain Mono, info)
Loading reference 3 of C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.dll asmctx DEFAULT, looking for System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System[00000000170FE700] -> System.Xml[00000000174BDAA0]: 3 (in domain Mono, info)
Image addref GodotTools[00000000174BC390] (asmctx DEFAULT) -> C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Tools/GodotTools.dll[00000000239697B0]: 3 (in domain Mono, info)
Prepared to set up assembly 'GodotTools' (C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Tools/GodotTools.dll) (in domain Mono, info)
Assembly GodotTools[00000000174BC390] added to domain GodotEngine.Domain.Scripts, ref_count=1 (in domain Mono, info)
Image addref GodotTools.ProjectEditor[00000000174BC8A0] (asmctx DEFAULT) -> C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Tools/GodotTools.ProjectEditor.dll[0000000023D20E40]: 3 (in domain Mono, info)
Prepared to set up assembly 'GodotTools.ProjectEditor' (C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Tools/GodotTools.ProjectEditor.dll) (in domain Mono, info)
Assembly GodotTools.ProjectEditor[00000000174BC8A0] added to domain GodotEngine.Domain.Scripts, ref_count=1 (in domain Mono, info)
Image addref VehiclePort[00000000174BD350] (asmctx DEFAULT) -> C:/dev/Godot/VehiclePort/.mono/temp/bin/Debug/VehiclePort.dll[0000000023A760E0]: 3 (in domain Mono, info)
Prepared to set up assembly 'VehiclePort' (C:/dev/Godot/VehiclePort/.mono/temp/bin/Debug/VehiclePort.dll) (in domain Mono, info)
Assembly VehiclePort[00000000174BD350] added to domain GodotEngine.Domain.Scripts, ref_count=1 (in domain Mono, info)
Loading reference 1 of C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharp.dll asmctx DEFAULT, looking for System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Image addref System.Core[00000000174BFBD0] (asmctx DEFAULT) -> C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Core.dll[0000000023CA07B0]: 2 (in domain Mono, info)
Prepared to set up assembly 'System.Core' (C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Core.dll) (in domain Mono, info)
Assembly System.Core[00000000174BFBD0] added to domain GodotEngine.Domain.Scripts, ref_count=1 (in domain Mono, info)
Assembly Ref addref GodotSharp[00000000170FE430] -> System.Core[00000000174BFBD0]: 2 (in domain Mono, info)
Loading reference 0 of C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Core.dll asmctx DEFAULT, looking for mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (in domain Mono, info)
Assembly Ref addref System.Core[00000000174BFBD0] -> mscorlib[00000000170FD620]: 8 (in domain Mono, info)
GC_MAJOR: (user request) time 0.68ms, stw 0.81ms los size: 1024K in use: 64K (in domain Mono, info)
GC_MAJOR_SWEEP: major size: 1040K in use: 187K (in domain Mono, info)
GC_MAJOR: (user request) time 0.28ms, stw 0.32ms los size: 1024K in use: 64K (in domain Mono, info)
GC_MAJOR_SWEEP: major size: 1056K in use: 187K (in domain Mono, info)
GC_MAJOR: (user request) time 0.28ms, stw 0.40ms los size: 1024K in use: 64K (in domain Mono, info)
GC_MAJOR_SWEEP: major size: 1056K in use: 188K (in domain Mono, info)
GC_MINOR: (user request) time 0.12ms, stw 0.22ms promoted 0K major size: 1056K in use: 188K los size: 1024K in use: 64K (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly mscorlib[00000000170FD620], ref_count=8 (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly GodotSharp[00000000170FE430], ref_count=1 (in domain Mono, info)
Unloading assembly GodotSharp [00000000170FE430]. (in domain Mono, info)
Unloading image data-0000000017334010 [0000000017400730]. (in domain Mono, info)
Unloading image C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharp.dll [00000000172EB340]. (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly GodotSharpEditor[00000000170FE670], ref_count=1 (in domain Mono, info)
Unloading assembly GodotSharpEditor [00000000170FE670]. (in domain Mono, info)
Unloading image data-000000001744C7C0 [0000000017451BC0]. (in domain Mono, info)
Unloading image C:/dev/Godot/VehiclePort/.mono/assemblies/Debug/GodotSharpEditor.dll [0000000017443A40]. (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly System[00000000170FE700], ref_count=3 (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly System.Configuration[00000000174BBF10], ref_count=2 (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly System.Xml[00000000174BDAA0], ref_count=3 (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly GodotTools[00000000174BC390], ref_count=1 (in domain Mono, info)
Unloading assembly GodotTools [00000000174BC390]. (in domain Mono, info)
Unloading image data-0000000023BB9280 [0000000023D3FA30]. (in domain Mono, info)
Unloading image C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Tools/GodotTools.dll [00000000239697B0]. (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly GodotTools.ProjectEditor[00000000174BC8A0], ref_count=1 (in domain Mono, info)
Unloading assembly GodotTools.ProjectEditor [00000000174BC8A0]. (in domain Mono, info)
Unloading image data-0000000023BCCB70 [0000000023D21570]. (in domain Mono, info)
Unloading image C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Tools/GodotTools.ProjectEditor.dll [0000000023D20E40]. (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly VehiclePort[00000000174BD350], ref_count=1 (in domain Mono, info)
Unloading assembly VehiclePort [00000000174BD350]. (in domain Mono, info)
Unloading image data-0000000023968660 [0000000023A76810]. (in domain Mono, info)
Unloading image C:/dev/Godot/VehiclePort/.mono/temp/bin/Debug/VehiclePort.dll [0000000023A760E0]. (in domain Mono, info)
Unloading domain GodotEngine.Domain.Scripts[00000000172900B0], assembly System.Core[00000000174BFBD0], ref_count=1 (in domain Mono, info)
Unloading assembly System.Core [00000000174BFBD0]. (in domain Mono, info)
Unloading image C:\dev\Godot\_GODOT\Godot_v3.2.3-beta1_mono_win64/GodotSharp/Mono/lib/mono/4.5/System.Core.dll [0000000023CA07B0]. (in domain Mono, info)
GC_MAJOR: (user request) time 0.19ms, stw 0.32ms los size: 0K in use: 0K (in domain Mono, info)
GC_MAJOR_SWEEP: major size: 240K in use: 2K (in domain Mono, info)
If I use this extension, debugging does not work. If I apply the stub project workaround, debugging works but IntelliSense completely stops working for that project. Deleting the StubProj and restarting VS solves that, but then of course debugging does not work.
Windows 10
Visual Studio 2022
Godot v3.4.2.stable.mono.official [45eaa2daf]
Godot C# extension for Visual Studio v2.0.0
To get the debugging working, I needed to use the stub project workaround here: https://gist.github.com/31/302bab2630ddf8d90ab4aec0d358b538
Initially everything worked fine, including IntelliSense.
Yesterday IntelliSense wasn't working at first, but then all I remember doing was restarting VS and it was working again.
Today it was not working at all, after multiple restarts.
To clarify, IntelliSense works correctly with any other VS project, just not with a Godot project. All the while debugging works fine, the "Play in editor" works fine, Godot types are recognized, there are no apparent errors. It's just the code completion that's missing, regardless of what member or type I use (I start typing the name of a variable I've defined, and nothing. I type "GD." and nothing. You get the idea.)
(Also, I noticed that after closing Visual Studio with the Godot project, devenv.exe keeps running (and the Visual Studio instance with the project name in its title keeps showing up among the background processes in task manager), until I kill it. I'm only noting this here because this also only happens with a Godot project, and only after the workaround is applied. It doesn't happen with any other Visual Studio project. So possibly the Godot extension is causing this.)
edit: I've just realized that some people have mentioned this problem in the comments under #10 already. Apparently only some of us have this problem, I wonder why...
reproducing:
create a new Godot project (in a custom location) called Test
create 3D scene
rename root node "Spatial" to "MainScene"
select MainScene and add a new C# script ("MainScene.cs")
verify that in editor settings, Mono external editor is set to Visual Studio
double click on MainScene.cs in Godot does nothing (devenv.exe is not running)
save scene
go to project in file manager
open sln file ("Test.sln") with VS2022
open MainScene.cs
in _Ready() method, start typing "GD.", IntelliSense is working fine
debugging does not work though, so perform steps of godot-3.2.3-VS-extension-workaround.md (via https://gist.github.com/31/302bab2630ddf8d90ab4aec0d358b538 )
(in the process of that workaround, we do need to close VS, it does in fact properly close this time, checked in task manager)
after those steps are done, open MainScene.cs
in _Ready() method, start typing "GD.", IntelliSense is NOT working.
close VS.
devenv.exe is still running
in task manager end task "Microsoft Visual Studio 2022"
open sln file ("Test.sln") with VS2022 again
IntelliSense is still not working
delete StubProj project
close VS
in task manager end task "Microsoft Visual Studio 2022"
delete StubProj folder from the project folder
open sln file ("Test.sln") with VS2022 yet again
IntelliSense IS working again. However, debugging is not.
close VS (VS does now properly close.)
Hi,
I'm stuck with the installer because it fails with the Xamarin.VisualStudio package.
29.01.2022 19:42:38 - Package 'Xamarin.VisualStudio,version=17.0.0.343' failed to install. System.IO.IOException: The file 'C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Microsoft.Common.CrossTargeting.Targets\ImportBefore\Xamarin.Common.CrossTargeting.targets' already exists.
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.<InstallCoreInternal>g__install|31_1(PackagePart part, Boolean saveExtensionManifest, <>c__DisplayClass31_0& , <>c__DisplayClass31_1& , <>c__DisplayClass31_2& , <>c__DisplayClass31_3& , <>c__DisplayClass31_4& )
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.InstallCoreInternal(String localPath, String installDir, InstallablePackage pkg)
at Microsoft.VisualStudio.Setup.Installer.FileInstaller.<>c__DisplayClass7_0.<InstallCore>b__0()
at Microsoft.VisualStudio.Setup.Installer.FileInstaller.DoAction(Func`1 action)
at Microsoft.VisualStudio.Setup.Installer.FileInstaller.InstallCore(String localPath, String installDir, InstallablePackage pkg)
at Microsoft.VisualStudio.Setup.Installer.InstallerBase.InstallHelper(InstallData installData)
I'm just wondering if that's something you have control of or if its a "visual studio extensions installer" thing.
Failing an installer because a file already exists seems kinda wrong.
BR Matthias
See title.
I was directed to this extension by a helpful but somewhat random youtube video I found by searching (FinePointCGI).
https://www.youtube.com/watch?v=lOjOb4Lv_ww
I then also found another seemingly unofficial gist describing the process along with useful comments from people with issue.
https://gist.github.com/31/302bab2630ddf8d90ab4aec0d358b538
Why is this ESSENTIAL information not documented clearly here in the MD doc?
Required steps such the need to manually copy a "magical" csproj contents into the Stub project csproj file is utterly dubious / stupidly brittle. I detest "magical" "don't ask why, just do it" steps as it leaves us without the ability or knowledge to help ourselves. We need to have at least some details on what this csproj is actually doing. Why is it even needed?
Case in point, as of this week the "Play in editor" currently works (starts the app in the Godot editor with debugging) for VS 2019 but not VS2022 (see comments on Gist).
If the information in the above video and Gist are correct, please document those steps clearly here. This is possibly the messiest and somewhat amatuerish install I've had to fight my way through for a long time.
NB: the extension VSIX doesn't even install cleanly first time (fails with a file already exists error). I eventually found another thread here saying to install the Mobile dev tools for .NET first. #24
Just painful all round at the moment.
I was waiting fort visual studio integration in Godot , now it comes in 3.2.3 beta .
I have only some feature requests which i guess it must be supported by default .
When using the extension with JetBrains Re-Sharper and enabling re-sahrper intellisense , the Paths , Signals... suggestions and completion gets disabled .
Opening a script file from the Godot Editor opens the files in visual studio without getting the file selected in the Solution Explorer
Windows 10
Godot 3.4.4
Visual Studio Community 2022 (17.2)
Extension v2.0.0
My project depends on another C# project, presented as another csproj in the Visual Studio solution. When building the game everything runs fine, both by building in Visual Studio and via the Godot Editor. The code also works well both by starting the project in Godot or in Visual Studio. However, if I place a breakpoint in the code of the dependency library, it is not hit ever.
The referenced project is added as a reference both in the main game csproj (obviously) and in the StubProj project (the workaround to make the exension work). Break points work fine when placing them in the main project code.
Is this a thing that should not work or a bug or is there something that must be done for it to work?
There have been THREE PRs recently
Please provide the following information
I am interested to know if these PRs work with Godot4 with dotnet6 merged
Firstly you need to create a new debugging profile Menu > Debug > Debug Properties
Selecting executable as a new profile type in the top corner of the profile configurator.
[Optional] Rename the executable profile
e.g. Godot_v4.0.1-rc2_mono_win64.exe
in the command line
--path . --verbose
in the command line
--path . scene.tscn --verbose
in the command line
--path . --script <script> --verbose
in the command line
--path . --editor --verbose
Debugging Godot4 beta projects from VS and VSCode
I haven't found a fix for the first issue, but I've shared a GD.cs to pipe GD.Print functions to the output window. Just drop it into your project folder if you want that.
If you want to also be able to debug editor tools add another profile and use the same arguments but add --editor as well.
--path . --editor
in the command line
Run+Debug Godot4 C# projects from Visual Studio
Debugging Godot4 beta projects from VS and VSCode
Is this Obsolete? VS2022 works with Godot 4.Beta1 no extension needed
Sorry for opening an issue
but does this include the support for profiling code and memory?,
installing Vs to test that would take couple days of downloading so I had to check first
I have some suggestions
Add the Godot icon for the Godot menu and its Launch button
Make the launch button save the current scene before launch?
Replace the debug button(the one that have C# text thingy) with launch button with the Godot Engine icon:
https://docs.microsoft.com/en-us/visualstudio/extensibility/adding-icons-to-menu-commands?view=vs-2022
Many Godot 4 industry partners specifically specify keeping the Godot 4 for .NET up-to-date.
If it is Godot4 for .NET, when the Visual Studio 2022 solution project is created, the default debugging profile will be replaced with the executable profiles listed above
The instructions for creating the executable profiles have been discussed here.
Do add/contribute further suggestions and improvements to the Godot 4 VS2022 Extension
By default the extension creates the following launch configurations:
godot.csharp.executablePath
setting can be configured to automatically populate theLaunch
configuration.Launch
option and also requires the valueLaunch
configuration.Could we open the discussion?
I am curious how the Godot .NET community would react to the new possibilities borught about by Godot4 now supporting NativeAOT.
It would be great if we could discuss it HERE. I understand the official way is to discuss it at the main Godot Proposal discussion. By doing it here we could share ideas ONLY for Godot4 visual studio support.
Using the workaround described in #10 to get the build options to show, using Play in Editor will work the first time, triggering a build in the editor and launching the game, as expected.
However, by closing the game window, changing a script, and repeating Play in Editor, immediately after either Visual Studio will complain about disconnecting from the editor ("No Godot editor instance connected") or the editor itself will hard crash, while the game window itself launches just fine. Seems to be 100% reproducible. If it complains about a disconnect, doing Play in Editor again will get it to work as expected, but the same thing happens with the next build.
Happens in any project, including simple one-script tests. Nothing weird in the output console in Visual Studio, and no consistent error in the Godot console or logs, it usually just silently fails, but I'll include a couple. New to Godot and don't really know how to debug this, so would appreciate some help.
I was able to get VS2022 to Run+Debug (including hitting breakpoints and hot-reload) by following the steps outlined here: https://www.reddit.com/r/GodotCSharp/comments/xgpqfh/oc_rundebug_godot4_c_projects_from_visual_studio/
There are some pains, specifically no Console.WriteLine() support, and Godot errors are not shown unless Native Debugging is enabled. But otherwise it works, and pretty good.
OS/device including version:
Windows 10, running the 1.0 branch with Visual Studio Community 2019
Issue description:
Adding the following snippet to my csproj broke the ability for visual studio to debug the program. It "hits" the breakpoints, but says "No compatible code running on the thread" and doesn't see the source file.
<PropertyGroup>
<PathMap>$(SolutionDir)=.</PathMap>
</PropertyGroup>
I'm not absolutely positive this is a bug in the extension, but it seems like a safe bet.
(My colleague ran into a similar issue using the VS Code extension and opened this bug, this report reflects the different issue that happened when I tried to do the same thing with Visual Studio.)
Hello, I would like to try out this addin with Godot 3.2.3 RC3. However I have no idea how to use it! I downloaded and installed the vsix file from the release section successfully but I don't know what I am supposed to do with the contents of the godot-csharp-visualstudio-1.1.1 folder and where to put it. I tried putting it in addons but the Godot editor won't recognise it so I assume that is not the correct way of loading it in.
Any help would be appreciated as well.
If the installation is non-standard compared to other godot extensions and addons it may be useful to have a quick start/installation guide in the readme!
Windows 10
Godot 3.4.3
Microsoft Visual Studio Community 2022 (64-bit) - Current: Version 17.1.0
Using version 2.0.0 of the extension
As I understand it the package is supposed to add launch profiles, similar to the extension for VSCode (that one worked wonderfully) but it seems to do absolutely nothing in Visual Studio 2022.
I tried installing and resinstalling, enabling and disabling the extension, I looked through the available settings for that extension (and found that it needed the path to Godot, that I added).
But no launch profiles are added, so I'm not sure if it's a bug, if I forgot a step, or if this simply isn't what the extension is supposed to do.
OS/device including version:
Windows 10
Issue description:
Expected:
Expected to see Play In Editor
, Launch
, or Attach
Actual:
Only see the Project name and it will not launch instead throwing an error of A project with an Output Type of Class Library cannot be started directly
NOTES
This worked just fine when using RC3. My guess is that when RC4 upgraded to the csproj sdk format, it broke compatibility.
I updated VisualStudip from 17.2.5 to 17.3.0 and the extension stopped working.
I did the update on two seperate machines to verify this issue.
When pressing "Play in Editor" nothing happens. Not even a error message or console log.
Works fine if I go back to 17.2.5.
In order to use such methods for inputs it requires an int type. However you can't use ButtonList
enum.
Meaning you have to do this instead.
Input.IsMouseButtonPressed((int)ButtonList.Left)
Simply suggest to have an override on all related methods to allow ButtonList
...
It can even simply do the conversion, just as long the developer doesn't explicit need to make the cast.
It's possible to use completion providers by referencing the NuGet package as an analyzer.
Not all editors support this. From my experience:
We don't really care about both VS IDEs as we can still provide it via extensions there.
VSCode is the main motivation as this would replace our current basic completion provider which uses regex and doesn't have access to semantic info.
This is blocked by dotnet/roslyn#46803. We need that method because for something like GetNode("Te
we want the result to be GetNode("TextEdit"
, but without our GetChangeAsync
it's GetNode("Te"TextEdit"
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.