CS0012 您必须添加对程序集 Windows、版本 255,255,255,255 Windows 运行时的引用
CS0012 You must add a reference to assembly Windows, Version 255,255,255,255 WindowsRuntime
我正在努力按照帮助on extending my winforms app with UWP
private async void button1_Click(object sender, EventArgs e)
{
string str = "WinTreeWUP://";
Uri uri = new Uri(str);
var success = await Windows.System.Launcher.LaunchUriAsync(uri);
}
如屏幕转储所示,我已经添加了文档建议的参考资料。
UWP 应用的最低目标是 Windows 版本 1809 内部版本 17763
我正在使用 VS2017 V15.9.3
完整的错误是
CS0012 C# The type 'IAsyncAction' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
来源位于https://github.com/kgreed/WinTree
我在 winforms 项目中使用了以下引用
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\Facades\System.Runtime.InteropServices.WindowsRuntime.dll
C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.dll
C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.UI.Xaml.dll
C:\Program Files (x86)\Windows Kits\References.0.17763.0\Windows.Foundation.FoundationContract.0.0.0\Windows.Foundation.FoundationContract.winmd
C:\Program Files (x86)\Windows Kits\References.0.17763.0\Windows.Foundation.UniversalApiContract.0.0.0\Windows.Foundation.UniversalApiContract.winmd
我添加了对 C:\Program Files (x86)\Windows Kits\UnionMetadata.0.17763.0\Windows.winmd
的引用
构建不再有问题。
我正在努力按照帮助on extending my winforms app with UWP
private async void button1_Click(object sender, EventArgs e)
{
string str = "WinTreeWUP://";
Uri uri = new Uri(str);
var success = await Windows.System.Launcher.LaunchUriAsync(uri);
}
如屏幕转储所示,我已经添加了文档建议的参考资料。
UWP 应用的最低目标是 Windows 版本 1809 内部版本 17763 我正在使用 VS2017 V15.9.3
完整的错误是
CS0012 C# The type 'IAsyncAction' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
来源位于https://github.com/kgreed/WinTree
我在 winforms 项目中使用了以下引用
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\Facades\System.Runtime.InteropServices.WindowsRuntime.dll
C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.dll
C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.UI.Xaml.dll
C:\Program Files (x86)\Windows Kits\References.0.17763.0\Windows.Foundation.FoundationContract.0.0.0\Windows.Foundation.FoundationContract.winmd
C:\Program Files (x86)\Windows Kits\References.0.17763.0\Windows.Foundation.UniversalApiContract.0.0.0\Windows.Foundation.UniversalApiContract.winmd
我添加了对 C:\Program Files (x86)\Windows Kits\UnionMetadata.0.17763.0\Windows.winmd
的引用构建不再有问题。