System.Environment definition is missing from WIndows 8.1

I am making an application for the Windows 8.1 store. I want to set a default directory to load some images, and I use this code for this:

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YouMaps.Tiles
{
class TileLoader
{
    public const string defaultCasheName = "YouMapsTileCashe";
    public static string defaultCasheDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "YouMaps");

I get an error that System.Environment does not contain definitions for GetFolderPath and SpecialFolder. I f12'ed over the environment and of course it was all there

#region Assembly System.Runtime.Extensions.dll, v4.0.0.0
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1\System.Runtime.Extensions.dll
#endregion
using System.Security;

namespace System
{
public static class Environment
 {

    public static int CurrentManagedThreadId { get; }
    public static bool HasShutdownStarted { get; }
    public static string NewLine { get; }
    public static int ProcessorCount { get; }
    public static int TickCount { get; }
    public static void FailFast(string message);        
    public static void FailFast(string message, Exception exception);
 }
}

However, when I look at Windows MSDN, it seems that even Windows 8.1 should have access to the full range of definitions. I was looking for using Google and only inside to find out if anyone else has such a problem, but I did not find anything even remotely. So the question is: can someone tell me why my environment “misses” 90% of its definitions, and secondly, how can I fix it?

oh, :

.NET for Windows Store apps
Bing Maps for C#, C++, or Visual Basic
Microsoft Visual C++ 2013 Runtime Package for Windows
SharpKml
Windows

, . , - , , - , .

+4
2

Windows Store , :

Windows.Storage.ApplicationData.Current.LocalFolder Windows.Storage.ApplicationData.Current.RoamingFolder

http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.aspx

Windows.Storage.ApplicationData.Current.TemporaryFolder .

+3

:

Environment.GetEnvironmentVariable("LocalAppData");

p.s. windows

0

All Articles