The type 'xxx' is defined in an assembly that is not referenced

自作多情 提交于 2019-12-01 21:42:34

So after putting in a few more hours with my Architect, we found the issue. Our developers had multiple copies of the same dll buried in various folders in our Source Control. One of the projects was referencing the incorrect .dll.

After fixing the references and removing the extra uneeded .dlls, the error is gone and our builds are finally working! :)

You mentioned that you tried building solution on the test server. Did you use visual studio 2012 to build the solution or did you actually run msbuild?

The accurate test would be to use msbuild similar to this:

MSBuild MySolution.sln /p:Configuration="Debug" /p:Platform="CPU Any"

You can actually get the exact command by looking at the build logs for TFS Build, it will list the build command it executed and simply run it yourself (you'll need to remove extra stuff TFS Build adds for logging)

After that you can run the same command on your local machine and see if it passes.

Another thing to try is to set "copy local" for all assemblies in the project.

Hope this helps!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!