Build failed. ...target machine actively refused it.

Heeelp!

Suddenly I can no longer build my Xamarin applications. I've tried a machine restart and Google is absolutely useless these days. Can't find anything.

First I get an error "Build failed. See the build log for details." so I check the log and I see...

Build failed. No connection could be made because the target machine actively refused it 127.0.0.1:1172
Build: 1 error, 0 warnings

Any help much appreciated ")

Posts

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Do you have a firewall that might be blocking that port? Can you please attach full version/OS info from the About dialog?

  • Le-royStaines.7824Le-royStaines.7824 NZMember ✭✭✭

    Not that I am aware of. Other solutions build and run just fine it's just the one solution that does not work anymore.

    Running Windows 7 ultimate. Xamarin version 4.2.1

  • Le-royStaines.7824Le-royStaines.7824 NZMember ✭✭✭

    Interestingly I tried running Xamarin in XP compatibility mode and it works just fine.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    We have an external process hosting the MSBuild engine with which we communicate via TCP/IP on localhost, and it looks like that connection was blocked by something. Not sure why running in XP compat mode would fix it.

  • Le-royStaines.7824Le-royStaines.7824 NZMember ✭✭✭

    Hmm. I tried turning off windows firewall and my antivirus and still no luck (before I set XP mode) so I wonder what it is.

    Oh well at least I found a solution :)

    LR

  • Le-royStaines.7824Le-royStaines.7824 NZMember ✭✭✭

    Can no longer get it to run compatibility mode :(

    My other Xamarin project runs just fine.

  • Le-royStaines.7824Le-royStaines.7824 NZMember ✭✭✭

    Hmm it seems to be very flaky. If I close and open xamain studio a number of times then occasionally I can get a few minutes uninterrupted build time on this project.

    Additionally if I have already another project open and have built that project just once then this particular project never builds.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Can you check the log files from Help->Open Log Directory to see whetehr there are any errors that might tell us more about what is failing?

    Do you see any MonoDevelop MSBuild Builder processes in Task Manager? Perhaps the builder is crashing when building that project.

  • Le-royStaines.7824Le-royStaines.7824 NZMember ✭✭✭

    Found this issue again. I don't think this was the problem last time but for anyone who stumbles upon this thread here is what was happening this time: Bit defender on highest settings was blocking MSBuild. Reason - "The application's behaviour can harm your computer"

    So; make sure you check your antivirus isn't blocking MSBuild. And if it is just be careful of the reason why as there is always the possibility it is infected. In this case it just seems to be that I am on the highest setting of bit defender.

  • DR_nathouDR_nathou BEMember ✭✭

    Ran onto this issue as well in 2019 because of lots of network changes specialy vpn connections. I just shutdown vpn connection as well as terminating the vpn clients. Then reboot the mac and visual studio on windows T. Cheers

Sign In or Register to comment.