Xamarin "_AndroidXJetifyEmbeddedFiles" Build Error Visual Studio 2019 - visual-studio

Whenever I try to build and run my mobile project the error
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1166,2):
error MSB4057: The target "_AndroidXJetifyEmbeddedFiles" does not
exist in the project.
Even when I create a new xamarin project and run it with the default code, I get the same error. Visual Studios is up to date so I am not sure what the problem could be.

I solved this issue by posting on Xamarin-Android's GitHub issue tracker See here...
You should try to delete %userprofile%\.nuget\packages\xamarin.androidx.migration and to compile you app again. It worked fine for me.

You can try the following methods:
1.update your nuget to the latest version and then delete bin and obj folders and try again;
2.Check if you have set up the Android SDK for Xamarin.Android correctly.
Check document: https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-sdk?tabs=windows
3.If the problem persists,try to repair your visual studio;
For more details, please check:https://learn.microsoft.com/en-us/visualstudio/install/repair-visual-studio?view=vs-2019;
4.If the problem persists,you can try to perform a thorough uninstall for Xamarin for Visual Studio, and install the latest Visual Studio;

Today when i update a old project to Xamarin.Form5, i get this bug. I try to update all nuget, but still show this bug, when i see Warning, i see have a nuget downgrade because two nuget reference conflict. I delete one nuget that i not use, Build success.

Related

Visual Studio 2022 (17.4.2) MAUI not working

I installed Visual Studio 2022 on Mac M1 and was trying to write a MAUI app. But when I create a template project and try to build it, I keep getting the below errors:
I tried a lot of things including reinstalling Visual Studio and dotnet frameworks, nothing worked!
Any clues as to what should be done here?
You could try installing the maui-android and maui-ios workloads manually. You could refer to dotnet workload install commands.
In addition, you could check the csproj file to see if there is the TargetFrameworks element :
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
For more info, you could refer to Build your first app.
Hope it works for you.

Is there any way of fixing this Visual studio 2015 Nuget Pacage Manager mess?

It seems I managed to completely break my Visual Studio 2015 setup by uninstalling Nuget Package Manager. I uninstalled it in order to fix its inability to update anything. Now, when I try to launch VS I get a plethora of error messages, but the most important one seems to be shown on the image below as its showing no matter what fix I attempt:
Here are the steps I took before I started seeing the above error:
I have renamed the Extensions folder found at the following path:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE and installed Nuget Package Manager for Visual Studio 2015 from the microsoft website.
New extensions folder was created and when I tried to run the application with nothing else in it I would get the error message above once on VS launch and once on project load. When I moved old package folders from the old extensions folder I would get a lot more error messages related to the packages.
I also noticed there is an Extensions folder found at %localappdata%\Microsoft\VisualStudio\14.0, but renaming the folder to something else and just having blank folder did not help either. Also, I saw somewhere else a possible fix to an issue I thought was similar by removing contents of the folder located at: %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache, but that didn't help either. Now with all this trying I am getting to a point where fresh install might be an only option.
UPDATE:
I guess I managed to overcome this issue by opening up this project in Visual Studio 2017. It worked without any issues, though when I originally cloned the repository from GitHub via Visual Studio 2017 it didn't work. Having said all that, I don't think its an answer I was looking for, but at least I can continue working on this project.

Error while adding NuGet Package

I am getting the following exception while adding NuGet package to project. I am using the latest version of Visual Studio 2017 Pro.
try going to VS settings -> NuGet settings -> clear the NuGet cache, close Visual Studio, and delete all obj and bin folders in solutions .
Error while adding NuGet Package
AFAIK, It seems an issue which needs to be fixed from Xamarin team and someone already reported it:
https://bugzilla.xamarin.com/show_bug.cgi?id=61113
You can track this thread to get future updates for this issue.
Here are some of the workarounds already mentioned in that thread:
Update the packages with the option -IgnoreDependencies in the Package Manager Console (It works for me):
Update-Package -IgnoreDependencies
Update Visual Studio to latest version and running as Administrator
Some of the files in the packages folder were set to read-only. Try to cleare the read-only flag from all files in the packages folder.
Hope this helps.
I tried a lot of ways to solve this problem. But unfortunately cleaning the cache, project, rebuilding didn't help. The only thing I didn't try is to re-install Visual Studio or Windows.
I've got to launch project in Visual Studio for Mac and update/add all the necessary Nuget packages from there. On the Mac, the process was successful. I know this might not be an option if you don't have device, but it definitely works.

Build error: The target "_DetectSigningIdentity" does not exist in the project. (Visual Studio - Xamarin.IOS)

I am unable to build any xamarin project in Visual Studio 2017 mac.
It gives me the following error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(81,81):
Error MSB4057: The target "_DetectSigningIdentity" does not exist in the project. (MSB4057)
It was working fine before, i dont remember updating anything on my visual studio.
It is not specific to solution. None of my project gets build.
Any suggestions please??
I have solved the problem on my own installation.
open update menu
select alpha channel
download and install all
restart
hope this helps

the target "UpdateDesignTimeXaml" does not exit in the project error in Xamarin Studio

I am new to mobile application developing. When I was creating a new .xaml file in new solution in the Xamarin Studio.
It gave the error:
"the target "UpdateDesignTimeXaml" does not exit".
How can I resolve this problem?
Build errors can occur if you have updated the Xamarin.Forms nuget to a newer version that requires UpdateDesignTimeXaml.
Close and reopen Xamarin Studio.
Clean all and ReBuild your project.
Ref: https://forums.xamarin.com/discussion/49152/problem-initializecomponent-and-pcl
A workaround for this is to remove the MSBuild:UpdateDesignTimeXaml from the Custom Tool of the xaml file properties in VS. Save, add MSBuild:UpdateDesignTimeXaml again and save again will force MSBuild to recreate the *g.cs file.
I had this with Visual Studio for Mac.
I fixed it by:
closing VS
manually deleting the packages, bin and obj folders
restart the project in VS
restore NuGet packages, build and run.
Got same issue in Visual Studio for Mac. Worked find with
closing VS
manually deleting the packages, bin and obj folders in both android folder and main folder
restart the project in VS
restore NuGet packages, build and run.

Resources