我尝试为用c#编写的解决方案制作一个Nuget程序包,这个程序在该解决方案上也有很多项目。
我正在运行此脚本
.\nuget.exe pack PrincipalSolution.csproj -IncludeReferencedProjects -Build -Force -Properties "Configuration=Debug;Platform=x64" -Verbosity "detailed"
但是我在Package Manager控制台上遇到此错误
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.EnumerateFiles(String path, String searchPattern, SearchOption searchOption)
at NuGet.CommandLine.ProjectFactory.GetFiles(String path, ISet`1 fileNames, SearchOption searchOption)
at NuGet.CommandLine.ProjectFactory.AddOutputFiles(PackageBuilder builder)
at NuGet.CommandLine.ProjectFactory.RecursivelyApply(Action`1 action, Object alreadyAppliedProjects)
at NuGet.CommandLine.ProjectFactory.RecursivelyApply(Action`1 action, Object alreadyAppliedProjects)
at NuGet.CommandLine.ProjectFactory.RecursivelyApply(Action`1 action)
at NuGet.CommandLine.ProjectFactory.CreateBuilder(String basePath, NuGetVersion version, String suffix, Boolean buildIfNeeded, PackageBuilder builder)
at NuGet.Commands.PackCommandRunner.BuildFromProjectFile(String path)
at NuGet.Commands.PackCommandRunner.BuildPackage()
at NuGet.CommandLine.PackCommand.ExecuteCommand()
at NuGet.CommandLine.Command.ExecuteCommandAsync()
at NuGet.CommandLine.Command.Execute()
at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
我的项目没有任何损坏的引用,我还应该验证或汇总其他任何内容吗?
谢谢