The Linking on Android document describes how to turn off the linker in Visual Studio:
The primary mechanism for controlling the linker is the Linker
Behavior (Linking in Visual Studio) drop-down within the Project
Options dialog box.
How do I turn off the linker using JetBrains Rider?
For Android
Android linker settings are available under YourAppName.Android > Properties > Release | AnyCPU.
For iOS
iOS linker settings are available under YourAppName.iOS > Properties > Release | iPhone.
Related
I am working on an ARM64 computer with Windows 10 (Windows ARM).
I have installed Visual Studio Community. I can create C/C++ Console programs. It works fine. But generated binary files are compiled for an ARM target.
Is there a way to generate x86 (or x86_64) binary files ?
I have looked inside project configuration but I did not find anything.
Do you know where I can select binary output platform in visual studio ?
Thanks
If you used the "Console App" template for C++ when you created the project, then the project was probably created with two 'platform' configurations: x64 and win32. Change the "active platform" to 'win32'. You can make that change in the "Configuration Manager" or in the standard toolbar.
I have a Mobile App built with Xamarin.Forms
when I am trying to upgrade my project from VS2017 to VS2019
I get this error in Android Project
Invalid value 'armeabi' in $(AndroidSupportedAbis). This ABI is no longer supported. Please update your project properties
I tried to delete bin and obj folders to force the project to rebuild everything, but the error still appears
Can I get an explanation about the error above and how to solve it?
Note: the error doesn't appear in VS2017
armeabi is deprecated and your Android project should target armeabi-v7a and arm64-v8a at a minimum in your release builds destined for the Play Store.
You can directly edit your .csproj and remove the armeabi from within the AndroidSupportedAbis tags:
<AndroidSupportedAbis>armeabi-v7a;arm64-v8a</AndroidSupportedAbis>
Or you can open the Android Build settings in the IDE and it will auto-update it for you:
Targeting 64 bit architectures on Xamarin Android
It can be adjusted in 3 steps.
Step 1 - Right-click on Android Project and Click Properties:
Step 2 to 4:
Step 5 - Uncheck armeabi:
In Visual Studio, right-click on your project under the Solution Explorer and select Properties. Under the Android Options page check the Packaging properties section and verify that Use Shared Runtime is disabled (turning this off allows you to explicitly select which ABIs to support). Click the Advanced button and, under Supported architectures, check the architectures that you want to support:
tip: if you are unaware of arm architectures checking all will remove errors
I started trying to use of CLion 2018.2 today and the first problem with I stuck is how to switch toolchains in CLion.
I want to switch the toolchain from MinGW to Visual Studio and I can switch it by making Visual Studio toolchain as default (File->Settings->Build, Execution, Deployment->Toolchains->Select Visual Studio->Click Up arrow).
But I don't want to make this toolchain as default.
I just wanted to try it.
Should I press this up arrow button if I want to switch toolchains or there is any simpler way?
Thanks.
No need to many any toolchain a default one. Do the following:
Configure all necessary toolchains in settings. https://www.jetbrains.com/help/clion/how-to-create-toolchain-in-clion.html
Then in Settings | Build, Execution, Deployment | CMake configure several CMake profiles using different toolchains. https://www.jetbrains.com/help/clion/configuring-cmake.html#CMProfile
Then in the same switcher where you can change the run/debug configuration, there is also a list of available CMake profiles with corresponding toolchains. Select the combination you need and then you can run/debug.
1. Add Toolchains:
2. Switch in CMake tab, like below:
I am building my Xamarin.iOS app from Visual Studio against my Mac build host and use PostSharp to perform AOP against the output, before the binaries are sent to my Mac build host for AOT/native compilation.
PostSharp injects some hidden implementation types into the target assembly which are not referenced by my application so the AOT compiler strips them from the resulting binary, because I am using the "Link All" option.
Changing the "Link All" option to "Link SDK" or "None" fixes the issue but produces a very large binary so it cannot be used for releasing the app.
Since the code is generated by a tool, I cannot use the [Preserve] attribute on the code directly, and because it is internal / private I cannot manually reference it in my application code.
According to the following documentation I can specify a linker xml file to specify the type names by hand:
https://developer.xamarin.com/guides/cross-platform/advanced/custom_linking/
I have successfully used this technique for my Xamarin.Android app, and I can also successfully use this technique when compiling my Xamarin.iOS app in Xamarin Studio on a Mac.
However I cannot figure out how to accomplish this when compiling the Xamarin.iOS app from Visual Studio 2015. Although I can add the necessary mtouch arguments in the .csproj file, I cannot figure out how to deliver the xml file to the Mac build host during the build process.
Make sure the linker XML file is included in your project file and the output type is set to Copy Always.
The Visual Studio build copies the output directory to the build host and it won't copy your linker XML file over unless the project configuration is correct.
When I compile some kind of a project in Visual Studio 2015, does it compile it for 32-bit or 64-bit systems? Is there any way to find out? How do I control which version it compiles between the two?
From the menu bar, you can see the current platform for which the project will be compiled.
If you press the little arrow, you can open the Configuration Manager and create new target platforms.
The Configuration Manager is also available under Build ---> Configuration Manager.