Xamarin.ios doesn't build unless bin/obj folders are removed - c#

Hi,
I have a problem with the build on Xamarin.iOS part. I don't know exaclty what is the problem.
My solution doesn't build completly unless bin/obj folders are removed.
Context:
If I start VS2017 or 2019 I can build the solution.
If I made some changes, minor changes and then I rebuild the solution it will not work.
The first build is extremly slow (5min for a new project).
I got an error on Vs2017 and on 2019 it's a infinit building.
It can only work if I remove obj and bin folders then clean and rebuild.
It's really annoying.
I have made a Microsoft support ticket to understant what is the problem.
It's only my computer, because if someone else try to compile on the Mac it's working.
I have made a Microsoft support ticket to understand what is the problem (I'm waiting).
Make a post here => https://forums.xamarin.com/discussion/158080/second-time-building-extremely-long-and-fail-on-xamarin-ios#latest
On the MAC => I have tried different version of Mono SDK 5.18.1.3 but there is an mistake with this with Vs2019. I go back on 5.18.1.15.
Now I'm on 5.18.1.28 for Mono Framework MDK.
I was on Xamarin.iOS 12.4.0.64 (for VS2017) move to 12.8.0.2 and 12.10.0.153 for VS 2019. I go back on 12.4.0.64 to work again with VS2017.
We can see on the Warning (In the log file) =>
The client build1736klein has been disconnected while waiting a post response to topic xvs/Build/4.12.3.83/copy-item/XamarinHelloWorld.iOS/c913e05002fXamarinHelloWorld.iOS.exe
The underlying MQTT connection has been disconnected unexpectedely. Reason: RemoteDisconnected, Message: (IDTâche:88)
The AggregateException: One or more errors have occurred.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): error : ClientDisconnectedException: The client build1736klein has been disconnected while waiting a post response to topic xvs/Build/4.12.3.83/copy-item/XamarinHelloWorld.iOS/c913e05002fXamarinHelloWorld.iOS.exe
Execution of the "MTouch" task completed -- ÉCHEC. (IDTâche:88)
I can build only if I remove Obj and Bin folder and restart Visual Studio 2017. I don't know why there is a problem.
Visual Studio 2017 Pro is up to date.
Mojave is up to date.
On the Mac I work with Visual Studio 2019 Community
Someone have an idea what can I change ?
Thank you.

Error =>
warning : The client build21656klein has been disconnected while
waiting a post response to topic
xvs/Build/4.12.3.83/copy-item/XamarinHelloWorld.iOS/c913e05002fXamarinHelloWorld.iOS.exe
1> The underlying MQTT connection has been disconnected
unexpectedely. Reason: RemoteDisconnected, Message: (IDTâche:90) 1>
The underlying MQTT connection has been disconnected unexpectedely.
Reason: Error, Message: The client has been disconnected while trying
to perform the unsubscribe to topics: xma/last-will (IDTâche:90) 1>
The underlying MQTT connection has been disconnected unexpectedely.
Reason: Error, Message: The client has been disconnected while trying
to perform the unsubscribe to topics: xma/last-will (IDTâche:90)
1>C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3):
warning : The underlying client has been disconnected by the remote
host
And =>
System.Net.Mqtt.MqttException: The keep alive tolerance of 00:00:45
seconds has been exceeded and no packet has been received from client
build21656klein. The connection will be closed. --->
System.TimeoutException: The operation has timed out.
MQTT example
It was a really stupid problem. The network cable that was defective, but still working.

Related

The "ParseILMergeInfoTask" task failed unexpectedly

The program is executing properly without any error in Debug configuration But in Release configuration it throws an error.
The "ParseILMergeInfoTask" task failed unexpectedly.
System.Exception: File 'SharedAssemblyILMergeInfoFilePath' passed to argument 'x86\ret\SharedAssemblyILMergeInfo.csv' does not exist.
at Microsoft.Build.ILTasks.ParseILMergeInfoTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
I can't run any program in Release configuration. It throws the same error.
Update
I think I found the problem but I don't know to resolve it. Previously I had an error Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'. To resolve it I follow it this answer. So I installed Microsoft.Net.Native.SharedLibrary-x64.1.6.1, Microsoft.Net.Native.SharedLibrary-x86.1.6.1 and Microsoft.Net.Native.SharedLibrary-arm.1.6.1 manually. Now If I open Microsoft.Net.Native.SharedLibrary-x64 package folder I can't find build and tools folder within it.
It is a problem due to the Internet connection.
Just delete the package
C:\Users\ponvi\.nuget\packages\microsoft.net.native.sharedlibrary-x64
Download the package using Mobile Data.
Another answer by rubStackOverflow
Really strange issue, in my case, I had to change my default network
DNS(network card) from 8.8.8.8 to 208.67.222.222.

VSTS Release Failing due to file in use on remote server

Before I state the question I am aware this may be more of a server administration question however I am seeking an answer that involves fixing / modifying the VSTS release process instead of dealing with server permissions (I don't believe this is a server issue).
I have a VSTS Build definition and Release definition.
The release definition copies the files from the build to a remote server (an IIS site).
My problem is that this process fails roughly 60% of the time.
Log files showing failure error:
2017-04-06T17:06:07.3886551Z Executing the powershell script: D:\BuildAgent\agent\tasks\IISWebAppDeploy\1.4.3\Main.ps1
2017-04-06T17:06:07.5605268Z Starting deployment of IIS Web Deploy Package : \\server01\Deploy\patrol\dev\rest_service\822\822.zip
2017-04-06T17:06:07.6542742Z Performing deployment in parallel on all the machines.
2017-04-06T17:06:07.6542742Z Deployment started for machine: SERVER01 with port 5985.
2017-04-06T17:06:27.9820654Z Deployment status for machine SERVER01 : Failed
2017-04-06T17:06:28.0133029Z Deployment failed on machine SERVER01 with following message : System.Exception: Error Code: ERROR_FILE_IN_USE
2017-04-06T17:06:28.0445759Z ##[error]Microsoft.PowerShell.Commands.WriteErrorException: Deployment on one or more machines failed.
2017-04-06T17:06:28.0445759Z ##[error]For more info please refer to http://aka.ms/iisextnreadme
I circumvate the problem by manually remoting into the server and deleting the contents of the target directory manually. I've discovered that each time the release is failing, my manual delete causes a warning to popup that an .exe file is being used by another process. My suspicion is that this is the reason the release is failing.
Is there some extra step that can be added to a release to force delete / clear the target directory?
You can use Windows Machine File Copy task to copy files from build to a remote server. And select Clean Target so that before copy files to remote server, it will clean the target destination folder firstly.

MdilXapCompile.exe -- Windows Phone Device Deployment Error

I'm trying to deploy my appo to my Lumia 930 so I can test it on something other than an emulator, but every time I hit F5 it basses the build but crashes on deplyment.
MIDLXapCompile log file:
CrossGen failed
Error processing assembly C:\Users\mrrey_000\Dropbox\Dev\Windows Store\AnimeWatcherXYZ EX Summer\AnimeWatcherXYZ.WindowsPhone\obj\ARM\Debug\MSIL\Microsoft.Advertising.Mobile.Display.winmd
Raw error code: 2148733978
I tried deleting the reference to the Microsoft Advertising SDK and applying i oce again, I've also tried to remove the previous version of the app from my device - didn't help.
And yeah, I'm deploying a DEBUG package, not RELEASE.
How can I fix this?

Error deploying to AWS through visual studio

My co-worker is able to deploy our projects to AWS Elastic beanstalk fine. However I have issues on both my work machine and my home laptop. Both computers have the same error in AWS window pane.
I get a pop up as follows:
Deployment of the website failed due to errors during build of the deployment archive,
check visual studio output window 'Build' and/ or 'Amazon Web Service' panes for more details.
Then in the amazon window pane I get a different error everytime I try to run the deployment.
Example 1:
...package build 'CopyPipelineFiles': error in 'C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets' at (1413,5): Copying file Web.config to obj\AmazonDev\TransformWebConfig\original\Web.config failed. Could not find file 'Web.config'.
Example 2:
...package build 'TransformXml': error in 'C:\Users\Andrew\colony\colony-website\Colony.Web\Colony.Web.csproj' at (840,5): Could not open Transform file: Could not find file 'C:\Users\Andrew\colony\colony-website\Colony.Model\Web.AmazonDev.config'.
Seems to be a different error each time -- I'm not sure how to even begin to look for any issues.
Jim Flangagan's comment is the answer: ReSharper 8.2 is causing this problem. To resolve either disable resharper ( Tools>Options>ReSharper>General>Suspend Now) or upgrade Resharper.

Windows 8 Blank App + DEP0700 error

I've found a few posts mentioning this error, but none that have helped. I created a new C# Windows Store project, and when I try to build and run it on the simulator, I get the following error in visual studio:
Error 1 Error : DEP0700 : Registration of the app failed. error 0x80072EE4: The Visual Elements extension failed while processing the Notification element. (0x80073cf6) TestDeploy
Here are the details from running a Power Shell command mentioned in a different post:
12/18/2012 3:03:59 PM 404 Error error 0x80073CF6: AppX Deployment operation failed. The specific error text for this failure is: error 0x80072EE4: The Visual Elements extension failed while processing the Notification element.
12/18/2012 3:03:59 PM 401 Error Deployment Register operation on Package cc8bb3bb-d444-4dbe-ae12-64684b12b727_1.0.0.0_neutral__2awvr17ztw74c from: (C:\Users\myself\documents\visual studio 2012\Projects\TestDeploy\TestDeploy\bin\Debug\AppX\AppxManifest.xml) failed with error 0x80073CF6. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
12/18/2012 3:03:59 PM 605 Information The last successful state reached was PackagesInUseClosed.
12/18/2012 3:03:59 PM 300 Error error 0x80073CF6: Cannot register the cc8bb3bb-d444-4dbe-ae12-64684b12b727_1.0.0.0_neutral__2awvr17ztw74c package due to the following error: Package could not be registered.
.
12/18/2012 3:03:59 PM 316 Error error 0x80072EE4: Cannot register the cc8bb3bb-d444-4dbe-ae12-64684b12b727_1.0.0.0_neutral__2awvr17ztw74c package because the following error was encountered during the registration of the windows.visualElements extension: <Error message string not found>.
12/18/2012 3:03:59 PM 306 Error error 0x80072EE4: While installing the cc8bb3bb-d444-4dbe-ae12-64684b12b727_1.0.0.0_neutral__2awvr17ztw74c package, the system failed to register the windows.visualElements extension due to the following error: <Error message string not found>.
12/18/2012 3:03:59 PM 5092 Error error 0x80072EE4: The Visual Elements extension failed while processing the Notification element.
12/18/2012 3:03:57 PM 10002 Information Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\4850558d-7f7f-4109-9376-3b78bf5acc86_S-1-5-21-1715567821-179605362-839522115-27106_1.rslc for Register Operation on Package cc8bb3bb-d444-4dbe-ae12-64684b12b727_1.0.0.0_neutral__2awvr17ztw74c.
12/18/2012 3:03:57 PM 603 Information Started deployment Register operation on a package with main parameter: file:///C:/Users/myself/documents/visual%20studio%202012/Projects/TestDeploy/TestDeploy/bin/Debug/AppX/AppxManifest.xml. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
12/18/2012 3:03:57 PM 301 Information The calling process is C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
Any ideas? I've given full control to everyone on the project, have restarted multiple times, tried reinstalling visual studio, and am running Visual Studio as an administrator. Any help would be appreciated!
I got this to "work" by killing and restarting explorer.exe based on suggestions from a different google search I found. Doesn't really make sense to me, or seem to work reliably, but it does work sometimes at least... o.O
edit
A more permanent solution that worked was some combination of reinstalling Visual Studio 2012 and installing Visual Studio Update 1.
I was getting the same error and in my case neither cycling explorer.exe nor uninstalling/reinstalling Studio 2012 Ultimate with Update 3 worked.
What did work was starting up Visual Studio 2012 with "run as Administrator"
Seems, the issue has to do something to installing app both to local machine and to simulator
My case is i duplicate a WP 8.1 project and add merge some code to the duplicated project.
After i done the merge, I got "Package can't be registered" message when i deploy it to emulator.
But my original WP 8.1 project is successfully running on the emulator.
The root cause is i delete some app logo png image.
The VS2013 wont tell u that image is missing but display "Package can't be registered".
Hope this helps.
This happened to me after uninstalling a custom app that was installed using VS and trying to re-install a new version through either VS or directly using the Add-AppDevPackage.ps1 script
While it is not what you want to hear, a reboot fixed this for me. I tried killing the explorer process and restarting it as mentioned above, but this did not work for me.

Categories

Resources