开发者

Want to install same application but with different name in WP7

开发者 https://www.devze.com 2023-02-12 20:14 出处:网络
I have an application lets say "Application1" .I want to install same application but by changing some contents in it and also its name like "Application2" so that both application

I have an application lets say "Application1" .I want to install same application but by changing some contents in it and also its name like "Application2" so that both application1 and application2 can be seen on device? Is this possible?If yes,then can someone kindly help as to how to do it.

EDIT: Just if somebody else might need it, I got this done. Get a 开发者_开发知识库GUID from a GUID generator tool and use this new GUID in WMAppManifest.xml and replace ProductId in this file and GUID in AssemblyInfo.cs.Rebilud the solution and its done!


Creating a new app with exactly the same content is very easy:

  • Create a new project and name it with the new name.

  • Remove the pages/classes created by default in the new project.

  • "Add as Links" all the pages/classes from the original project.

If you want to have different content in the second app, just put the different content in a separate file and use that rather than a linked one. (Partial classes split across multiple files make this very easy.)

Another way to customize content in the second app is to define a partial method in the original app but only implement this in the second app (in a partial class/file which only exists in the second app). In the implemented partial method add your changes to override the default (original app) behaviour/layout/whatever. - This is a good way of altering pages where you don't want to have to put customization into an already existing app. You just "override" it in the second app.


You would need to submit the two slightly different applications to the market as separate applications in order for them to be seen on the user's device.

As Matt suggests, if the two applications have a lot in common, then you can use linked files to reduce your maintenance overhead.


In addition to Matt's suggestion, I've done this for Free/Paid versions of the same app.

It's pretty easy to do. The files to change between versions are:

  • the icons
  • the splash screen
  • the mobile XML file in the Properties folder

The important thing in the XML file is the GUID identifying your app. This GUID doesn't seem to be used in the Marketplace - but it is used by the debugger's deployment functionality.

You can also use a project level #define to include/remove any other code you want different between the projects.

0

精彩评论

暂无评论...
验证码 换一张
取 消