Reputation: 79
I'm trying to update an outdated WPF SDK for UWP and I have this line of code:
string path = System.Assembly.GetName().Location;
Anyone know of something similar which is generic enough to be used in an SDK for UWP?
Upvotes: 0
Views: 461
Reputation: 32775
In UWP you could use typeof(Class).GetTypeInfo().Assembly.Location
to get the location of specified Assembly
.
And you could also use Windows.ApplicationModel.Package.Current.InstalledLocation.Path
to get the bundle of your project.
Upvotes: 2