Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 自定义NuGet软件包安装输出窗口消息_C#_.net_Visual Studio 2012_Nuget_Nuget Spec - Fatal编程技术网

C# 自定义NuGet软件包安装输出窗口消息

C# 自定义NuGet软件包安装输出窗口消息,c#,.net,visual-studio-2012,nuget,nuget-spec,C#,.net,Visual Studio 2012,Nuget,Nuget Spec,当我安装自定义NuGet软件包时,它可以工作,但是VS中的输出窗口显示消息,好像它尝试添加了两次文件,但这些文件已经存在。这篇文章的产出进一步下降 我在这里的一个服务器上有一个NuGet私有存储库,它负责托管我们的图库。安装和卸载正在工作,即使输出窗口显示以下消息。我对spec文件中的标记很好奇,如果有其他方法,我需要这样做。基于文档,我尝试了多种方法。我的版本是从NuGet站点安装的最新版本 从以下站点:始终可以从以下站点获得最新版本的nuget.exe命令行工具:http://nuget.o

当我安装自定义NuGet软件包时,它可以工作,但是VS中的输出窗口显示消息,好像它尝试添加了两次文件,但这些文件已经存在。这篇文章的产出进一步下降

我在这里的一个服务器上有一个NuGet私有存储库,它负责托管我们的图库。安装和卸载正在工作,即使输出窗口显示以下消息。我对spec文件中的
标记很好奇,如果有其他方法,我需要这样做。基于文档,我尝试了多种方法。我的版本是从NuGet站点安装的最新版本

从以下站点:
始终可以从以下站点获得最新版本的nuget.exe命令行工具:http://nuget.org/nuget.exe

输出窗口在安装包CustomNuGet上显示如下内容:

项目/Plugins/CustomNuGet/CSS/custom.CSS已经存在

项目/Plugins/CustomNuGet/Scripts/custom.js已经存在

项目/Plugins/CustomNuGet/Views/custom.cshtml已经存在

“输出”窗口在卸载包CustomNuGet上显示如下内容:

在您的工作区中找不到项/Plugins/CustomNuGet/CSS/custom.CSS

在工作区中找不到项/Plugins/CustomNuGet/Scripts/custom.js

在工作区中找不到项/Plugins/CustomNuGet/Views/custom.cshtml

我已经使用命令行工具创建了一个自定义Nuget包。文件夹如下所示:

/CustomNuGet
    CustomNuGet.nuspec
    CustomNuGet.0.1.1.nupkg
    /content
        /lib
            CustomNuGet.dll
        /Plugins
            /Views
                custom.cshtml
            /Scripts
                custom.js
            /CSS
                custom.css
spec文件是根据文档使用根CustomeNuGet文件夹中的:
nuget spec
和包
nuget pack
创建的。以下是规范文件:

    <?xml version="1.0"?>
    <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
    <metadata>
        <id>CustomNuGet</id>
        <version>0.1.1</version>
        <authors>CustomNuGet</authors>
        <owners>CustomNuGet</owners>
        <requireLicenseAcceptance>false</requireLicenseAcceptance>
        <description>CustomNuGet</description>
        <tags>CustomNuGet</tags>
        <references>
            <reference file="CustomNuGet.dll" />
        </references>
        <dependencies>
            <dependency id="WebActivatorEx" version="2.0.0" />
        </dependencies>
    </metadata>
    <files>
        <file src="content\lib\CustomNuGet.dll" target="lib"/>
        <file src="content\Plugins\**" target="content\Plugins" />
    </files>
    </package>

顾客
0.1.1
顾客
顾客
假的
顾客
顾客

我没有看到任何关于这个问题的帖子,所以希望其他人也有过这种情况,这只是我错过了一个设置。

如果您手动删除.dll引用,而不是使用卸载包通过控制台将其删除,则可能会发生这种情况。检查packages.config文件,您尝试安装的软件包可能仍然列在那里。您必须将其从配置文件中删除并保存更改。完成此操作后,请再次尝试安装软件包,该软件包应能正常工作。

您的解决方案已链接到TFS源代码管理是?是。我们的回购协议在TFS上。您是否尝试打开在pack上生成的.nupkg文件?它只是一个zip文件,所以像7-zip这样的程序将打开它(您也可以使用类似的工具)。无论哪种方式,您都可以浏览软件包,查看所有内容的布局,是否包含两次文件,或者其他任何内容看起来有问题。是的。软件包的结构显示正确。谢谢。请尝试将此软件包安装到不在TFS下的全新项目中-因此您可以在此处消除或确认TFS因素。