This project is read-only.

Now what?


Now that you have the package installed the rest is up to you, to use the DynamicLocalhost class however you see fit.

For me, in my WP7 projects I create a static ApplicationSettings class to use throughout the app. The comments below hopefully explain how it works. The only source code you ever check in says “localhost” – and will be dynamically replaced at compile-time to the actual developer’s machine name. This means that you are free to check in everything, get latest anytime you want, and never have to worry about someone accidently checking in their real machine’s URL, hampering your workflow.

public static class ApplicationSettings
{ public static string WebServiceBaseUrl { get; private set; } static ApplicationSettings() { #if DEBUG // Compiling this app on MY machine, WebServiceBaseUrl will become: http://MATT-PC/RealWorldWP7.Web/ // The URL be automatically determined on each compile // Therefore no issues checking it in and getting latest on any developer machine WebServiceBaseUrl = DynamicLocalhost.ReplaceLocalhost("http://localhost/RealWorldWP7.Web/"); #else WebServiceBaseUrl = ""; #endif } }

Last edited Aug 1, 2012 at 10:39 PM by mhidinger, version 8


No comments yet.