title: Why am I getting JINativeWrapper.g.cs file not found error when running my Xamarin app?
body: <p>When I try to run my Xamarin app on my M1 MacBook, it builds and works fine. But when I run this function:</p>
  <pre><code>async void loginHandler()
      {
          var loginText = login.Text;
          var passwordText = password.Text;
          var client = new HttpClient();
          var json = new StringContent(
              JsonConvert.SerializeObject(new { username = loginText, password = passwordText })
          );
          var result = await client.PostAsync(&quot;https://localhost:443/api/account/login&quot;, json);
          if (result.IsSuccessStatusCode)
          {
              var TokenJson = await result.Content.ReadAsStringAsync();
              //await DisplayAlert(&quot;alert&quot;, &quot;message&quot;, &quot;cancel&quot;);
          }
      }
  
          
  </code></pre>
  <p>It crashes and shows this error:<a href="https://i.stack.imgur.com/pGGg7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pGGg7.png" alt="error image" /></a></p>
  <p>How can I fix it? I'm using visual studio 2022.</p>