I am trying to create an instance of StorageFile in my class library...
var localFolder = ApplicationData.Current.LocalFolder;
StorageFile destinationFile = await localFolder.CreateFileAsync(destination, CreationCollisionOption.GenerateUniqueName);
VS11 is not building say: 'await' requires that the type 'Windows.Foundation.IAsyncOperation' have a suitable GetAwaiter method. Are you missing a using directive for 'System'?
obviously I am using .net 4.5 as target and I am referencing Windows Assemblies...
not sure why this code work in MetroStyle but does not build in a class library... How can I create an instance of Storagefile in a class library??? at this stage it is not important if the file is created in an async way...
pls let me know your thoughts...
Stelio
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…