Hot Module Reload doesn't work when the C#MS is referenced through Unity Package Manager.
When you reference a package via UPM, the files end up in /Library/PackageCache unless the UPM reference using the file:// schema, in which case, the files just don't get copied anywhere; because UPM knows where the file:// files are.
When HMR is enabled, the source files are only loaded into the container via bind-mounts. However, the bind-mounts are broken for UPM referenced C#MS, and therefor the dotnet process fails to compile the source code (because it doesn't exist).
As a workaround, you can simply disable HMR.
As a hint for how the Dockerfile is generated, look at the DockerGenerator.GetString function.
Very likely, the issue is that the FileUtils.GetFullSourcePath function isn't working when the C#MS exists outside of Assets or Packages
This is worth a quick research mission, spend a few hours looking at this, and if we can't easily fix it, we'll re-assess priority for 1.x release vs 2.x release.
Hot Module Reload doesn't work when the C#MS is referenced through Unity Package Manager.
When you reference a package via UPM, the files end up in
/Library/PackageCache
unless the UPM reference using thefile://
schema, in which case, the files just don't get copied anywhere; because UPM knows where thefile://
files are.When HMR is enabled, the source files are only loaded into the container via bind-mounts. However, the bind-mounts are broken for UPM referenced C#MS, and therefor the
dotnet
process fails to compile the source code (because it doesn't exist).As a workaround, you can simply disable HMR.
As a hint for how the Dockerfile is generated, look at the
DockerGenerator.GetString
function.Very likely, the issue is that the
FileUtils.GetFullSourcePath
function isn't working when the C#MS exists outside of Assets or Packages