是什么导致Visual Studio无法正确加载程序集? [英] What causes Visual Studio to fail to load an assembly incorrectly?

查看:126
本文介绍了是什么导致Visual Studio无法正确加载程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直很高兴地在一个体面的解决方案(刚好超过13k LOC,5个项目)上进行编码,该解决方案利用Linq to Sql进行数据访问.突然间,我执行了正常的构建,并且收到了甜美,甜蜜的含糊信息:

I had been happily coding along on a decent sized solution (just over 13k LOC, 5 projects) which utilizes Linq to Sql for it's data access. All of sudden I performed a normal build and I received a sweet, sweet ambiguous message:

错误1由于C:\ xxx \ xxx.dbml中的验证错误而导致构建失败.打开文件并解决错误列表中的问题,然后尝试重建项目. C:\ xxx \ xxx.dbml

我好几个星期都没有接触过我的数据访问层,也没有对DBML文件进行任何调整.我尝试了许多繁琐的技巧,例如重新创建布局文件,进行复制并将现有文件重新添加到项目中,然后再重新启动Visual Studio(以防某些文件级损坏);全部无济于事.

I had not touched my data access layer for weeks and no adjustments had been made to the DBML file. I tried plenty of foolhardy tricks like re-creating the layout file, making copies and re-adding the existing files back to the project after restarting Visual Studio (in case of some file-level corruption); all to no avail.

我忘了穿Visual Studio Skills +5护身符,所以我开始四处搜寻,发现唯一有意义的答案是重置软件包,因为Visual Studio无法正确加载程序集.实际上,在运行" devenv.exe/resetskippkgs "之后,我便能够将dbml文件添加回DAL项目并重建解决方案.

I forgot to wear my Visual Studio Skills +5 talismans, so I began searching around and the only answer that I found which made sense was to reset my packages because Visual Studio was not loading an assembly correctly. After running "devenv.exe /resetskippkgs" I was, in fact, able to add the dbml file back to the DAL project and rebuild the solution.

我很高兴它已解决,但我也希望从这次经历中获得更深刻的理解. 有人知道在Visual Studio 2008中如何或为什么发生这种情况吗?

I’m glad it’s fixed, but I would rather also gain a deeper understand from this experience. Does anyone know how or why this happens in Visual Studio 2008?

新修改日期:2008年10月30日 这不是我刚刚发生的事情. Rich Strahl最近在他的网络日志"中写道:关于同样的经历 .他链接到另一个具有相同博客的博客发出并使用相同的操作.

New 10/30/2008 THIS WAS NOT SOMETHING THAT JUST HAPPENED TO ME. Rich Strahl recently wrote on his "web log" about the same experience. He links to another blog with the same issue and used the same action.

自从最初的帖子以来,我也几次遇到此问题,这使我认为这不是一些随机的问题.如果有人找到了明确的答案,请发表.

I have encountered this issue a few times since this original post as well, making me think that this is not some random issue. If anyone finds the definitive answer please post.

推荐答案

TBH,我有几个这样的实例,其中的文件似乎发疯了".但是,经调查发现,文件已更改(以某种方式表示形状或形式..(例如,有时可以通过无意中更改似乎与 无关的某个位置来更改文件).

TBH, I have had a couple of instances like this where files "seemed to go crazy".. However, upon investigation it has appeared that the files have changed in some way, shape or form.. (e.g. sometimes changes can be made to the file by inadvertantly changing a property somewhere that seems unrelated).

我认为有太多可能真正导致此问题的问题,并且基于该问题已得到解决的事实,似乎找不到答案.

I think there are too many possible issues that could really cause this, and based on the fact that the problem has been resovled, it seems like an answer will not be found..

这篇关于是什么导致Visual Studio无法正确加载程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆