質問

I want to port a Compact Framework/Windows CE app to Xamarin to create Android and IOS (and possibly Windows Phone) "versions." I reckon I need Windows 8 for Windows Phone (8) but for now I thought I could get started with Android and IOS in moving this prehistoric app into the 21st century.

According to this article, I first need "Project linker" and can NuGet it, but searching for it via Tools > Extensions and Updates in VS 2013 returns no search results.

That article says you need VS 2012 or better; the direct link to "Project Linker," though, says it supports VS 2010.

Where do I go from here?

UPDATE

I went here, and am in the processing of downloading.

UPDATE 2

Here, it says, "Modern Integrated Development Environment (IDE) – Xamarin uses Xamarin Studio on Mac OS X, and also Xamarin Studio or Visual Studio 2010 on Windows."

Yet in VS 2013, I do have project types now for Android and IOS*, so I reckon that's just a typo (hasn't been updated)?

  • although I don't have a Mac, so that is not possible for me right now; also, since I'm still on Windows 7 at work, Windows 8 Phone apps are not yet a possibility, either. So at present, Xamarin within Visual Studio is simply a replacement for Eclipse/Java in the creation of Android apps.

UPDATE 3

I've been waiting for something better than PhoneGap, and I think maybe I've found it. If MS were to buy this company and bake Xamarin into Visual Studio -- voila!/yowza/wow! The cats in Cupertino will have to reach for the Pepto-Bismol!

役に立ちましたか?

解決

That's a bit outdated and there's a much better approach available today.

You can use Portable Class Libraries (PCL) to share code across project spanning iOS, Android, Windows (Phones) and even OSX.

See this article (and where it leads) for more details.

他のヒント

I certainly agree with @poupou that PCL's are the way to go (if possible). I would recommend James Montemagno's app on github. He just created this for channel9 using VS 2013. I just created a cross-platform app based off of this and it worked out well. I would only use the file-linking for the platform specific implementations with compiler directives. This can be seen in his ServiceRegistrar class in said app.

This SO answer actually explains how to get the 2012 Project Linker to work with 2013 if you still want to go that route and gives a link to the extension.

Also, you may want to check out MvvmCross. It is open-source, has a large user-base and following, and really helps with maximum code re-use. Best part, it uses PCLs and all of it's features (plugins) are available via nuget.

I would recommend reading the article @poupou posted, watching James' channel9 videos on his github page, and (if you want to check out mvvmcross) watch @slodge's N+1 videos on mvvmcross.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top