After an update of VS2015. When I build my cross platform app I get this build error without error No. "Xamarin.Forms require msbuild. xbuild is no longer supported." Anyone have an idea of the cause?
I managed to resolve the issue by updating my xamarin.forms. I noticed the build targets pointed to a missing folder. Updating it adjusted the targets.
I spent 8 hours trying to debug this today. The only solution seems to be updating to VS 2017.
Related
I'm using visual 2019, ASP.NET MVC core 2.2.0
My project debug ok, build no error but when I publish it give me an error like this
Detail file in AppData\Local\Temp\tmp76C2.tmp
System.AggregateException: One or more errors occurred. --->
Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed.
Check the Output window for more details. --- End of inner
exception stack trace ---
---> (Inner Exception #0) Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed.
Check the Output window for more details.<---
Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed.
Check the Output window for more details.
How can I fix it?
Check out the output window of visual studio when publishing, read all lines to find any error, then fix it. For example it might be a problem for copying files to publish folder after building. So you won't get any error on build as well.
Look for something like this:
I ran into this error in VS 2019/Core 3.1. In my case, the Publish displayed a bunch of errors with the Bundler, which a regular build didn't show. Eventually found the Web Publish Activity window gave a clue: it shows line numbers for errors it finds, and the first error with the Bundler there was the problem, apparently. Turned out it didn't like an async function in the JS file. I removed that and it published OK.
For me the problem was that I updated de .net core version (2.2 to 5) of my project and forgot to change the .net version target on my publish profile.
Update Microsoft.Net.Compilers package.
I have also encountered this problem when I was going to publish my API.After that, I found my publishing folder does not exist in my local PC.
It could also be due to a problem with the signature in your deployment options. Make sure to select a valid certificate.
I encountered this problem in Visual Studio 2022 when try to publish Blazor project. I tried many things (Clean, Rebuild, clear Nuget Cache etc) but nothing worked. Finally I used this command on the solution folder with Powershell (run as Admin)
dotnet workload install wasm-tools
Then I reopened Visual Studio and publish worked
This may be helpful for someone else.
I got below error while publishing the code.
Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.
We upgraded .Net core 5.0 to 6.0 (VS 2022) and trying to provide new build to higher environments.
After spending little time around the error in output window and logs (published by Visual Studio) i found publish profile(FolderProfile.pubxml) of our project is targeting to .Net 5.0 where is our project now upgraded to .NET 6.0 hence the publish was unsuccessful.
Modified tag in FolderProfile.pubxml
<TargetFramework>net6.0</TargetFramework>
I updated VisualStudio from 2015 to 2017.
When i try to launch UWP unit tests, it seems that Microsoft.VisualStudio.TestPlatform.UnitTestFramework does not exists (it gives me an error).
I tried with Microsoft.VisualStudio.TestTools.UnitTesting and project builds and run but it does not execute my tests.
How can I fix it?
Thanks
#scriptfx: What version of VS 2017 are you on? Would be great if we can see what error you are hitting. The sdk MSTestFramework.Universal should be pointing to a 15.0 version in the build logs.
On a side note you could also upgrade to the new default framework in VS 2017 - MSTest V2. More details here: https://blogs.msdn.microsoft.com/devops/2016/06/17/taking-the-mstest-framework-forward-with-mstest-v2/
I resolved it with a complete reinstall of visualstudio.
Using VisualStudio 2015 update 2 for a Xamarin app solution with Xamarin.Forms (PCL), Xamarin.Android, and Xamarin.iOS projects.
After upgrading Xamarin.Forms from 2.1.0.6529 to 2.2.0.31 today, debug builds of the Xamarin.Android app within VisualStudio started consistently failing with the following message:
Xamarin.Android.Common.targets(1853,3): error XA5213: java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing 'java.exe -jar
I am certainly open to the suggestion to increase $(JavaMaximumHeapSize), and it looks like an MSBuild property by the $() syntax, but I'm not certain where I would set this.
How or where is the JavaMaximumHeapSize specified for Xamarin.Android builds in Visual Studio?
Found this thread on Xamarin Forums that indicates the JavaMaximumHeapSize property can be added to the Xamarin.Android project's csproj file.
Looked at the csproj file with text editor, and found the JavaMaximumHeapSize element already existed in the first PropertyGroup, but there was no value in the element.
So I put 1G in as a value, and the Xamarin.Android project began building successfully once again:
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
Hope this saves someone else a bit of searching.
Yep it worked for me also. One of my projects already had the stub while the other didn't at all.
I tried putting the limit up to 10G but that seems to struggle and wouldn't build so I changed it back to the 1G as shown.
I have a Xamarin.Forms project, and it worked just fine until I updated my Xamarin Studio Community to latest 5.10.3 (build 51) and updated Xamarin.Forms to 2.2.0.31
When I compile my android project, it showed me
"mynamespace.Droid.Resource.Attribute" does not contain a definition for "actionBarSize"
I did not change anything after upgrade and it works before, I know some others faced the same problem like me when I search on google, seems no one asked this in stackoverflow yet so I would like to get some help here.
If the above doesn't work try this
1) Delete Bin and Obj folders in project folder
2) Delete contents of C:\Users{your username}\AppData\Local\Xamarin\zips
3) Rebuild project
*This will take a while because xamarin will re-download the required files. it should work after its done.
That's a bug listed here. There are different workarounds about this, please try:
Failed to use Android Support Library v4
Creating a Hello World in Visual Studio with Xamarin Forms Fails
Xamarin cross-platform (portable class) project compilation error
I am trying to build an iOS app on windows visual studio using Xamarin For Visual Studio Trial. When compiling I am getting this error:
Error 136 MT5201:Native linking failed. Please review user flags provided to gcc: "-L/Users/brandon/Library/Caches/Xamarin/mtbs/builds/iCropTrak_vsios/9bc8504a-65b2-484f-b71c-1d0cb02d21f6" "-lgdal_x86" "-lc3dsqlite3" "-lstdc++" "-all_load" [K:\Development\AZSim\Products\CropTrak\iCropTrak_vsios.csproj]
0 0
It compiles fine on the mac - but having trouble getting it going with the windows version. Any ideas as to why?
Do you use {ProjectDir} in your project options ? If so you might be running into a current limitation where the directories won't match between platforms.
You should be able to workaround it, either by replacing {ProjectDir} or much better by using the [LinkWith] attribute.
You can bundle the Native reference inside a dll.
Take a look on this: http://forums.xamarin.com/discussion/comment/5371/#Comment_5371
and this:
https://github.com/viniciusjarina/NativeBindingVS
Thank you.
we discover this issue like two weeks ago, this only happens in simulator AFAIK. Seems that the dependency LevelDB left their Main symbol. I'll file a bug on Firebase. The workaround for this is to change the behavior of the Registrar on Simulator:
Open your project settings
Go to Build tab
Select iOS Build option
Type --registrar:static in Additional mtouch arguments textbox
Click on Ok
Don't forget to add this in Release and Debug configuration of iPhoneSimulator platform.
when i checked the source of the packages i found that they relies on
Xamarin.Build.Download
when i install the package problem resolved .