godotengine / godot-csharp-visualstudio

Godot C# extension for Visual Studio
MIT License
251 stars 31 forks source link

Can't get extension working (missing "Play in Editor" command) #13

Closed n-tiz closed 3 years ago

n-tiz commented 3 years ago

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:

image image

n-tiz commented 3 years ago

Still working on that issues, and I found two problems:

LennyPhoenix commented 3 years ago

I'd love if this issue could be resolved, as it currently renders the extension unusable.

In the mean time, is there anything I can do to add these tags manually?

n-tiz commented 3 years ago

I spend the 4 lasts days trying to fix the VS addin, but actually it's really complicated..

In the last version, the godot team changed the csproj to the new format (SDK-Style/CPS), and it totally broke the Addin because it used the "flavored" projet (only available in the old csproj format).

It's not even possible to know if the loaded project is a godot project ! The only way i found is to parse the XML.. The new VS API is really limited and not documented at all..

The only good news is that the new csproj format uses nuget to find the Godot SDK and provide completion by it-self (the AddIn no longer needed).

I'm still trying to "fix" the debug part by totally rewriting it..

neikeq commented 3 years ago

Closing as duplicate of #10. Read my comments there as there's a workaround that can be used in the meantime.

I'm also having issues to get things working with the new project system, and I don't even know if right now it supports what we need. If you have any success with that please let me know.