我正在尝试根据此博客文章创建一个 VB.Net 标记扩展,但在 vb.net
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
ShutdownMode="OnExplicitShutdown">
<Application.Resources>
</Application.Resources>
<JumpList.JumpList>
<JumpList ShowRecentCategory="True">
<JumpTask Title="Save as..." Arguments="-saveas"
ApplicationPath="{local:ApplicationFullPath}">
</JumpTask>
</JumpList>
</JumpList.JumpList>
</Application>
但它在抛出
错误 1 未知的构建错误,'键不能为空。参数名称:key Line 9 Position 62.' C:\Users\jessed.ECREATIVE\My Dropbox\Projects\c2d2\c2d2\Application.xaml 9 62 c2d2
我将示例的 c# 部分转换为
Public Class ApplicationFullPath
Inherits Markup.MarkupExtension
Public Overrides Function ProvideValue(ByVal serviceProvider As System.IServiceProvider) As Object
Return System.Reflection.Assembly.GetExecutingAssembly.Location()
End Function
End Class
我错过了什么吗?任何帮助将不胜感激