What I have done
I looked up a few tutorials and did all their steps. MRTK is successfully installed. I created a simple world in Unity 3D (latest version), with 2 moveable (using the hand interface) objects. In game mode, everything works fine.
Now I wanted to deploy it to my Hololens 2.
So I build the project with the following settings:
After that I connected my Hololense to the PC and want to deploy it via Visual Studio 2022.
It is set to "Release" "ARM 64" "Device".
After pressing on "start without debugging" i will get the following error Codes (as an image because it is better structured):
I already tried installing different SDK packages and creating 5 new Unity projects but it doesnt work. Hope you can help me!
Greetings!
Apart from the suggestions from derHugo, you may also check the following configurations of your project.
Make sure Unity is 2020.3 LTS, and you have used Mixed Reality Feature tools to import/update to the latest package.
Select a specific “Target SDK Version” and “Visual Studio Version” instead of “Latest installed”
In visual studio, make sure the Platform Toolset consists with Unity selection (v143 for vs 2022)
Reinstall “Universal Windows Platform development” component in VS installer and ensure any related to v143 ARM64 build tools are installed (because you are using vs 2022)
LNK1136 error is caused by corrupt or invalid files. Because to deploy a unity project to HoloLens, you need to build a Unity project first. If cleaning VS build then rebuilding is not working, try to remove Unity build then rebuild.
VS installer Screenshot added:
Related
I am hoping to work with Xamarin for a project, primarily to learn a little about cross-platform app development, and would prefer to stick to developing on Linux. This led me to attempt to work with the JetBrains Rider IDE, something that I believed to be fairly well documented, as per these resources:
Xamarin.Android on Linux (in coordination with its Ubuntu 19.04 update post)
Failed to load Xamarin Forms project with .NET Standard 2.0 Lib in Rider
0xFireball's Xamarin.Android on Linux guide with associated Rider/IDE setup
I've been able to install everything just fine, Android Studio and Rider were installed via JetBrains Toolbox (I also tried installing Rider manually, but it made no change), and I am able to create the project and configure the Android settings for the Xamarin project.
This is where my luck ends, since despite trying the various resources I've linked above, including reinstalling mono and dotnet-sdk multiple times, I get this error no matter what I try:
Xamarin SDK was not found: Rider was unable to find Xamarin SDK on
this machine. Xamarin-based projects will not be loaded. Please
install Xamarin SDK or change toolset.
I've tried following the instructions both on a manually installed Rider 2019.1.3 (Build #RD-191.7141.460) and Rider 2019.2 EAP (Build #RD-192.5895.291).
I'm fairly new to the world of Xamarin, so I'm not sure where to begin looking. What exactly is the Xamarin SDK (is it just Xamarin.Android?), and what should I be checking my setup for in order for Rider to detect the Xamarin SDK?
It appears that what Rider installs via its Environment page, is only the Xamarin Android package. Not the actually Android Studio SDK, which is needed to develop any android apps. You have to download that separately.
I receive this warning when ever I try to deploy my Xamarin.Froms app to any device or emulator. Also the deploy fails without any errors. I cannot run my app. Can Any one please help me?
The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (vv8.0)
is greater than the $(TargetFrameworkVersion) for your project (v7.1).
You need to increase the $(TargetFrameworkVersion) for your
project. App2.Android C:\Users\subas\source\repos\App2\App2\App2.Android\App2.Android.csproj
EDIT/UPDATE
Right now JDK9 and the Android SDK tools are not compatible with each other - thus Xamarin.Android does not work with JDK9.
Run the following to see the version of java you have installed:
java -version
If it reports something along the lines of java version "9.0.4" you have JDK9.
Specifically there's an issue with the apksigner. It's not using the -classpath switch that the JDK expects.
Easiest way to fix is to install the JDK8 and make sure your PATH is pointed at it.
This documentation gives a solid overview.
ORIGINAL
Sounds like the target Android framework in the project needs to be updated to point to the latest version of Android.
First - make sure you have the latest Android SDKs installed. Here's some documentation on that.
Once you have the latest - here is how to make sure you're targeting the latest - depending on the IDE you're using:
Visual Studio Mac
In the solution explorer, right click the Android project and select options.
Under the Build -> General node - select "Use latest installed platform" from the Target Framework dropdown.
Save everything, close the solution, restart VS-Mac
Visual Studio
Right click the Android project in the solution explorer and select properties
Under the Application node, select Use Latest Platform from the Compile Using Android Version dropdown.
Save everything, close the solution, restart Visual Studio
I built a Xamarin simple app project for android device.
It's compiled and also run on my device, whereas after some times I faced an error.
the error is:
"This project needs to be migrated."
and also I couldn't create new android Xamarin project.
In fact, it's disappeared from new project section.
What can I do??
My issue was that "Mobile development with .NET" was not selected/installed in the Visual Studio Installer for VS2019 (coulda sworn I selected that when I moved from 2017 to 2019, but whatever). Once selected and installed, the migration warnings disappeared and I could run the projects.
I had this issue when running the visual studio in safe mode, suggesting that an extension is disabled/missing.
Visual Studio is the recommended tool (superseding Xamarin Studio) on both Windows and Mac. However, the VSTS page Build your Xamarin app says to use "Xamarin". Presumably that means Xamarin Studio, even though the the "Install Xamarin" link on the page points to Visual Studio. That ambiguity and the March 6 date on the page indicate that it was overlooked during the rollout of Visual Studio 7 for Mac, leaving us to wonder what is the right approach for setting up an agent.
What is the best way to create an iOS build agent these days? Do you install Visual Studio for Mac or Xamarin Studio?
Sounds like a bit of confusion here in the terminology. The IDE is now Visual Studio for Mac, but the underlying framework is still Xamarin. That is to say, Xamarin.iOS/Xamarin.Android/Xamarin Forms are "integrated" into Visual Studio for Mac; they are the tools that will compile and package your mobile app. This is what the VSTS build task page is saying when it asks you to "Install Xamarin".
As for setting up a VSTS build agent, here's a checklist that will hopefully get you going:
Download and install Visual Studio for Mac on a computer running OS X/macOS. Confirm that Visual Studio for Mac can indeed build and sign the IPA's.
If necessary, install all the certificates and provisioning profiles, and confirm that the IPA is correctly signed.
Create a build project in VSTS.
Install the VSTS build agent for OS X/macOS and connect/register the build agent to the VSTS project. Please be aware that the Xamarin license task/utility is deprecated and no longer needed. If that does appear as a step in your VSTS build project, delete it.
Go back to VSTS, and configure the VSTS project to build the Xamarin.iOS project via the OSX/macOS build agent. Once the build agent is connected to the VSTS project.
I'll admit, there is a lot of moving parts and things to do here. I hope this high level overview is enough to point you in the right direction.
Per starain's advice, I tried installing VS for Mac. It started up, but failed with an 'Unable to parse condition "!(Exists($(SharedVersionOutputDirectory)))"' error. I've encountered several bugs in the Xamarin tool chain, so this may have nothing to do with VS vs. XS, but just be part of the current duct-tape-and-bailing-twine experience. OTOH, there's still a top-level Xamarin page saying VS Mac is still preview, so who knows how baked it really is?
So even though the Mac build agent does find and run the VS Mac build tooling, I gave up and used my Windows build agent instead, and had MSBuild on Windows connect to the Mac for the iOS build.
I am the newbie in Xamarin Cross Platform development. I am using Visual Studio 2015 Preview for development. I created the new solution for mobile app and it is working correct for both Droid and Windows phone. But after successful connection with iOs Build host I got the error when I build the iOs App like -
Xamarin.iOS does not support running or debugging the previous build version of your project.Please ensure your solution builds before running or debugging it.
And also when I click on View iOS Simulator I got build host error.
Error: Build version problem. it will show the build version problem.
Please tell me the solution for this.
Most common cause of those symptoms
The most likely cause of this issue is the following known bug:
https://bugzilla.xamarin.com/show_bug.cgi?id=25811
Explanation
The problem in that bug is that the Xamarin.Forms template is using a bad default setting for the iOS project in Visual Studio's configuration manager.
The configuration manager works by telling Visual Studio which projects you want to be built and/or deployed at the same time in the configuration you're using at the time.
So for example; when you build your Android project in Forms, the configuration manager makes sure that the shared project is included; otherwise it wouldn't work, or you'd have to build it separately or etc. etc. (i.e. a real pain.)
Normally, Visual Studio doesn't have a way to automatically "know" which project(s) you want to include in all your configurations; you'd have to tell it to include (some library) with (some app); etc. manually.
How to fix it
Screencast: http://www.screencast.com/t/zLoQOpEn
Go to "Build -> Configuration Manager"
Select the configuration(s) you wish to adjust, (e.g. Debug | iPhoneSimulator, Release | iPhone)
Make sure your shared library project(s) are included with the platform-specific configurations. (You can ignore the greyed-out 'Deploy' checkboxes, those are handled automatically)
Why this is a bug
So this isn't a bug in that the configuration manager isn't working correctly for iOS projects, but that the Forms template is using a bad default setting for the iOS projects when you create a new app. It should "know" to include the shared project in the iOS configurations by default.