目标"GetCopyToPublishDirectoryItems"在项目中不存在. [英] The target "GetCopyToPublishDirectoryItems" does not exist in the project.

查看:50
本文介绍了目标"GetCopyToPublishDirectoryItems"在项目中不存在.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装Visual Studio 2017 RC并升级我的ASP.NET Core Web应用程序(.NET Framework)项目之后,我不再能够将项目发布到文件系统中.

After installing Visual Studio 2017 RC, and upgrading my ASP.NET Core Web Application (.NET Framework) project, I am no longer able to publish my project to the file system.

构建解决方案可以正常工作,但是在发布时出现此错误:

Building the solution works fine, but when I publish I get this error:

The target "GetCopyToPublishDirectoryItems" does not exist in the project.  

我的项目引用了一个旧类库项目,该项目是同一解决方案的一部分.该错误与旧类库项目的CSPROJ文件中的错误有关,但没有行号,并且文本 GetCopyToPublishDirectoryItems 在CSPROJ文件中不存在.

My project has a reference to an old class library project which is part of the same solution. The error relates to something it doesn't like in the CSPROJ file for the old class library project, but there's no line number, and the text GetCopyToPublishDirectoryItems does not exist in the CSPROJ file.

似乎有些神秘,我在确定问题时遇到了麻烦.有人有任何建议吗?

Seems a little cryptic and I'm having trouble identifying the issue. Has anyone got any suggestions?

非常感谢

推荐答案

快速更新:似乎是一个错误.

Quick update: it seems that it's a bug.

我已经设法通过一个全新的ASP.NET Core项目(.NET Framework)和一个新的空类库项目来重现相同的错误.

I've managed to reproduce the same error with a brand new ASP.NET Core project (.NET Framework), and a new, empty Class Library project.

要复制:

  1. 创建一个新的ASP.NET Core项目(.NET Framework)和解决方案.
  2. 向解决方案中添加一个新的类库项目(.NET Framework).
  3. 在.NET Core项目中引用类库项目.
  4. 从.NET Core项目中的类库"项目实例化一个类.
  5. 重建解决方案-应该没问题.
  6. 发布.NET Core项目,它将引发错误.

希望它将在Visual Studio 2017 RC/RTM的将来版本中进行修补.

Hopefully it will be patched in a future version of Visual Studio 2017 RC / RTM.

不好意思,我现在必须回到Visual Studio 2015和XPROJ.

Shame, I'll have to go back to Visual Studio 2015 and XPROJ for now.

这篇关于目标"GetCopyToPublishDirectoryItems"在项目中不存在.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆