Wenfengcheng / xamarin-notes

xamarin journal
MIT License
3 stars 0 forks source link

LiveXAML fails to find handshake server #22

Open Wenfengcheng opened 5 years ago

Wenfengcheng commented 5 years ago

During the rebuild, LiveXAML MSBuild Task hard codes host PC IP address into the application. To guess the IP, it queries the 8.8.8.8 address and looks at which interface was used for this request. Sometimes it guesses wrong. I might need to add something like optional livexaml.config file for users to override the IP address. What do you think?

Well, it is possible to hard-code all of the available IP addresses I guess.

I'll also research other possible techniques for doing this stuff. Querying the public IP address felt like the easiest option at the time.

In the meantime, you can replace XamarinLive.Build.dll in the packages with the attached file. With this build, you can create a livexaml.config file in your project root with the following content.

hostip=x.x.x.x Where x.x.x.x is your IP address. I realize that this is user specific override, but at least you will be able to use LiveXAML from now on.

#57