October 13, 2013

Improve perfrormance of WP7 multiple IsolatedStorageFile.ExistDirectory calls

In my new project, I need to check the isolated storage to get if the Directory is exist, but if the directories have the same parent directory, we can first call isf.GetDirectoryNames(Path.Combine("Downloads", "*")); to get the directories and then using strings.contain(xxx), after all, performance is fine.

With a lot of isf.DirectoryExists:
About cost 1.1s
With GetDirectoryNames and strings.contain(xxx)
After change the code, cost 0.11s.

October 11, 2013

How to create a branch from WP78 to 80

Please following these steps: 
1.right the trunk(include WP78 repository), choose branch/Tags 
2.navigate the combobox to "branch/80" 
3.click ok. 
4.open the solution, update the specified project 
5.remove the WP78 tiles from App.xaml 
6.remove the unavailable references and replace them. 
7.remove the package.config, it`s just contain WP78 nuget informations. 
8.re-install the nuget packages. 
9.if you meet the vm:Locator not exist, you can update the MVVMLight using nuget, after all error has fixed, you can see the not exist error is disappeared. 
10.commit the new solution.

October 2, 2013

How to merge WP 71/80 repository with TortoriseSVN?

Here is the following steps :
1.navigate to 80(branch)
2.Right click choose merge
3.choose "Merge a range of revisions"
4.Choose all revision
5.choose merge.
6.If you meet collision(such as WMManifest.xml), choose prep local.

October 1, 2013

Windows Phone Toolkit cannot install with WP8.0

Successfully installed 'WPtoolkit 4.2013.08.16'. Successfully uninstalled 'WPtoolkit 4.2013.08.16'. Install failed. Rolling back... Could not install package 'WPtoolkit 4.2013.08.16'. You are trying to install this package into a project that targets 'WindowsPhone,Version=v8.0', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author. When I met the issue, it means I could not install the nuget package. The way to solve the issue is go to http://www.nuget.org and install the latest package.

August 17, 2013

NLog in WP7

Does anyone use the NLog successfully in WP7?

I googled a lot, finally I cannot add an extension to the NLog. So I add the IsolatedStorageTarget to the dll, and compile it. And it successfully worked.

What I do?

1. add the following codes to the target folder:


2. Add the NLog.config:



3. Add the codes to your cs file that you want to use:


that is all of the steps you need to do.

If you want the compiled dll, you can download from link. If the link is not available, please comment under the article.

Hi blogger

Hi everyone, this is the first time I arrived blogger, I like it very much. I`m a Chinese man, I`d like to make friends with us. Even though, my English communication is not so good, but I have the confidence to do it in a better way. In this new home, I`ll write some tech-articles if I met an issue and solved it successfully and share others blogger articles.

Thanks!