Skip to content
| Marketplace
Sign in
Visual Studio>Templates>WinRT Console Application Template
WinRT Console Application Template

WinRT Console Application Template

Lucian Wischik, MSFT

|
6,054 installs
| (0) | Free
A project template for creating a command-line application which can use WinRT APIs (and can only run on Windows 8)
Download

A project template for creating a command-line application which can use WinRT APIs (and can only run on Windows 8)

For instance, you can...

Dim files = Await Windows.Storage.KnownFolders.PicturesLibrary.GetFilesAsync()
Using file = Await files.First.OpenAsync(Windows.Storage.FileAccessMode.Read)
Dim decoder = Await Windows.Graphics.Imaging.BitmapDecoder.CreateAsync(file)
Console.WriteLine(decoder.OrientedPixelWidth)
End Using 

 

Technically, (1) the template adds TargetPlatformVersion=8.0 to the project template so it's allowed to reference WinRT, and requires Windows 8, (2) adds VBRuntime=Embed so you only use the subset of VB runtime functions that are allowed in windows app store, (3) adds references to Windows.winmd, (4) adds references to standard reference libraries that are used in windows app store apps -- System.Net.Http.dll, System.Runtime.WindowsRuntime.dll, System.Runtime.dll, System.Threading.Tasks.dll, System.IO.dll, System.Runtime.InteropServices.WindowsRuntime.dll, (5) adds project-level imports for System.IO and System.Runtime.InteropServices.WindowsRuntime, so you can use the WinRT-interop extension methods in those namespaces, (6) sets it to Option Strict On.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft