Sign in to follow this  
Followers 0

C# Metro App (name, version, etc)


3 posts in this topic

Posted

Hello gang,

I am migrating an application from VB to C#/Metro. Currently I am attempting to get the app name and version. In standard c# (non-Metro) I can get the app name with:


string sAppName =  Assembly.GetEntryAssembly().GetName().Name;

However these are not available in Metro apps (I'm planning on this app being available for Phone and Surface) Any thoughts?

Thanks

Share this post


Link to post
Share on other sites

Posted


var packageName = Windows.ApplicationModel.Package.Current.Id.Name;

var packageVersion = Windows.ApplicationModel.Package.Current.Id.Version;

That should get you both. If your package name is set as a Guid still that's all you will get for the name. :/

Share this post


Link to post
Share on other sites

Posted


var packageName = Windows.ApplicationModel.Package.Current.Id.Name;

var packageVersion = Windows.ApplicationModel.Package.Current.Id.Version;

That should get you both. If your package name is set as a Guid still that's all you will get for the name. :/

Thank you kindly, that will at the very least give me a start.

Have a great day

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.