私は私のプロジェクトで、次の例外読み込み任意のXAMLを取得:私は私の解決策の内側ではなく、ブランドの新しいソリューションに新しいSilverlightプロジェクトを生成しても奇妙なSilverlightのデザイナーエラー
'/Microsoft.VisualStudio.Xaml;Component/MS/Internal/Designer/PropertyEditing/Resources/StylesCore.Constants.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The system cannot find the file specified. Error at object 'ResourceDictionary_2' in markup file 'Microsoft.VisualStudio.Xaml;component/MS/Internal/Designer/PropertyEditing/Resources/StylesCore.xaml'.
at System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
at System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
at System.Windows.Markup.BamlRecordReader.ThrowExceptionWithLine(String message, Exception innerException)
at System.Windows.Markup.BamlRecordReader.ReadPropertyRecordBase(String attribValue, Int16 attributeId, Int16 converterTypeId)
at System.Windows.Markup.BamlRecordReader.ReadPropertyConverterRecord(BamlPropertyWithConverterRecord bamlPropertyRecord)
at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
at System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()
at System.Windows.Markup.TreeBuilder.Parse()
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
at System.Windows.Application.LoadComponent(Uri resourceLocator)
at MS.Internal.Designer.PropertyEditing.Resources.PropertyInspectorResources.GetResources()
at MS.Internal.Designer.PropertyEditing.PropertyInspectorHost.get_Host()
at MS.Internal.Designer.VSDesigner.VSDesignerClientImpl.get_PropertyWindow()
at MS.Internal.Designer.VSDesignerClient.get_PropertyWindow()
at MS.Internal.Designer.DesignerPane.LoadDesignerView()
これが発生します。私はこの問題を抱える唯一の人ではないことを知り、あなたに私の考えがあるかどうか疑問に思っていました。
Here is a post of someone with the same error, from Google Cache.
私のソリューションは、log4netのを使用しています。私のプロジェクトは、私のアセンブリがSilverlightランタイムに対してコンパイルされていないため、log4netを参照できません。繰り返しになりますが、これはデザイナでこのエラーをスローする自動生成された「新しいSilverlightプロジェクト」です。 –
注:このプロジェクトのファイルはlog4netを参照していません。それは実際にクラッシュしているデザイナーです...アプリケーションは展開されたときにうまくコンパイルされます。 –
それは奇妙なものです。メモ帳で犯人プロジェクトファイルを開いた場合、log4netの参照はありますか?私はlog4netが新しいSLプロジェクトにどのように関わっているのか、どうしてそれがなぜ唯一の野生の推測でlog4netをインストールするのか分からず、すべてのVS.Netテンプレートに自分自身を追加させました。 – sipwiz