Where are Windows Store apps located?

Some developers may be curious, where their apps are stored on their PCs after having been uploaded to Windows Store and then downloaded. Well the answer is quite simple.

All these apps are in a directory called WindowsApps (C:\Program Files\WindowsApps). By default this directory is hidden. To make it visible click on the View tab and then make sure Hidden item is checked.

Step 1
Step 1

Also access to this directory will probably be denied by default. To gain the required permissions do the following.

  1. Right-click the WindowsApps folder.
  2. Go to Properties.
  3. Select the Security tab.
  4. Then at the bottom of the window you should see an Advanced button. Click on it.
  5. In the new window click on Change.
  6. Write your account name into the last text box labeled Enter the object name to select.

After finishing this process, you should be able to access WindowsApps folder without any problem. If you still encounter any problem, feel free to ask me in the Comments section. I will answer as soon as possible.

NuGet 101

Many developers nowadays want their libraries public and widely used. For the ones of you developing libraries in C#, the best choice is NuGet.

What is NuGet?

NuGet is a package manager built into Visual Studio.

How to use NuGet?

There are two ways to download a package from NuGet. If you adore console-like interfaces, use a feature called Package Manager Console (Tools -> NuGet Package Manager -> Package Manager Console).

Package Manager Console
Package Manager Console

If you would rather use a GUI version of the Package Manager Console, click on Tools -> NuGet Package Manager -> Manager NuGet Packages For Solution.

For the purpose of this tutorial, I will use Package Manager Console. After opening the console, enter the following “Install-Package <package_name>”. Of course, in your case the <package_name> should be replaced with a valid package name (e.g. DZetko.Xml).

Package Manager Console
Package Manager Console

After hitting Enter, the package should start to install. This process may take a few seconds or minutes, based on the package size. If installation was successful, you should see “Successfully installed ‘<package_name>’ to <project_name>” as the last line of the console (once again with valid package name and project name).

How to publish packages to NuGet?

If you are a C# and you just finished your first library, then fire up your favorite browser and enter the following address  to download GUI version of NuGet Package Explorer. After the download and installation is complete, a window with a button should appear.

NuGet Package Explorer
NuGet Package Explorer

Then click on Create a new package or use the Ctrl + N keyboard shortcut. In the new window click on the little circled button.

Step 1
Step 1
Step 2

On the next screen fill the text boxes with bold labels next to them. Other text boxes are not required but you can fill them anyway. If you are not sure what some of the labels mean, please refer to this site.

Next step is very important, because we will be adding the .dll file into our package’s root. You can do so by dragging it from a folder where it is stored in, to the Package contents part of the NuGet Explorer window. A dialog will appear. Just click yes and the .dll file should now be shown in the lib folder in NuGet Package Explorer window.

Step 3
Step 3
Step 4

Your package is now complete. Only thing that’s left is to publish you library to NuGet. To do so, click on the green tick button on the left of the window. Then click on File -> Publish. A dialog will appear with an empty text box with Public key label. The key is a unique identifier which assigns every published package to your account. To obtain this key, navigate to http://nuget.org/ in your web browser and click on Register button under the search box. On the next page either sign-up with your Microsoft Account or fill-in required information on the bottom of the page to create a NuGet account. You will then recieve a confirmation e-mail. After the registration process is complete, sign-in and click on the button that says your name next to the Sign out button. On the next page, you should see an API key. Copy it over to the Publish Package dialog window of the NuGet Package Explorer. Then click the Publish button and wait until the process finishes. And you are done!

It will take a moment before the package is visible publicly.