2009-12-23 27 views
1

當調用InitializeComponent時,我在WPf應用程序中遇到了此錯誤。在設計器中出現此錯誤:System.Windows.Baml2006.TypeConverterMarkupExtension引發異常

Could not load file or assembly 'LCP.ScanLite.WindowsWPF, Culture=neutral' or one of its dependencies. The system cannot find the file specified. 
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.Assembly.Load(AssemblyName assemblyRef) 
    at System.Windows.Navigation.BaseUriHelper.GetLoadedAssembly(String assemblyName, String assemblyVersion, String assemblyKey) 
    at MS.Internal.AppModel.ResourceContainer.GetResourceManagerWrapper(Uri uri, String& partName, Boolean& isContentFile) 
    at MS.Internal.AppModel.ResourceContainer.GetPartCore(Uri uri) 
    at System.IO.Packaging.Package.GetPartHelper(Uri partUri) 
    at System.IO.Packaging.Package.GetPart(Uri partUri) 
    at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream() 
    at System.IO.Packaging.PackWebResponse.GetResponseStream() 
    at System.IO.Packaging.PackWebResponse.get_ContentType() 
    at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle) 
    at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache) 
    at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation() 
    at System.Windows.Media.Imaging.BitmapImage.EndInit() 
    at Microsoft.Expression.Platform.WPF.InstanceBuilders.WpfBitmapCache.GetImageSource(Uri sourceUri) 
    at Microsoft.Expression.Platform.WPF.InstanceBuilders.BitmapImageInstanceBuilder.InitializeImageSource(IInstanceBuilderContext context, DocumentNode valueNode) 
    at Microsoft.Expression.Platform.WPF.InstanceBuilders.BitmapImageInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode) 
    at Microsoft.Expression.DesignModel.Core.ViewNodeManager.Instantiate(ViewNode viewNode) 

LCP.ScanLite.WindowsWPF是我的程序集。

回答

1

我發現了這個問題。我更改了程序集名稱,並且頁面中的所有圖像都鏈接到了舊名稱。

相關問題