我已经创建了一个用于在 C#(控制台应用程序)中测试 Web 应用程序的框架所有的包都由 Nuget 包管理器管理。当我尝试通过 nuget安装/卸载软件包时,我遇到了异常(粘贴在最后)。
工具/配置
- 视觉工作室 - 社区 2013
- .NET 框架 - 4.5.2 硒
- 网络驱动程序 - 3.141.0
- MSBuild.NUnit 版本="1.0.2"
- NUnit 版本="3.12.0"
- NUnit3TestAdapter 版本="3.15.1" NU
- NUnitTestAdapter 版本="2.2.0"
让我知道是否有人需要任何其他详细信息。我查看了与 Nuget 相关的线程,但没有找到任何有用的线程来提供一些想法或解决方案。
如果您需要任何其他信息,请告诉我|| 请提出一些想法/解决方案 例外
PM> '5.0.0+42a8779499c1d1ed2488c2e6b9e2ee6ff6107766' is not a valid version string.
Parameter name: version
At line:1 char:50
+ '5.0.0+42a8779499c1d1ed2488c2e6b9e2ee6ff6107766' is not a valid versi ...
+ ~~
Unexpected token 'is' in expression or statement.
PM>
PM> Install-Package NuGet.Frameworks -Version 4.7.0
Install-Package : '5.0.0+42a8779499c1d1ed2488c2e6b9e2ee6ff6107766' is not a valid version string.
Parameter name: version
At line:1 char:1
+ Install-Package NuGet.Frameworks -Version 4.7.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], ArgumentException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackag
eCommand
PM> uninstall-package Microsoft.TestPlatform.TranslationLayer -version 16.6.1
uninstall-package : '5.0.0+42a8779499c1d1ed2488c2e6b9e2ee6ff6107766' is not a valid version string.
Parameter name: version
At line:1 char:1
+ uninstall-package Microsoft.TestPlatform.TranslationLayer -version 16 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Uninstall-Package], ArgumentException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.UninstallPack
ageCommand
PM> nuget update -self
nuget : The term 'nuget' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
At line:1 char:1
+ nuget update -self
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (nuget:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
截图