Copy Local = false ignored when I Publish my ASP.NET Web Application

早过忘川 提交于 2019-12-25 02:26:57

问题


I have an ASP.NET Web Application that has several references set. I have Copy Local set to False for several of them, but when I Publish my application it copies the .dlls anyway. How can I turn that off for good? The dlls are registered in the GAC on the web server and I want to make sure that those are references instead of local copies.

Thanks!


回答1:


Do you have the assemblies registered in the GAC on your local developer machine? If not, register them in the GAC there and it should honor your copy local settings when you build the solution there.




回答2:


I might be wrong but I don't recall a publish option to prevent local copy of the referenced assemblies. You might have to remove them manually or write some script or batch files to automate it.

Maybe this article can help: http://www.beansoftware.com/ASP.NET-Tutorials/Deploy-ASP.NET.aspx




回答3:


You could use a Web Deployment Project for this. You can configure that specific files will be deleted after the Build process.

For a Web Deployment Project you need at least VS 2008 SP1.



来源:https://stackoverflow.com/questions/2032318/copy-local-false-ignored-when-i-publish-my-asp-net-web-application

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