[Bug] Edit And Continue doesn't work as soon as the CommunityToolkit is installed
See original GitHub issueDescription
Edit And Continue doesn’t work as soon as the CommunityToolkit is installed
Stack Trace
N/A
Link to Reproduction Sample
N/A
Steps to Reproduce
- Open Visual Studio, create a new MauiApp.
- Hello World with “click me” button is created.
- Clicking the button increase the counter and the button text updates accordingly.
- Under MainPage.xaml.cs, change
count++;
tocount+=2;
- Saving the page (Hot Reload on file save is checked) and clicking the button, the counter changes adding 2 every time as expected. 5b. stop the debug
- NuGet - Solution, install CommunityToolkit.Maui 1.0.0-rc3 readme.txt pops up and, under MauiProgram.cs add:
using CommunityToolkit.Maui;
as first row-
// Initialise the toolkit builder.UseMauiApp<App>().UseMauiCommunityToolkit();
after var builder = MauiApp.CreateBuilder();
as requested
- The following new lines appear in .csproj file
<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="1.0.0-rc3" />
</ItemGroup>
-
Debug -> Windows Machine…
-
Repeat action 3 and 4
-
Saving the page (Hot Reload on file save is checked) the following popup appears
Hot Reload
Hot Reload can't automatically apply your changes. The app needs to be rebuilt to apply updates
[...]
[Rebuild and Apply Changes] [Continue Editing]
Expected Behavior
Edit And Continue working
Actual Behavior
Edit And Continue not working
Basic Information
- Version with issue: 1.0.0-rc3
- Last known good version:
- IDE: Visual Studio 2022 preview 17.3 Preview 1
- Platform Target Frameworks:
- windows
- Nuget Packages:
- Microsoft.Maui.Dependencies 6.0.300-rc.3.5667
- Microsoft.Maui.Extensions 6.0.300-rc.3.5667
- Microsoft.Windows.SDK.BuildTools 10.0.22000.194
- System.Runtime.InteropSerivices.NFloat.Internal 6.01
- CommunityToolkit (the only one added to the original solution)
- Affected Devices:
Workaround
Removing the toolkit the issue disappears:
- REMOVE
using CommunityToolkit.Maui;
- REMOVE
// Initialise the toolkit
builder.UseMauiApp<App>().UseMauiCommunityToolkit();
- AND REMOVE
<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="1.0.0-rc3" />
</ItemGroup>
Reproduction imagery
N/A
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:18 (7 by maintainers)
Top Results From Across the Web
visual studio edit and continue does not work
On Visual studios' menu go on Tools>>options - Select "IntelliTrace" tab and let IntelliTrace events only checked.. Save, restart the visual ...
Read more >Visual Studio 17.2.6 Breaks CommunityToolkit.Mvvm #6792
I uninstalled VS 17.2.6 and installed 17.2.5 that used to work. It doesn't anymore :-( Still the same error.
Read more >VS 2022: Edit and continue isn't working.
Since recently upgrading to VS 2022, I cannot edit when in debug/break without being prompted: Edits were made which cannot be compiled.
Read more >Edit and Continue warns about changes that cannot be ...
Have a solution with multiple projects. When debugging and stopping at a breakpoint, it wont start again (F5, F11, F10) but instead complains...
Read more >Edit & Continue Debugging Not Working in VS2022 : r/csharp
I have VS2019 and 2022 installed side-by-side. In my winforms project, ... When I load the same project in VS22 it pops up...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cargnel (And those experiencing this) I would file this to VS Feedback (https://developercommunity.visualstudio.com/home)
The likelyhood of this being specific to this package is, as far as I can see, very slim. They are not doing anything different that would cause Hot Reload to break (Also note that EnC and C# Hot Reload are not exactly the same mechanics under the covers for different platforms and runtimes.). I don’t think this would ever get fixed in this repo, it needs to be looked at in Visual Studio.
Confirmed EnC is working in v1.1.0 https://github.com/CommunityToolkit/Maui/discussions/496#discussioncomment-3158586