JaneySprings / DotNet.Meteor

A VSCode extension that can run and debug .NET apps (Xamarin, MAUI, Avalonia)
https://marketplace.visualstudio.com/items?itemName=nromanov.dotnet-meteor
MIT License
269 stars 10 forks source link

Contribution guide? #47

Closed saamerm closed 2 weeks ago

saamerm commented 1 year ago

Hi this is AMAZING @JaneySprings ! Thank you so much for your work on this I can't wait to see this become mainstream and Hot Reload working with Meteor!

I understand you are probably working on this mostly on your own. Are you open to help on this extension, how can I debug locally? Is there a roadmap/backlog of items that you want to take meteor to?

You should add a "Sponsors" option so people can support your work on this!

JaneySprings commented 1 year ago

Thank you for your feedback! I really should to make a contribution guide.

If you want to debug the extension, you can look at .vscode folder. There are some launch tasks inside it.

image

Run extension - for debugging a typescript part and launching extension in the extension development host .NET Core launch - for debugging a csharp part of the extension. .NET Core attach - for attaching to the running debugger process.

If you want to build the extension in the debug, you can execute the following commands in the root folder: dotnet tool restore - for restoring tools. dotnet cake - for building VSIX in the debug configuration.

You can find more tasks and options in the build.cake file:

image

Don't forget to restore git submodules after cloning the repository!

scriptBoris commented 1 year ago

Can you write video sesson such as short Youtube?

PrimeTimeTran commented 1 year ago

Second @scriptBoris and @JaneySprings.

I know in the setup instructions it says select project in a multi project workspace. However in the status bar I don't see where I can do that. Also there's no documentation on how I can configure which project inside of launch.json.

    "configurations": [
        {
            "name": ".NET Meteor Debugger",
            "type": "dotnet-meteor.debugger",
            "request": "launch",
            "preLaunchTask": "dotnet-meteor: Build",
        }
    ]    

Please advise. Thanks in advance

JaneySprings commented 1 year ago

Hello! You can see the project being launched in the status bar. If you don't see it, please write a separate issue and provide information about yours .csproj files!

image

I also have a wiki page about tasks customizations: https://github.com/JaneySprings/DotNet.Meteor/wiki/Predefined-task-customization

PrimeTimeTran commented 1 year ago

@JaneySprings, The closet thing I see in my status bar is the .NET Meteor prompt. When I click it though it opens the menu at the top asking me to pick debug from launch.json.

Screenshot 2023-06-05 at 3 52 12 AM

I want it to open the project inside of ./API/API.csproj

Screenshot 2023-06-05 at 3 54 04 AM
<Project Sdk="Microsoft.NET.Sdk.Web">

    <PropertyGroup>
        <TargetFramework>net7.0</TargetFramework>
        <Nullable>enable</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
        <UserSecretsId>aspnet-API-SECRET</UserSecretsId>
        <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
    </PropertyGroup>

    <PropertyGroup Condition=" '$(RunConfiguration)' == 'https' " />
    <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.5" />
        <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.5" />
        <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.5" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.5" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.5">
          <PrivateAssets>all</PrivateAssets>
          <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.Identity.Web" Version="1.16.0" />
        <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
        <PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0" />
    </ItemGroup>

    <ItemGroup>
      <Content Include="..\.dockerignore">
        <Link>.dockerignore</Link>
      </Content>
    </ItemGroup>

    <ItemGroup>
      <ProjectReference Include="..\DataAccess\DataAccess.csproj" />
      <ProjectReference Include="..\Services\Services.csproj" />
    </ItemGroup>

</Project>

I can open up an issue if you'd like that for documentation no problem. But not sure if the issue is with me where I'm not seeing an option of even what to title the issue. Please advise and I'll do that no problem.

Thanks for your help & work in advance~!

JaneySprings commented 1 year ago

The project you sent is not executable. .NET Meteor can run only Windows, MacOS, iOS and Android apps. For example:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net7.0-android</TargetFrameworks>
    <OutputType>Exe</OutputType>
    <RootNamespace>...</RootNamespace>
    <ApplicationId>com.companyname.XXXX</ApplicationId>
    <ApplicationIdGuid>efdeab8c-c951-4414-ab3d-ba9be120d4b4</ApplicationIdGuid>
    <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
    <ApplicationVersion>1</ApplicationVersion>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
  </PropertyGroup>

See Compatibility section in the ReadMe

PrimeTimeTran commented 1 year ago

Thanks for clearing this up for me. Appreciate ya!

JaneySprings commented 2 weeks ago

Sponsorship and contributions are now available.