New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website projects hosted in IIS should not cause restore to fail #3235

Closed
emgarten opened this Issue Jul 28, 2016 · 0 comments

Comments

Projects
None yet
3 participants
@emgarten
Collaborator

emgarten commented Jul 28, 2016

Between 3.3.0 and 3.4.0 NuGet started checking the full path of solution file entries, for websites with http URIs this fails.

Repro solution file:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "ClientTests(27)", "http://localhost:51302", "{58EB0990-1F4C-4F10-ABF3-066AD74BE891}"
EndProject

Results from each version of NuGet
2.8.6 Warning displayed, no failure

D:\tmp\nuget.2.8.6.exe restore
WARNING: Project file C:\Users\juste\Documents\Visual Studio 2015\Projects\websites2\http://localhost:51302 cannot be found.
All packages listed in packages.config are already installed.

3.3.0 No warning, no failure

D:\tmp\nuget.3.3.0.exe restore
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
All packages listed in packages.config are already installed.

3.5.0 failure

D:\tmp\release-3.5.0-beta2\1520\artifacts\NuGet.exe restore -verbosity detailed
NuGet Version: 3.5.0.1520
Restoring NuGet packages for solution D:\tmp\websites\test.sln.
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
System.AggregateException: One or more errors occurred. ---> System.NotSupportedException: The given path's format is not supported.
   at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.Path.GetFullPath(String path)
   at System.Linq.Enumerable.<>c__DisplayClass7_0`3.<CombineSelectors>b__0(TSource x)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at NuGet.CommandLine.RestoreCommand.ProcessSolutionFile(String solutionFileFullPath, PackageRestoreInputs restoreInputs)
   at NuGet.CommandLine.RestoreCommand.GetInputsFromDirectory(String directory, PackageRestoreInputs packageRestoreInputs)
   at NuGet.CommandLine.RestoreCommand.DetermineRestoreInputs()
   at NuGet.CommandLine.RestoreCommand.<ExecuteCommandAsync>d__23.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
---> (Inner Exception #0) System.NotSupportedException: The given path's format is not supported.
   at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.Path.GetFullPath(String path)
   at System.Linq.Enumerable.<>c__DisplayClass7_0`3.<CombineSelectors>b__0(TSource x)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at NuGet.CommandLine.RestoreCommand.ProcessSolutionFile(String solutionFileFullPath, PackageRestoreInputs restoreInputs)
   at NuGet.CommandLine.RestoreCommand.GetInputsFromDirectory(String directory, PackageRestoreInputs packageRestoreInputs)
   at NuGet.CommandLine.RestoreCommand.DetermineRestoreInputs()
   at NuGet.CommandLine.RestoreCommand.<ExecuteCommandAsync>d__23.MoveNext()<---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment