Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
n-tiz opened this issue Oct 23, 2020 · 4 comments
Closed

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

n-tiz opened this issue Oct 23, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@n-tiz
Copy link

n-tiz commented Oct 23, 2020

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 n-tiz added the bug Something isn't working label Oct 23, 2020
@n-tiz
Copy link
Author

n-tiz commented Oct 28, 2020

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

  • It looks that the package uses the OnAfterOpenProject event from the IVsSolutionEvents interface. But the package is loaded asynchronously, so the solution (and the project) may have already been loaded before the package.

  • The IsGodotProject method try to find the GUID from the GodotFlavoredProjectFactory, but when I create a project with Godot, the GUID is not added to the csproj.

@LennyPhoenix
Copy link

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
Copy link
Author

n-tiz commented Nov 1, 2020

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
Copy link
Contributor

neikeq commented Nov 1, 2020

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.

@neikeq neikeq closed this as completed Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants