SuessLabs / VsLinuxDebug

VS Extension to remotely deploy and debug your .NET (Core) C# solutions directly to your Linux or Raspberry Pi devices! .NET Core 3.1, .NET 5, 6, 7, 8, 9
https://marketplace.visualstudio.com/items?itemName=SuessLabs.VSLinuxDebugger
MIT License
37 stars 8 forks source link

Specify folders to exclude and include when deploying #57

Open HakanL opened 1 year ago

HakanL commented 1 year ago

I noticed I have a runtimes folder on my Linux host (the files that are deployed with this extension) that includes binaries for 12 platforms including Windows and OSX. It would speed up deployment if I could exclude these from the deployment. Also I have a folder for client-side web files (Spa) that sits in a shared project, I'd like these to be included (they aren't by default).

DamianSuess commented 1 year ago

@HakanL, though this is more suited for the Discussions section of this repo, this is an interesting enhancement request.

Initially, I was skeptical about this feature early on considering the following thought process, "_if the build system places a file in the output folder then it should be uploaded to ensure integrity." However, this is not always true as you pointed out, and as a personal example building with CodeAnalysis leads to an unnecessary 13 language folders coming along for the ride.

Though there are many ways this can be achieved, what are your thoughts on the following?

  1. A .linuxdbg file which uses a syntax approach similar to a primal .gitignore and is placed in the same folder as the .sln or .csproj file?
    • PRO: It uses a common file filter syntax approach. Customizable per project.
    • CON: Yet another .config file. What if more than one file is found, who-overrides-who?
  2. Add a filter textbox into Tools > Options window.
    • PRO: Can be reused across projects without creating new filter files.
    • CONS: Using a comma or semicolon as a delimiter conflicts with file names. The rule would apply to all projects uploaded.

Frankly, I'm leaning towards 1.

HakanL commented 1 year ago

Yeah maybe it should've been a discussion first. I don't like proposal 2, but what about adding a property to the csproj file that uses the .gitignore syntax? I realize we're not trying to replace the publish process, but we want the deployment to a Linux host to be as quick and seamless as possible, as you'll push the project over to the host many times during development. Anything that can streamline that process is welcome IMHO.