简体   繁体   中英

Why Visual studio 2017 is publishing entire solution?

Installed VS2017 from scratch and moved existing vb.net, c# webform solutions to the new laptop. First issue was related to "The target GatherAllFilesToPublish does not exist" error which I fixed by opening vbproj (or csproj on another project) and add this line:

<Target Name="GatherAllFilesToPublish">
</Target>

Now I was able to publish with no errors but the output in the destination folder is the entire solution including .aspx.vb or .aspx.cs files, .Global.asax.vb, .aspx.designer.vb files etc.

Checked the project Package/Publish Web settings and Items to deploy is set to "Only files needed to run this application".

在此处输入图片说明

Still the publishing copies the entire solution instead only the aspx, dll and only what is needed. Any idea what I am doing wrong ?

编辑csprojfile,在该文件中,将旧项目的版本与旧项目的版本在属性组中更改为vs2015。保存文件并重建.it即可正常工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM