Wpf clickonce部署后发生xamlparser错误。安装后应用程序崩溃

Wpf clickonce部署后发生xamlparser错误。安装后应用程序崩溃,wpf,deployment,clickonce,xamlparseexception,Wpf,Deployment,Clickonce,Xamlparseexception,我已经用visual studio 2008构建了一个WPF应用程序,并为其创建了一个安装程序。到目前为止运行良好。我意识到它缺少自动更新功能,在尝试了几种解决方案后,我决定尝试clickonce部署。在网络服务器上成功部署后,我注意到应用程序在安装下载的应用程序后崩溃。它抱怨: 无法创建程序集“MyApplication,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null”中定义的“Login”的实例。调用的目标已引发异常。标记文件“MyAp

我已经用visual studio 2008构建了一个WPF应用程序,并为其创建了一个安装程序。到目前为止运行良好。我意识到它缺少自动更新功能,在尝试了几种解决方案后,我决定尝试clickonce部署。在网络服务器上成功部署后,我注意到应用程序在安装下载的应用程序后崩溃。它抱怨:

无法创建程序集“MyApplication,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null”中定义的“Login”的实例。调用的目标已引发异常。标记文件“MyApplication”中出错;component/login.xaml'第1行第9位

这是stacktrace

位于System.Windows.Markup.XamlParseException.ThroweException(字符串消息、异常innerException、Int32 lineNumber、Int32 linePosition、Uri baseUri、XamlObjectId CurrentXamlObjectId、XamlObjectId ContextXamlObjectId、类型objectType)
位于System.Windows.Markup.XamlParseException.ThroweException(ParserContext ParserContext、Int32 lineNumber、Int32 linePosition、字符串消息、异常innerException) 位于System.Windows.Markup.BamlRecordReader.ThroweExceptionWithLine(字符串消息,异常innerException)
在System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(类型类型,Int16类型ID,布尔throwOnFail)中
位于System.Windows.Markup.BamlRecordReader.GetElementAndFlags(BamlElementStartRecord BamlElementStartRecord、对象和元素、ReaderFlags和flags、Type和delayCreatedType、Int16和delayCreatedTypeId)
位于System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
位于System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
位于System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord-BamlRecord)
位于System.Windows.Markup.BamlRecordReader.Read(布尔单记录)
在System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()中 位于System.Windows.Markup.TreeBuilder.Parse()
在System.Windows.Markup.XamlReader.LoadBaml(Stream-Stream,ParserContext-ParserContext,Object-parent,Boolean-closeStream)
在System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream,ParserContext pc)
位于System.Windows.Application.LoadComponent(Uri resourceLocator,布尔bSkipJournaledProperties)
位于System.Windows.Application.DoStartup()
在System.Windows.Application.b__0(未使用的对象)
位于System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调、对象参数、布尔isSingleParameter)
位于System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象源、委托回调、对象参数、布尔isSingleParameter、委托catchHandler)
在System.Windows.Threading.Dispatcher.WrappedInvoke(委托回调、对象参数、布尔isSingleParameter、委托catchHandler)中
在System.Windows.Threading.DispatcherOperation.InvokeImpl()上 位于System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(对象状态)
在System.Threading.ExecutionContext.runTryCode(对象用户数据)
在System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode代码、CleanupCode backoutCode、Object userData)中执行
在System.Threading.ExecutionContext.RunInternal(ExecutionContext ExecutionContext,ContextCallback回调,对象状态)
在System.Threading.ExecutionContext.Run(ExecutionContext ExecutionContext,ContextCallback回调,对象状态)
位于System.Windows.Threading.DispatcherOperation.Invoke()
位于System.Windows.Threading.Dispatcher.ProcessQueue()
在System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd、Int32 msg、IntPtr wParam、IntPtr lParam、Boolean和handled)
在MS.Win32.hwndwapper.WndProc(IntPtr-hwnd、Int32-msg、IntPtr-wParam、IntPtr-lParam、Boolean和handled)
在MS.Win32.HwndSubclass.DispatcherCallbackOperation(对象o)
位于System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调、对象参数、布尔isSingleParameter)
位于System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象源、委托回调、对象参数、布尔isSingleParameter、委托catchHandler)
在System.Windows.Threading.Dispatcher.WrappedInvoke(委托回调、对象参数、布尔isSingleParameter、委托catchHandler)中
位于System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority优先级、TimeSpan超时、委托方法、对象参数、布尔isSingleParameter)
位于System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority优先级、委托方法、对象参数)
在MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam)
在MS.Win32.unsafentivemethods.DispatchMessage(MSG&MSG)
位于System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame框架)
位于System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame框架)
在System.Windows.Threading.Dispatcher.Run()上 位于System.Windows.Application.RunDispatcher(对象忽略)
在System.Windows.Application.RunInternal(窗口窗口)
在System.Windows.Application.Run(Window窗口)
在System.Windows.Application.Run()上 在myApplication.App.Main()中

这里就是调试器指向的区域

<Window x:Class="MyApplication.Login"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:MyApplication"
    xmlns:UI="clr-namespace:UI;assembly=UI"
Title="My Application"  Height="400" Width="550" ResizeMode="NoResize" WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterScreen" Name="Logine" Loaded="Logine_Loaded" Closed="Logine_Closed" Icon="orLogo.ico">

但是安装项目中的msi中的安装程序版本运行良好。因此,我无法看到错误来自何处,因为我可以查看设计视图。
问题1:是否有人有类似的问题,或者这是一个已知的问题?
问题2:如果这是一个已知的问题,那么有什么替代方案。我可能会放弃clickonce,但我会放弃我的汽车