C#Windows存储应用程序对二手dll-s的授予功能 [英] c# windows store app granting capabilities to used dll-s

查看:56
本文介绍了C#Windows存储应用程序对二手dll-s的授予功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows Store项目中使用TagLib. 将TagLib及其dll(taglib-sharp.dll)导入为参考. 由于功能中已选中该文件,因此我可以访问其音乐文件夹中的任何文件.但是,当我致电

I'd like to use TagLib in my Windows Store project. The TagLib is imported as reference, with its dll ( taglib-sharp.dll ) I can access any file in my music folder since it is checked in the capabilities. However, when I call

TagLib.File file = TagLib.File.Create(soundFilePath, TagLib.ReadStyle.None); 

它会引发以下错误:

System.UnauthorizedAccessException was unhandled by user code
HResult=-2147024891
Message=Access to the path 'C:\Users\Gabor\Music\_FIFA 2010 soundtracks\01. Meine Stadt - Auletta.mp3' is denied.
Source=taglib-sharp
StackTrace:
   at TagLib.File.Create(IFileAbstraction abstraction, String mimetype, ReadStyle propertiesStyle)
   at TagLib.File.Create(String path, String mimetype, ReadStyle propertiesStyle)
   at TagLib.File.Create(String path, ReadStyle propertiesStyle)

推荐答案

无法以这种方式进行.使用MusicProperties代替,然后使用lastfm api获取所需的信息..羞愧在Win8 c#中是如此困难,而在普通C#中则很容易

couldn't do it this way. used MusicProperties instead, and then used lastfm api to get the needed info.. shame its so difficult in Win8 c# what is easy in normal C#

这篇关于C#Windows存储应用程序对二手dll-s的授予功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆