“包装"解决方案资源管理器中不存在该文件夹. [英] "Package" folder is not present in the Solution explorer.

查看:105
本文介绍了“包装"解决方案资源管理器中不存在该文件夹.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与一个同事构建一个SharePoint托管的加载项.我已经完成了项目的一部分.我已将项目签到Visual Studio Team Services.现在,当我的同事连接到VSTS时,他便下载了最新版本的 项目.在源代码管理资源管理器中,所有文件和文件夹都存在.所以太好了.然而,当打开.sln文件时,"Package"被打包.解决方案资源管理器中不存在源代码管理资源管理器中存在的文件夹.缺席的 包装"的解决方案中的文件夹破坏了项目.为什么会这样呢?该如何解决?我尝试创建新的工作区并重新下载最新版本,但这不能解决问题. 

I'm building a SharePoint-Hosted add-in with a colleague. I've finished my portion of the project. I've checked-in the project to Visual Studio Team Services. Now, when my colleague connects to VSTS, he then downloads the latest version of the project. In the Source Control Explorer all files and folders are present. So for so good. However, when the .sln file is opened, the "Package" folder that is present in the Source Control Explorer is NOT present in the Solution Explorer. The absence of the "Package" folder in the solution is breaking project. Why is the happening? What can be done to fix it? I've tried creating a new workspace and re-downloading the latest version, but that does not fix the issue. 

推荐答案

嗨Jsquared,

Hi Jsquared,

原因是Package文件夹不包含在项目中,而是已经存在于本地磁盘(c:\ users \ ... \ QAQPSNews)中,您可以检查项目文件(例如.csproj),认为有人做错了,他只是检查了包裹的变化 (例如添加),但不签入项目文件的更改. (将文件夹或文件添加到项目时,项目文件将被修改)

The reason is that the Package folder isn’t included in the project but already existing in your local disk (c:\users\...\QAQPSNews), you can check the project file (e.g. .csproj), I think someone made a mistake, he just checks in the changes of Package (e.g. add), but doesn’t check in the changes of project file. (the project file will be modified when add folder or file to project)

  1. 在记事本中打开项目文件
  2. 检查ItemGroup中的相关代码,类似于以下代码:   

<ItemGoup> 
...
<Content Include="Package\XXX">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
...
  </ItemGroup>

<ItemGroup>
    <Folder Include="Package\" />
</ItemGroup>


因此,您可以将Package添加到项目中并签入更改.


So, you could add Package to project and check in changes.

致谢

Starain


这篇关于“包装"解决方案资源管理器中不存在该文件夹.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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