Reputation: 4455
my UWP app has min version of anniversary update and target is creators update. Some name properties of XAML elements give compile time errors on some pages and then when I remove the name properties from XAML and then rewrite the same properties there the error goes away and my app runs fine.
I can handle this strange scenario in debugging this way but now I am trying to create my app packages and only 1 package is created and then some error like this comes up, I fix them by rewriting the name properties and then I try again, and next time some other name properties show the error, and it is an endless loop and I am not able to create 3 packages for 86, 64 and ARM. only 86 is created and then some error shows up.
UPDATE
I am having following problem after I removed "creators fall update sdk preview" from target version of my project and I targeted my project to creators update SDK, while min version remains to anniversary update. I had to do it because on developer store, when I uploaded my created packages, they gave me error that some Mir.px something file is unsupported version, i.e : 16190 ( creators fal update sdk). So I tried to re target my project to creators update and then again created the packages and had the following errors.
Also note that I removed Threading.Tasks.Extensions package from my project to remove these warnings, ( because I wasn't using it anyway ) but these warnings still didn't go away.
Upvotes: 1
Views: 215
Reputation: 39006
I'd recommend to always use x:Name
over Name
in XAML.
The specified x:Name becomes the name of a field that is created in the underlying code when XAML is processed, and that field holds a reference to the object. The process of creating this field is performed by the MSBuild target steps, which also are responsible for joining the partial classes for a XAML file and its code-behind.
More info can be read from here.
Upvotes: 2