maartenba/DotNetWatch

regression for issue #2 Unable to use hotreload with --framework flag in command line enhancement

GiampaoloGabba opened this issue · 10 comments

As the title says, there is a regression for the issue #2.
The plugin started again to add the --framework parameter, breaking the hotreload functionality.

I have a global.json specifing wich version i'm using, there is no need for the plugin to add the --framework parameter, breaking the hotreload.

Imho this parameter should be added as an optin, the default behaviour should be to not add it at all.

Thank you!

Some additional information: I have only one target framework available for this project, but the --framework parameter is still added.

image

Can you share the command that was generated when you run the app?

Plus, do you have .net 8 preview on your machine?

The generated command is:
"C:\Program Files\dotnet\dotnet.exe" watch run --project D:/Dati/Dropbox/Sviluppo/Web/TestTavoloUnito/WebUi/WebUi.csproj --framework net7.0

and yes, i have installed VS2022 preview wich came with .net8 preview :( maybe this is the culprit?

I believe it is. If you run this on the command line without the framework parameter, does that pick up net7.0 properly or does it run with net8.0?

I think that launching from the command line without the framework parameter picks up the .net7 version (or at least oh my poshj tells me that the .net version is 7.0.42):

image

If i use the --verbose flag i can see this:
image

So i'm pretty sure is picking up the .net7 automatically (also i have a global.json for my solution like this:

{ "sdk": { "version": "7.0.0", "rollForward": "latestMajor", "allowPrerelease": false } }

That checks out indeed. I'll see if I can omit the parameter altogether if there's only one TFM available in the project. Thanks for this suggestion/enhancement! Work in progress...

An update was published to the marketplace and should be available in the next 24h.

It seems the new version is only compatible with 2023.3.x, which is currently in EAP.
is there any workaround to install it on 2023.2.x?

Ah! That’s why I wasn’t receiving the update. I’m not using the EAP 😢

An update to teh stable version is pooushed to the marketplace, may take up to 24h to appear.