简体   繁体   English

为什么Visual Studio 2017会发布整个解决方案?

[英]Why Visual studio 2017 is publishing entire solution?

Installed VS2017 from scratch and moved existing vb.net, c# webform solutions to the new laptop. 从头开始安装VS2017,并将现有的vb.net,c#Webform解决方案移至新笔记本电脑。 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: 第一个问题与“目标GatherAllFilesToPublish不存在”错误有关,我通过打开vbproj(或另一个项目上的csproj)并添加此行来修复此错误:

<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. 现在,我可以无错误地发布,但是目标文件夹中的输出是整个解决方案,包括.aspx.vb或.aspx.cs文件,.Global.asax.vb,.aspx.designer.vb文件等。

Checked the project Package/Publish Web settings and Items to deploy is set to "Only files needed to run this application". 检查项目的打包/发布Web设置,并将要部署的项目设置为“仅运行该应用程序所需的文件”。

在此处输入图片说明

Still the publishing copies the entire solution instead only the aspx, dll and only what is needed. 出版仍然复制整个解决方案,而不是只复制aspx,dll和仅需要的内容。 Any idea what I am doing wrong ? 知道我在做什么错吗?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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