System. Windows.Markup.XamlParseExceptionoccurred

PresentationFramework.dll中出现’System.Windows.Markup.XamlParseException’类型的第一次机会异常

附加信息:’Set property’System.Windows.ResourceDictionary.source’引发了一个异常.行号“21”和行位置“6”.

“无法加载文件或程序集’ResourceLibrary,Culture = neutral’或其中一个依赖项.系统无法找到指定的文件.”:“ResourceLibrary,Culture = neutral”

=== Pre-bind state information ===
LOG: displayName = ResourceLibrary,Culture=neutral
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: ResourceLibrary,Culture=neutral | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,WRN: that consists of the simple name,version,culture,and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug
LOG: Initial PrivatePath = NULL
Calling assembly : (UnkNown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\QTAgent32.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private,custom,partial,or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/ResourceLibrary/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/ResourceLibrary/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PublicAssemblies/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PublicAssemblies/ResourceLibrary/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/DataCollectors/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/DataCollectors/ResourceLibrary/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/DataCollectors/x86/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/DataCollectors/x86/ResourceLibrary/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/DataCollectors/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/DataCollectors/ResourceLibrary/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/DataCollectors/x86/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/DataCollectors/x86/ResourceLibrary/ResourceLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/ResourceLibrary/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/ResourceLibrary/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PublicAssemblies/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PublicAssemblies/ResourceLibrary/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/DataCollectors/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/DataCollectors/ResourceLibrary/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/DataCollectors/x86/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/DataCollectors/x86/ResourceLibrary/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/DataCollectors/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/DataCollectors/ResourceLibrary/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/DataCollectors/x86/ResourceLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Users/me/Documents/projects/Autom/git/Autom/VisCong/VisConf_Tests/bin/Debug/PrivateAssemblies/DataCollectors/x86/ResourceLibrary/ResourceLibrary.EXE.

解决方法

这个问题只是对我自己以及在寻找这个问题的解决方案时来到这里的任何人的参考.

引用中的“复制本地”设置为“True”,但DLL未复制到构建文件夹.

由于我仅在XAML中使用此资源库,因此我必须添加一个using语句:

using ResourceLibrary;

在引用代码中(实际上,调用引用代码的代码,可以是应用程序或单元测试)

这使得DLL在目标构建目录中创建.

编辑:

有时即使使用ResourceLibrary也不起作用.解决方案是在ResourceLibrary的代码隐藏中创建一些空的静态方法:

namespace ResourceLibrary {
    public static class ReferencePoint {
        public static ReferToMe() {}
    }
}

并从引用代码调用它:

ReferencePoint.ReferToMe();

c# – XamlParseException:无法加载文件或程序集“ResourceLibrary,…”或其依赖项之一.该系统找不到指定的文件的更多相关文章

  1. 在Xcode中安装的git中禁用osxkeychain凭证帮助程序

    解决方法如果您的问题主要关注的是安全性,并且您希望每次都输入密码,那么我会接受钥匙串以适应您的目标>进入osx钥匙串应用程序,>如果您使用的是https,请查找服务器名称>通过单击更改其设置,并在选项卡“访问控制”标记“询问钥匙串密码”下>如果需要,请从列入白名单的应用程序列表中删除git-credential-osxkeychain应用程序.请注意,在Linux上,默认行为也是自动发送凭据.

  2. ios – Xcode Server 4.0 git从构建触发脚本推送

    我为一个托管在github上的项目安装了一个XcodeBot.我按照步骤和设置机器人来使用我现有的SSH密钥.验证成功,项目结算和建立.然后,我在预触发器操作中添加了一个shell脚本,它增加了plist中的版本,将其标记,并将该更改提交到github.但是当我尝试从shell脚本执行gitpush时,我得到:–推送到git@github.com:spex-app/spex-ios.git权限被拒

  3. xcode – 为什么Jenkins在我的Mac上运行不会连接到本地的git repo?

    我正在尝试使用Jenkins实现自动化构建,用于我的iOS项目.我添加了Git插件,但是一旦我尝试将git的URL放在项目的git配置中,它会在下面的屏幕截图中显示错误.这里Jenkins不能从repo克隆到其工作空间.解决方法在大多数情况下,gitbarerepo有扩展名.git我的意思是(其他)/test1看起来不正确,我认为应该是(其他)/test1.git在我的mac上有同样的错误.

  4. 哪些Xcode项目文件可以从我的git repo中排除?

    我正在开发一个iOS项目,并使用git进行版本控制.我正在与另一位开发人员合作.我应该保留哪些Xcode项目文件在repo中,哪些可以排除,这样不会对其他开发者产生负面影响?这里有一些非代码文件,git告诉我已被修改或添加…

  5. xcode – 不能推送到远程git存储库

    所以我一直在麻烦把我最近的提交到我在Bitbucket上设置的远程仓库.我最初使用Xcode,并且已经要求thisquestion,并建议使用终端来推送而不是Xcode.现在,我尝试了终端,但是并没有解决问题.但是当我尝试gitpush时,它确实给了我更详细的错误信息我是这些远程存储库的新手,并且Xcode上的一切都正常工作,所以如果您建议我在终端中执行某些操作,如果您描述了如何执行此操作,这将有

  6. Xcode 4.5自动更改.xib文件

    由于我升级到Xcode4.5,我发现它会自动删除我访问的每个xib文件的一部分.这是一节:我几乎可以这样生活,但是当我再次访问该文件时,我发现还有更多的“自动”更改.他们变得更加多样,难以表征,所以我不会包括例子,除非我真的需要.我不明白这里发生了什么.我正在寻找两个答案之一:>有没有办法禁用这个?>为什么会发生这种情况,有没有办法强制Xcode将这些更改应用于所有xib文件,以便我可以做到这一点?

  7. ios – XCode中的源代码管理是一场噩梦 – 任何人都可以提供建议?

    使用Git与Xcode(4.3)是一个真正的噩梦.这是一个场景…我承诺我的变化–好的.我跳回主人拉动变更.突然间我得到:是吧?解决方法我只是添加这些文件到我的.gitignore文件.没有必要与其他开发人员分享.所以我有:在.gitignore中请注意,您链接的stackoverflow问题说不排除project.pbxproj,但它并不表示不排除*.xcworkspace.但是,我目前没有使用工作区功能.如果您使用工作区功能,则可能需要包含这些文件,但忽略xcuserdata文件.

  8. Xcode表示“未提交的更改”每当我尝试git拉或推

    我在我的项目中使用git,每当我尝试从Xcode中抽出时,我得到“未提交的更改”,并阻止我拉/推.我尝试提交并找到一个扩展名为*.xcuserstate的文件,每当我打开/滚动到Xcode中的任何项目文件时,这个文件被修改.这让我没有任何选择,只能做一个包含该文件的单一提交,该文件用无意义的提交填充git提交日志.这是有办法阻止这种行为吗?

  9. ios – 将watchkit扩展添加到项目之后,以前添加的第三方框架不再起作用

    我有一个正在工作的应用程序,一切都很好.当我转到File->New->Target并添加一个watchkit应用程序/扩展名时,由于“Module”Crashlytics“找不到”,构建立即被破坏.目前,Crashlytics是使用@importCrashlytics访问的,我检查了项目,pbxproj文件具有引用到正确位置的crashlytics框架,Crashlytics.h在项目中可见.我尝试切换到#import“Crashlytics.h”,只是为了看看是否可能与模块有关,而不是简单地导入标题,但

  10. xcode git无法从远程存储库中提取更改

    我正在与另一个开发人员开发iPhone应用程序.我们的git仓库位于远程服务器上.所以我们正在使用我们的工作副本,然后我们一个接一个提交,拉,推,我们把我们的本地工作副本与服务器和彼此同步.一切都很好,直到今天.其他开发人员成功将他的更改推送到远程存储库,现在轮到我了:提交,从远程存储库中提取更改,可能会以某种方式合并它们,然后将我的工作副本推送到服务器.但是当我想要改变(使用xcode的内置gi

随机推荐

  1. c# – (wpf)Application.Current.Resources vs FindResource

    所以,我正在使用C#中的WPF创建一个GUI.它看起来像这样:它现在还没有完成.这两行是我尝试制作一种数据表,它们在XAML中是硬编码的.现在,我正在C#中实现添加新的水果按钮功能.我在XAML中有以下样式来控制行的背景图像应该是什么样子:因此,在代码中,我为每列col0,col1和col2创建一个图像,如果我使用以下代码,它添加了一个如下所示的新行:如你所见,它不太正确……为什么一个似乎忽略了一些属性而另一个没有?

  2. c# – 绑定DataGridTemplateColumn

    似乎我已经打了个墙,试图在DataGrid上使用DataTemplates.我想要做的是使用一个模板来显示每个单元格的两行文本.但是似乎无法以任何方式绑定列.以下代码希望显示我想做的事情.注意每个列的绑定:模板列没有这样的东西,因此,这个xaml不可能工作.我注定要将整个DataTemplate复制到每个列,只是对每个副本都有不同的约束?解决方法我不完全确定你想要做什么,但如果您需要获取整行的DataContext,可以使用RelativeSource绑定来移动视觉树.像这样:

  3. c# – 学习设计模式的资源

    最近我来到了这个设计模式的概念,并对此感到非常热情.你能建议一些帮助我深入设计模式的资源吗?

  4. c# – 是否有支持嵌入HTML页面的跨操作系统GUI框架?

    我想开发一个桌面应用程序来使用跨系统,是否有一个GUI框架,允许我为所有3个平台编写一次代码,并具有完全可脚本化的嵌入式Web组件?我需要它有一个API来在应用程序和网页之间进行交流.我知道C#,JavaScript和一些python.解决方法Qt有这样的事情QWebView.

  5. c# – 通过字符串在对象图中查找属性

    我试图使用任意字符串访问嵌套类结构的各个部分.给出以下(设计的)类:我想要从Person对象的一个实例的“PersonsAddress.HousePhone.Number”获取对象.目前我正在使用反思来做一些简单的递归查找,但是我希望有一些忍者有更好的想法.作为参考,这里是我开发的(crappy)方法:解决方法您可以简单地使用标准的.NETDataBinder.EvalMethod,像这样:

  6. c# – 文件下载后更新页面

    FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7&displaylang=en&pf=true它呈现该页面,然后使用以下元刷新标签来实际向用户提供要下载的文件:你可能需要在你的应用程序中做类似的事情.但是,如果您真的有兴趣在文件完全下载后执行某些操作,那么您的运气不佳,因为没有任何事件可以与浏览器进行通信.执行此操作的唯一方法是上传附件时使用的AJAXupload.

  7. c# – 如何在每个机器应用程序中实现单个实例?

    我必须限制我的.net4WPF应用程序,以便每台机器只能运行一次.请注意,我说每个机器,而不是每个会话.我使用一个简单的互斥体实现单实例应用程序,直到现在,但不幸的是,这样一个互斥是每个会话.有没有办法创建机器互连,还是有其他解决方案来实现每个机器应用程序的单个实例?

  8. c# – WCF和多个主机头

    我的雇主网站有多个主机名,都是同一个服务器,我们只是显示不同的皮肤来进行品牌宣传.不幸的是,在这种情况下,WCF似乎不能很好地工作.我试过overridingthedefaulthostwithacustomhostfactory.这不是一个可以接受的解决方案,因为它需要从所有主机工作,而不仅仅是1.我也看过thisblogpost,但是我无法让它工作,或者不是为了解决我的问题.我得到的错误是“这

  9. c# – ASP.NET MVC模型绑定与表单元素名称中的虚线

    我一直在搜索互联网,试图找到一种方式来容纳我的表单元素的破折号到ASP.NET的控制器在MVC2,3或甚至4中的默认模型绑定行为.作为一名前端开发人员,我更喜欢在我的CSS中使用camelCase或下划线进行破折号.在我的标记中,我想要做的是这样的:在控制器中,我会传入一个C#对象,看起来像这样:有没有办法通过一些正则表达式或其他行为来扩展Controller类来适应这种情况?我讨厌这样的事实,我必须这样做:甚至这个:思考?

  10. c# – 用户界面设计工具

    我正在寻找一个用户界面设计工具来显示文档中可能的GUI.我不能生成代码.我知道MicrosoftVisio提供了一个功能.但有什么办法吗?您使用哪种软件可视化GUI?

返回
顶部