在我的当前项目中,我需要使用。但是,我无法安装它。
在这里,您可以看到我使用的是正确的命名空间。
using System.Windows.Media.Transcoding;我环顾了一下NuGet,但在那里找不到它。我阅读了有关它的Microsoft页面,但这只告诉了我名称空间。我也找不到是大会。有人能帮我安装一下吗。
发布于 2016-12-21 10:15:06
您可以按照以下说明操作:
通过使用外部编辑器打开.csproj文件并添加行来修改目标平台
<TargetPlatformVersion>8.0</TargetPlatformVersion>至于这个例子
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6D41F51D-5A85-4826-9868-14FB3591F280}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WindowsFormsApplication1</RootNamespace>
<AssemblyName>UseWindowsMediaTranscodingAPI</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetPlatformVersion>8.0</TargetPlatformVersion>
</PropertyGroup>重新加载解决方案并添加对的引用

这应该已经编译好了。
此外,为了能够处理事件和异步方法映射,您应该添加对系统dll的引用:
C:\程序文件(x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\System.Runtime.InteropServices.WindowsRuntime
请记住,应用程序只在Windows 10上工作。
https://stackoverflow.com/questions/41096357
复制相似问题