locked
The .appxupload isn't being created, could it be related to a "does not contain a definition for..." error? RRS feed

  • Question

  • I'm trying to update an app I have in the Microsoft Store using UWP. When I went to create the app package upload file, it didn't generate. However, I have gotten six error messages, all basically like this:

    "'AnnuallyPage' does not contain a definition for 'ConvertButton' and no extension method 'ConvertButton' accepting a first argument of type 'AnnuallyPage' could be found (are you missing a using directive or an assembly reference?)"

    The other 5 are exactly the same, only different page names.

    I think this is a consequence of the modifications I've made. In the 6 pages that are causing the errors I did have a regular button on the page. I decided to change that to use the appbarbutton instead. I thought it would be sufficient to comment out the old code for the button, but level the event there for the button to use, believing that the appbarbutton would use it. Here's some code from one of the pages that illustrate what I've done:

    <!--
    <Button Name="ConvertButton"
    		Content="Convert"
    		RelativePanel.RightOf="AnnuallyTextBox"
    		Margin="5,20,5,5"
    		Click="ConvertButton_Click" />
    -->

    In this app I'm using code-behind, instead of MVVM. So in the code-behind I have the following:

    private void ConvertButton_Click(object sender, RoutedEventArgs e)
    {
    	VM.Annually = (decimal)VM.AnnuallyFloat;
    	previousAnnually = VM.Annually;
    }
    

    And the live code in the XAML is this:

    <Page.BottomAppBar>
    	<CommandBar>
    		<AppBarButton Icon="Play" Label="Convert" Click="ConvertButton_Click" />
    	</CommandBar>
    </Page.BottomAppBar>
    
    Given the errors that I'm now experiencing trying to publish to the Store (BTW, it's odd that I never got these errors when I was working with this in Visual Studio 2017 developing and testing the changes), I now suspect that it has something to do with what I've done. Only problem is, I've no idea where the problem lies. So, where do I look to fix this problem?


    Rod

    Saturday, July 14, 2018 2:56 PM

Answers

  • Hi Doctor-Who, 

    I have experienced this. I removed both button and it's code behind. and created a new button with new name. Clean & build. Everything went smooth after that. 

    Thank you.


    Monday, July 16, 2018 3:41 AM

All replies

  • Hi Doctor-Who, 

    I have experienced this. I removed both button and it's code behind. and created a new button with new name. Clean & build. Everything went smooth after that. 

    Thank you.


    Monday, July 16, 2018 3:41 AM
  • OK, that seems like a good work around. Thank you.

    Rod

    Wednesday, July 18, 2018 12:58 AM