为什么 [Insert Nuget Package Here] 不提取 dll
why Is [Insert Nuget Package Here] not extracting dlls
所以我接受在缓存或其他方面发生了一些奇怪的事情。显然清空了缓存,删除了包文件夹并重新获取了包。
https://www.nuget.org/packages/Google.ProtocolBuffers/
重命名了 nupkg zip,查看并找到了 dll。它们只是没有被提取——也就是说 nuspec 中的文件夹结构看起来是错误的。但是很难相信只有我有这个问题。
我以前从未有过这种行为,并且已经沉迷了大约 2 个小时。所以希望有人能指出真正明显的地方并解释为什么我过去使用的一个包突然变得不正常了。
编辑以获取更多信息:
我在 vs2015 企业版中使用 4.6.1 控制台项目进行了复制(只是标准的 .net,不是 dnx 或任何时髦的东西)。
刚试过 4.5.2,我遇到了同样的问题。没有引用被添加到项目中的任何 dll。此外,在 packages 文件夹中没有 dll - xml 文件使它结束。但是,如果我进入 nupkg,重命名为 .zip 并打开,我可以在它们应该位于的位置看到 dll。我也 运行 与管理员一般 - 软件包安装也从命令行失败(并不是我期望的任何不同)
额外编辑:
其他 nuget 包也在工作。我正在推进其他也很重的领域。就是这个包给我带来了问题。
控制台登录安装包
Attempting to gather dependency information for package 'Google.ProtocolBuffers.2.4.1.555' with respect to project 'ConsoleApplication1', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'Google.ProtocolBuffers.2.4.1.555' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Google.ProtocolBuffers.2.4.1.555'
Resolved actions to install package 'Google.ProtocolBuffers.2.4.1.555'
Adding package 'Google.ProtocolBuffers.2.4.1.555' to folder 'M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages'
Added package 'Google.ProtocolBuffers.2.4.1.555' to folder 'M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages'
Added package 'Google.ProtocolBuffers.2.4.1.555' to 'packages.config'
Successfully installed 'Google.ProtocolBuffers 2.4.1.555' to ConsoleApplication1
========== Finished ==========
文件夹结构(为了完整性而删节)
> dir /s
Volume in drive M is steam
Volume Serial Number is 747C-43B4
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 <DIR> Google.ProtocolBuffers.2.4.1.555
0 File(s) 0 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 2,731,847 Google.ProtocolBuffers.2.4.1.555.nupkg
16/04/2016 15:04 <DIR> lib
16/04/2016 15:04 <DIR> tools
1 File(s) 2,731,847 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\lib
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 <DIR> cf20
16/04/2016 15:04 <DIR> cf35
16/04/2016 15:04 <DIR> net20
16/04/2016 15:04 <DIR> net35
16/04/2016 15:04 <DIR> net40
16/04/2016 15:04 <DIR> portable-net40+sl4+sl5+wp7+wp8+win8
16/04/2016 15:04 <DIR> sl20
16/04/2016 15:04 <DIR> sl30
16/04/2016 15:04 <DIR> sl40
0 File(s) 0 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\lib\cf20
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 71,034 Google.ProtocolBuffers.Serialization.xml
19/10/2015 20:39 282,553 Google.ProtocolBuffers.xml
2 File(s) 353,587 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\lib\cf35
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 71,034 Google.ProtocolBuffers.Serialization.xml
19/10/2015 20:39 282,553 Google.ProtocolBuffers.xml
2 File(s) 353,587 bytes
...
<snip>
...
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 6,779 CHANGES.txt
16/04/2016 15:04 <DIR> google
19/10/2015 20:39 1,672 license.txt
19/10/2015 20:39 1,857 protoc-license.txt
16/04/2016 15:04 <DIR> tutorial
3 File(s) 10,308 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools\google
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 <DIR> protobuf
0 File(s) 0 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools\google\protobuf
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 <DIR> compiler
19/10/2015 20:39 4,301 csharp_options.proto
19/10/2015 20:39 21,880 descriptor.proto
2 File(s) 26,181 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools\google\protobuf\compiler
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 7,736 plugin.proto
1 File(s) 7,736 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools\tutorial
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 754 addressbook.proto
1 File(s) 754 bytes
Total Files Listed:
26 File(s) 5,960,765 bytes
50 Dir(s) 26,398,302,208 bytes free
结果我做了两件事
1) 转到 %userprofile%\.nuget
并删除 packages 文件夹(但请记住,我已经这样做了,而不是单独修复它)。我注意到这里的版本反映了我遇到的问题 - 而且因为我之前删除了这个我知道仅仅删除这个文件夹是不够的。
2) 在管理员模式下与开发命令提示符“devenv /resetuserdata
”
新解决方案 4.5.2,控制台并首次运行。
这是什么原因造成的?
不是最雾。
顺便说一句,安装包的控制台输出现在是:
Attempting to gather dependency information for package 'Google.ProtocolBuffers.2.4.1.555' with respect to project 'ConsoleApplication2', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'Google.ProtocolBuffers.2.4.1.555' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Google.ProtocolBuffers.2.4.1.555'
Resolved actions to install package 'Google.ProtocolBuffers.2.4.1.555'
GET https://api.nuget.org/packages/google.protocolbuffers.2.4.1.555.nupkg
OK https://api.nuget.org/packages/google.protocolbuffers.2.4.1.555.nupkg 14ms
Installing Google.ProtocolBuffers 2.4.1.555.
Adding package 'Google.ProtocolBuffers.2.4.1.555' to folder 'c:\users\john\documents\visual studio 2015\Projects\ConsoleApplication2\packages'
Added package 'Google.ProtocolBuffers.2.4.1.555' to folder 'c:\users\john\documents\visual studio 2015\Projects\ConsoleApplication2\packages'
Added package 'Google.ProtocolBuffers.2.4.1.555' to 'packages.config'
Successfully installed 'Google.ProtocolBuffers 2.4.1.555' to ConsoleApplication2
========== Finished ==========
所以我接受在缓存或其他方面发生了一些奇怪的事情。显然清空了缓存,删除了包文件夹并重新获取了包。
https://www.nuget.org/packages/Google.ProtocolBuffers/
重命名了 nupkg zip,查看并找到了 dll。它们只是没有被提取——也就是说 nuspec 中的文件夹结构看起来是错误的。但是很难相信只有我有这个问题。
我以前从未有过这种行为,并且已经沉迷了大约 2 个小时。所以希望有人能指出真正明显的地方并解释为什么我过去使用的一个包突然变得不正常了。
编辑以获取更多信息: 我在 vs2015 企业版中使用 4.6.1 控制台项目进行了复制(只是标准的 .net,不是 dnx 或任何时髦的东西)。 刚试过 4.5.2,我遇到了同样的问题。没有引用被添加到项目中的任何 dll。此外,在 packages 文件夹中没有 dll - xml 文件使它结束。但是,如果我进入 nupkg,重命名为 .zip 并打开,我可以在它们应该位于的位置看到 dll。我也 运行 与管理员一般 - 软件包安装也从命令行失败(并不是我期望的任何不同)
额外编辑: 其他 nuget 包也在工作。我正在推进其他也很重的领域。就是这个包给我带来了问题。
控制台登录安装包
Attempting to gather dependency information for package 'Google.ProtocolBuffers.2.4.1.555' with respect to project 'ConsoleApplication1', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'Google.ProtocolBuffers.2.4.1.555' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Google.ProtocolBuffers.2.4.1.555'
Resolved actions to install package 'Google.ProtocolBuffers.2.4.1.555'
Adding package 'Google.ProtocolBuffers.2.4.1.555' to folder 'M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages'
Added package 'Google.ProtocolBuffers.2.4.1.555' to folder 'M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages'
Added package 'Google.ProtocolBuffers.2.4.1.555' to 'packages.config'
Successfully installed 'Google.ProtocolBuffers 2.4.1.555' to ConsoleApplication1
========== Finished ==========
文件夹结构(为了完整性而删节)
> dir /s
Volume in drive M is steam
Volume Serial Number is 747C-43B4
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 <DIR> Google.ProtocolBuffers.2.4.1.555
0 File(s) 0 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 2,731,847 Google.ProtocolBuffers.2.4.1.555.nupkg
16/04/2016 15:04 <DIR> lib
16/04/2016 15:04 <DIR> tools
1 File(s) 2,731,847 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\lib
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 <DIR> cf20
16/04/2016 15:04 <DIR> cf35
16/04/2016 15:04 <DIR> net20
16/04/2016 15:04 <DIR> net35
16/04/2016 15:04 <DIR> net40
16/04/2016 15:04 <DIR> portable-net40+sl4+sl5+wp7+wp8+win8
16/04/2016 15:04 <DIR> sl20
16/04/2016 15:04 <DIR> sl30
16/04/2016 15:04 <DIR> sl40
0 File(s) 0 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\lib\cf20
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 71,034 Google.ProtocolBuffers.Serialization.xml
19/10/2015 20:39 282,553 Google.ProtocolBuffers.xml
2 File(s) 353,587 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\lib\cf35
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 71,034 Google.ProtocolBuffers.Serialization.xml
19/10/2015 20:39 282,553 Google.ProtocolBuffers.xml
2 File(s) 353,587 bytes
...
<snip>
...
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 6,779 CHANGES.txt
16/04/2016 15:04 <DIR> google
19/10/2015 20:39 1,672 license.txt
19/10/2015 20:39 1,857 protoc-license.txt
16/04/2016 15:04 <DIR> tutorial
3 File(s) 10,308 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools\google
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 <DIR> protobuf
0 File(s) 0 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools\google\protobuf
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
16/04/2016 15:04 <DIR> compiler
19/10/2015 20:39 4,301 csharp_options.proto
19/10/2015 20:39 21,880 descriptor.proto
2 File(s) 26,181 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools\google\protobuf\compiler
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 7,736 plugin.proto
1 File(s) 7,736 bytes
Directory of M:\programming\general\git\akka-cluster-homebrew\ConsoleApplication1\packages\Google.ProtocolBuffers.2.4.1.555\tools\tutorial
16/04/2016 15:04 <DIR> .
16/04/2016 15:04 <DIR> ..
19/10/2015 20:39 754 addressbook.proto
1 File(s) 754 bytes
Total Files Listed:
26 File(s) 5,960,765 bytes
50 Dir(s) 26,398,302,208 bytes free
结果我做了两件事
1) 转到 %userprofile%\.nuget
并删除 packages 文件夹(但请记住,我已经这样做了,而不是单独修复它)。我注意到这里的版本反映了我遇到的问题 - 而且因为我之前删除了这个我知道仅仅删除这个文件夹是不够的。
2) 在管理员模式下与开发命令提示符“devenv /resetuserdata
”
新解决方案 4.5.2,控制台并首次运行。
这是什么原因造成的? 不是最雾。
顺便说一句,安装包的控制台输出现在是:
Attempting to gather dependency information for package 'Google.ProtocolBuffers.2.4.1.555' with respect to project 'ConsoleApplication2', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'Google.ProtocolBuffers.2.4.1.555' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Google.ProtocolBuffers.2.4.1.555'
Resolved actions to install package 'Google.ProtocolBuffers.2.4.1.555'
GET https://api.nuget.org/packages/google.protocolbuffers.2.4.1.555.nupkg
OK https://api.nuget.org/packages/google.protocolbuffers.2.4.1.555.nupkg 14ms
Installing Google.ProtocolBuffers 2.4.1.555.
Adding package 'Google.ProtocolBuffers.2.4.1.555' to folder 'c:\users\john\documents\visual studio 2015\Projects\ConsoleApplication2\packages'
Added package 'Google.ProtocolBuffers.2.4.1.555' to folder 'c:\users\john\documents\visual studio 2015\Projects\ConsoleApplication2\packages'
Added package 'Google.ProtocolBuffers.2.4.1.555' to 'packages.config'
Successfully installed 'Google.ProtocolBuffers 2.4.1.555' to ConsoleApplication2
========== Finished ==========