[Bug] Hot Reload & An element with the same key already exists in Namescope
#8.398 aberto em 6 de nov. de 2019
Métricas do repositório
- Stars
- (5.644 estrelas)
- Métricas de merge de PR
- (Nenhuma PRs mesclada em 30d)
Description
Description
A File | New Xamarin Forms project with updates applied (as detailed below) causes an exception that breaks execution when CLR Exceptions are enabled
Steps to Reproduce
-
File | New Xamarin Forms project
-
Update the following in the csproj files:
<PackageReference Include="Xamarin.Forms" Version="4.3.0.947036" />
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
-
Added any element and give it a x:Name. The attached demo project has two buttons added.
-
Enabled Hot Reload
-
Run the application (emulator or physical device), modify the MainPage.xaml (such as the button text). Red squiggles appear under the Button elements with a tip indicating the error being reported. The application continues to run. See screen shots provided.
-
Enable CLR exceptions and repeat step 5.
-
An exception will be raised as provided in the attached screen shots. The application will continue to run but it interrupts debugging.
Expected Behavior
Hot Reload should reload the XAML without error.
Actual Behavior
When modifying a page with hot reload enabled an exception is raised (suppressed when CLR exceptions are not enabled)
Basic Information
- Version with issue: Xamarin Forms 4.3.0.947036
- Last known good version: Unknown
- IDE: Visual Studio for Windows
Screenshots
Screen shots are included in the attached.
Reproduction Link
A demo application is attached. NamescopeError.zip
VS bug #1158393