Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all 204402 articles
Browse latest View live

Missing templates in VS

$
0
0

Hi all,

I'm watching a course called "Xamarin Forms: Build Native Cross-platform Apps with C#" on Udemy. I've installed Xamarin in VS but I have only one template when creating a project:
Mobile App (Xamarin.Forms)

But in the tutorial there's a bunch more:
Blank App (Native Portable)
Blank App (Native Shared)
Blank App (Xamarin.Forms Portable)
Blank App (Xamarin.Forms Shared)
Class Library (Xamarin.Forms)
... and more

Why do I have only one template? I have the Xamarin installed along with all of it's optional and individual components.

Sorry for posting everything in plain text. I'm not allowed to post images, because I'm a new user.


Testing a backend API locally for Xamarin Forms using IP address

$
0
0

I have a simple asp.net core api backend project that serves a Todo API and a xamarin forms app that consumes it. When I run the backend API, the project runs on IIS Express on localhost:44374. Now for purposes of testing my android or ios app, i can't use localhost as my endpoint, I think i need to specify the actual ip address like so: 192.168.1.72:44374.

That doesn't work directly, and its supposedly an issue with IIS Express bindings. I have searched high and low on Stackoverflow and other places for a solution, but haven't really been able to find one. I am assuming someone here has had the same issue.

What is the suggested workaround?

UWP- creating NavigationView and Commandbar

$
0
0

It seems like xamarin forms doesnt implement navigationview and commandbar on UWP when we use masterdetailpage and toolbaritems.
How can i achieve this? anyone had that implemented with custom renders?

After updating VS 15.6.7 to VS 15.9.5 Android projects (even the first template) fail to build

$
0
0

Hello,
4 days ago i updated vs in the hope to solve a google play publishing issue, but even after repeated reinstalls, on 15.6.7 i can build no issues, on 15.9.5 i cannot build even the simpliest of the android projects.

Output window only reads:

1>------ Build started: Project: App2, Configuration: Debug Any CPU ------
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

**Xamarin Diagnostic Output reads : **

[I:]: Looking for Android SDK...
[D:]: ValidateAndroidSdkLocation: C:\Program Files (x86)\Android\android-sdk, result=True
[D:]: ValidateAndroidSdkLocation: C:\Program Files (x86)\Android\android-sdk, result=True
[D:]: TrackDeviceTask got: emulator-5554 offline
[I:]: Got new device list from adb with 1 devices
[D:]: TrackDeviceTask got:
[I:]: Got new device list from adb with 0 devices
[I:]: Tracking android devices stopped
[I:]: Tracking android devices started
[D:]: TrackDeviceTask got:
[I:]: Got new device list from adb with 0 devices
[D:]: Tracking avd started
[D:]: avd watcher *.ini path: 'C:\Users\heart.android\avd'
[D:]: avd watcher: got device list from avd with 2 devices
[E:]: an error occurred loading avd Android_Accelerated_x86_Nougat, the system image does not exists
[E:]: an error occurred loading avd Android_Accelerated_x86_Oreo, the system image does not exists

Visual studio Info as follows:
Microsoft Visual Studio Professional 2017
Version 15.9.5
VisualStudio.15.Release/15.9.5+28307.280
Microsoft .NET Framework
Version 4.7.03056

Installed Version: Professional

Visual C++ 2017 00369-60000-00001-AA126
Microsoft Visual C++ 2017

ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools

Application Insights Tools for Visual Studio Package 8.14.11009.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.9.04012.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services 15.8.31590
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2017 5.2.60913.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 15.9.03024.0
Azure App Service Tools v3.0.0

Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.3.6000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 15.9.02046.0
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio 2.3.6000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus 1.1.49 (remotes/origin/d15-8@ee674f3)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Fabric.DiagnosticEvents 1.0
Fabric Diagnostic Events

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

JavaScript UWP Project System 2.0
JavaScript UWP Project System

Microsoft Azure HDInsight Azure Node 2.3.6000.0
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service 2.3.6000.0
Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio 2.4
Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service 2.3.6000.0
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node 1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.10730.2

Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager 1.0
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

MLGen Package Extension 1.0
MLGen Package Visual Studio Extension Detailed Info

Mono Debugging for Visual Studio 4.13.12-pre (9bc9548)
Support for debugging Mono processes with Visual Studio.

NintendoSDK Visual Studio Extension 1.0
NintendoSDK Visual Studio Extension

NuGet Package Manager 4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Oasis for NX 7.2.8.26511
NX Visual Studio Integration

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

SQL Server Data Tools 15.1.61901.03220
Microsoft SQL Server Data Tools

Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

ToolWindowHostedEditor 1.0
Hosting json editor into a tool window

TypeScript Tools 15.9.20918.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Linux Development 1.0.9.28218
Visual C++ for Linux Development

Visual F# Tools 10.2 for F# 4.5 15.8.0.0. Commit Hash: 6e26c5bacc8c4201e962f5bdde0a177f82f88691.
Microsoft Visual F# Tools 10.2 for F# 4.5

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake

Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers

Visual Studio Tools for Universal Windows Apps 15.0.28307.208
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

Xamarin 4.12.3.78 (d15-9@a9bbf702f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 4.16.13 (45a16efd4)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 1.1.128 (6f5ebb2)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 9.1.5.0 (HEAD/4b951a3e7)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 12.2.1.12 (65ec520)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Is it possible to wait for Device.BeginInvokeOnMainThread code to finish

$
0
0

Hello everyone,

In my code I have a task called "ShowMessageBoxAsync". I want to use this code to show (and await) the DisplayAlert to the user and return the result. Like this: var messageBoxResult = await View.ShowMessageBoxAsync("This is an error");

The code for the ShowMessageBoxAsync is:

    public async System.Threading.Tasks.Task<bool> ShowMessageBoxAsync(string message)
    {
        var result = false;
        Device.BeginInvokeOnMainThread(async () =>
        {
            result = await DisplayAlert("Error", message, "OK", "Cancel");
        });
        return result;
    }

Before I added the Device.BeginInvokeOnMainThread, the task gave me an Exception that it wasn't running on the main/UI thread. So after adding BeginInvokeOnMainThread, it started to work without exceptions. The problem, however, is that the code goes directly to the result, without waiting for the result of the "await DisplayAlert".

Is it possible return the value of "result" only after the Device.BeginInvokeOnMainThread code finishes?

Thanks in advance!

How to modify button colors

$
0
0

Here's one of the button's axml:

 <Button
            android:text="1"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight=".25"
            android:id="@+id/btn1" />

This button is light gray

Here's another button:

 <Button
            android:text="-"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/btn6"
            android:layout_alignTop="@+id/btn6"
            android:layout_weight=".25"
            android:background="#F9E79F"
            android:id="@+id/btnSub" />

and this is yellow (goldenrod?)?

And here's how it looks:

How do I get the yellow buttons to be like the light gray ones? That is, bounded by white?

RON

XamarinTestCloud: Test Execution is not running correctly-"Signing apk with Xamarin keystore"(help!)

$
0
0

Hello Community, good afternoon !

We are implemeting Mobile Automation Tests, and I'm learning the Xamarin Test Cloud to start this. I have seen a lot of tutorials and videos for learning this tecnology, but I have a annoying issue that is blocking me.

I'm trying to run a simple test, but in my AppInitializer, when I start running it, the execution is not completed and gets caught in "Signing apk with Xamarin keystore.". It doest not show any kind of error message.

Please, help !

Sorry for some mistake, this is my first time here.

Mining http input field value from WebView

$
0
0

Hello!

I'm working on an app that pops a Modal that is a ContentPage with a WebView. (i hope i explained it well enough)
In this loaded https page, i have various controls.

I basically load a page of mine that has a couple html input fields and a button that does some magic when i press it.
Can i get the value of a specific input field when that button is pressed? If yes, how?


Label's text isn't displayed on big screen resolution UWP Xamarin.Forms

$
0
0

For both platforms iOS and Android label's text is displayed without any problems.
When I debug UWP project on my local machine (with Windows 10, and screen resolution 2K) the text is missing. When I debug on a device with smaller screen resolution- the text is displayed.
During debugging process I tried to resize the window and the text appeared.
I thought that the problem might be in screen resolution. That the machine doesn't manage to draw the text.
Text contains around 50 characters.

Does anybody has any idea what's the problem and how to fix that?

Posted a part of the code from .xaml class where Label's properties are specified, even if it's not so relevant.

                    <ContentPage.Content>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="0.2*"/>
                                    <RowDefinition Height="0.6*"/>
                                    <RowDefinition Height="0.2*"/>
                                </Grid.RowDefinitions>
                                <Label Grid.Row="0" ></Label>
                                <Grid Grid.Row="1" VerticalOptions="Center">
                                    <StackLayout VerticalOptions="Center" HorizontalOptions="CenterAndExpand" Padding="10">
                                        <Label Text ="{Binding Title}" HorizontalOptions="Center" VerticalOptions="Center" Margin="10" FontSize="Medium" ></Label>

Forking Xamarin.Forms - Howto

$
0
0

I found a bug deep in Xamarin.Forms 3.4 and wanted to diagnose it, so I forked the code but couldn't get it to compile etc.

The instructions on the Xamarin site for forking and creating a Nuget package to use in my project is very out of date.

I couldn't figure it out after an hour so had to give up.

Any new instructions on how to create a Nuget so we can debug/create PRs ?

Ian

"Invalid Swift Support - The SwiftSupport folder is missing" when publishing to App Store

$
0
0

Hello,

I'm having this error when trying to publish an iOS application:

"Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it."

We are using iOSCharts in our project.

I tried to use the ipa-packager from GitHub and also to create the "SwiftSupport" folder manually (I copied the *.dylib files from Xcode) but the best result for now is another error:

"Invalid Swift Support - The file arm64 doesn't have a signing ID. Sign the file, rebuild your app using the current public (GM) version of Xcode, and resubmit it."

What can I do to solve these errors? Thanks for any help/feedbacks

  • Xcode 10.1
  • Visual Studio for Mac 7.7.4 (build 1)
  • Xamarin.iOS 12.2.1.13

Why building an application in release mode marks warnings about “not found” files?

$
0
0

My app seems to be built fine in Debug mode, yet in Release mode I get 21 warnings about "no debug symbols file was found".

As I understood, debug mode uses some files that release mode doesn't need in order to run, I assume that the missing files are these ones. Maybe it's a problem with Xamarin or with VS?


Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.v7.AppCompat.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Java.Interop.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Arch.Core.Common.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Arch.Lifecycle.Common.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Arch.Lifecycle.Runtime.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Animated.Vector.Drawable.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Annotations.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Compat.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Core.UI.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Core.Utils.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Design.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Fragment.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Media.Compat.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Transition.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.v4.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.v7.RecyclerView.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Vector.Drawable.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.GooglePlayServices.Base.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.GooglePlayServices.Basement.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.GooglePlayServices.Maps.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.GooglePlayServices.Tasks.dll but no debug symbols file was found. 0


  1. What are those files? What those warnings mean?

  2. What can I do about it?

  3. Can those warnings cause any further damage?

I already tried:

  1. Deleting those files from obj\Release\81\android/assets.

  2. Cleaning the solution and the whole project.

Can't get Android emulator to run anymore

$
0
0

I have Visual Studio 2017. I used to be able to run the Android_Accelerated_x86_Oreo (Android 8.1 - API 27) just fine, but for some reason now I'm getting:
Emulator Android_Accelerated_x86_Oreo is running.
Waiting for emulator to be ready...
emulator: _hwFingerprint_connect: connect finger print listen is called
emulator: got message from guest system fingerprint HAL
[8700]:WARNING:android/android-emu/android/base/async/AsyncSocketServer.cpp:99:Error when accepting host connectionError message: Unknown error
[8700]:WARNING:android/android-emu/android/base/async/AsyncSocketServer.cpp:99:Error when accepting host connectionError message: Unknown error
[8700]:WARNING:android/android-emu/android/base/async/AsyncSocketServer.cpp:99:Error when accepting host connectionError message: Unknown error

Then I get: Deploy failed and the emulator just shows a black screen.

I've tried rebooting and rebuilding the solution, no effect. Any ideas? Thanks.

Create a custom animation to fade-out view in forms

$
0
0

Hey, sorry if this was asked before, i couldn't find any threads wich could help me.

I want to animate an element like this. It should set the opacity to 0, but not for the whole view. Instead i want the view going transparent from the center to the edge. I am using Xamarin Forms 3.4.0.1008975 and am developing for iOS and Android.

Can somebody help me with that?
Thanks

How can I adjust the height of a label when it wraps?

$
0
0

I tried using the line height property but that doesn't seem to work for this. How can I set the height of the lines after a long label has wrapped. Do we have any control over this spacing?


Beginner - Can't get app to deploy to Android emulator on AMD processor

$
0
0

Hi,
I have VS 2017 on Windows 10 and I'm trying to just run a newly created Xamarin.Forms app. in the Android emulator. I have an AMD processor. I also have Hyper-V. The emulator seems to load, but the app. never deploys on it. I've tried using the SDK Manager to install different versions of the tools with no success. What am I missing? Thanks for your time.

System.Xml.Dll assembly only loading on breakpoint

$
0
0

Hello,

I have been migrating all my project from an old version of xamarin with an old version of mono to the latest of both.
Amongst all the other issues I have encountered and found a solution, here is one I am still stuck with.

When I start my application on Debug, some part of a code sends an exception:
var source = new TraceSource(traceName);
source.Listeners.Clear();

The source.Listeners.Clear(); says the following:
System.MissingMethodException: Default constructor not found for type System.Diagnostics.FilterElements

Here comes the funny part: if I put a breakpoint on this line, and hoover the "Listeners" word, I got the error above on a little warning windows. But meanwhile in the logs of the application, the DLL loads himself (at the same moment I hoover the word):
Loaded assembly: /Users/...../System.Xml.dll [External]

And then the application runs smoothly, without errors, and the listeners work.

If I don't put the breakpoint, the application will not run properly.

Any idea on this one?

N.B.: I have migrated the application so it compiles in 64bits, retargeted a bunch of packages, etc. So Maybe I have broken something, but I have no idea what.

ITextToSpeech DependencyService Completion

$
0
0

I would like to have the Dependency Service Text to Speech functionality behave in a synchronous manner, i.e. complete speaking before the calling code continues. Currently, it not consistent in starting or completely speaking the provided text. Is that possible?

I have tried new Task(() => { DependencyService.Get<ITextToSpeech>().Speak(narrative); }).Wait(); but it never returns. Other forms of Task.Run are not compatible typically causing cross-thread errors.

Vertical Scroll Inside Editor Box

$
0
0

Hi All,

I have one Editor box and i want Vertical scroll inside editor box.

Thanks in advance.

The "User7ZipPath" parameter is not supported

$
0
0

I am getting this error a lot more lately.. It's another of those random things that sometimes does or not occur when doing an iOS build...

1>C:\Work\MCD\Mobile\packages\Xamarin.Build.Download.0.4.5\build\Xamarin.Build.Download.targets(55,4): error MSB4064: The "User7ZipPath" parameter is not supported by the "XamarinDownloadArchives" task. Verify the parameter exists on the task, and it is a settable public instance property.
1>C:\Work\MCD\Mobile\packages\Xamarin.Build.Download.0.4.5\build\Xamarin.Build.Download.targets(51,3): error MSB4063: The "XamarinDownloadArchives" task could not be initialized with its input parameters.

Suggestions on how to fix ?

Viewing all 204402 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>