问题描述
我目前正在为公司中的其他应用程序开发服务器控件,以与WCF服务交互.每次更改代码并重新编译控件时,我都会将AsseemblyInfo.cs中的AssemblyVerison和AssemblyFileVersion类加1.例如,我的最新版本从1.0.07.0升级到1.0.08.0.
I am currently working on a server control for other applications in our company to interface with a WCF service. Every time I make a change code change and recompile the control, I increment the the AssemblyVerison and AssemblyFileVersion class in the AsseemblyInfo.cs by one. For example, my latest build went from 1.0.07.0 to 1.0.08.0.
使用方应用程序通过复制bin目录中的最新文件来更新文件并尝试进行编译时,会收到以下错误:
When the consuming application updates the file by copying the latest file in the bin directory and tries to compile, they receive the following error:
为了解决此错误,他们必须删除当前引用,然后重新添加引用.
In order to resolve this error, they have to delete the current reference and re-add the reference.
有什么方法可以更新服务器控件,而不必删除并重新添加引用?
Is there any way to update the server control without having to delete and re-add the reference?
我对服务器控件的命名不是很严格.
@JPunyon-您的意思是说,正在使用的应用程序将服务器控制项目添加到其解决方案中吗?
I am not strong naming the server control.
@JPunyon - Do you mean have the consuming application add the server control project to their solution?
推荐答案
在解决方案资源管理器的属性中右键单击程序集引用,禁用特定版本"选项.
Right-click the assembly reference in the solution explorer, properties, disable the "Specific Version" option.
这篇关于“您是否缺少程序集参考?"编译错误-Visual Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!