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

v3.4.4 - Nuget restore throws "The given path's format is not supported" #3442

Closed
Bidthedog opened this Issue Sep 14, 2016 · 17 comments

Comments

Projects
None yet
5 participants
@Bidthedog

Bidthedog commented Sep 14, 2016

I recently updated to 3.4.4 from 3.3.0 and started getting this error when running "nuget restore" from the SLN folder. I tried a few params, but could not get it working. I've tried all of the following:

nuget restore
nuget restore My.Project.Name.sln
nuget restore "My.Project.Name.sln"
nuget restore My.Project.Name.sln -ConfigFile nuget.config
nuget restore My.Project.Name.sln -MsBuildVersion 14 -NoCache -Verbosity d -ConfigFile nuget.config

etc...

The solution has a "nuget.config" file in the solution root, with a reference to both a private feed and the default nuget feed:

<configuration>
  <config>
    <add key="repositoryPath" value="packages" />
  </config>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="MyFeed" value="http://nuget.mycustomdomain.com/api/v2/" />
  </packageSources>
</configuration>

The verbose error is as follows (same error occurs with any incarnation of parameters):

$ nuget restore My.Project.Name.sln -MsBuildVersion 14 -NoCache -Verbosity d -ConfigFile nuget.config
Restoring NuGet packages for solution D:\git\My.Project.Name\My.Project.Name.sln.
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()<---

It occurs in MINGW64 (bash), command prompt and a powershell prompt.

I have also tried this without the nuget.config file in the solution root - same issue.

Reverting back to 3.3.0 has resolved the issue.

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Sep 14, 2016

I'm suspecting this has to do with the packages entry, we should look into this in 3.5.

yishaigalatzer commented Sep 14, 2016

I'm suspecting this has to do with the packages entry, we should look into this in 3.5.

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Sep 14, 2016

@rrelyea @zhili1208 is this something we already fixed?

yishaigalatzer commented Sep 14, 2016

@rrelyea @zhili1208 is this something we already fixed?

@zhili1208

This comment has been minimized.

Show comment
Hide comment
@vphad

This comment has been minimized.

Show comment
Hide comment
@vphad

vphad Sep 14, 2016

Hi,
Is there any workaround available ?

vphad commented Sep 14, 2016

Hi,
Is there any workaround available ?

@zhili1208

This comment has been minimized.

Show comment
Hide comment
@vphad

This comment has been minimized.

Show comment
Hide comment
@vphad

vphad Sep 14, 2016

I am trying that now, however, I appreciate if you could share the root cause ?

Also, if any workaround available.

vphad commented Sep 14, 2016

I am trying that now, however, I appreciate if you could share the root cause ?

Also, if any workaround available.

@zhili1208

This comment has been minimized.

Show comment
Hide comment
@zhili1208

zhili1208 Sep 14, 2016

Contributor

#3235 here is the issue, website project path in csproj is host URL, NuGet will throw when try to parse it

Contributor

zhili1208 commented Sep 14, 2016

#3235 here is the issue, website project path in csproj is host URL, NuGet will throw when try to parse it

@vphad

This comment has been minimized.

Show comment
Hide comment
@vphad

vphad Sep 14, 2016

This works fine with 3.5.0-rtm-1829 for me.

vphad commented Sep 14, 2016

This works fine with 3.5.0-rtm-1829 for me.

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Sep 14, 2016

@zhili1208 what is the workaround?

yishaigalatzer commented Sep 14, 2016

@zhili1208 what is the workaround?

@zhili1208

This comment has been minimized.

Show comment
Hide comment
@zhili1208

zhili1208 Sep 14, 2016

Contributor

removing website Project from solution should make it work

Contributor

zhili1208 commented Sep 14, 2016

removing website Project from solution should make it work

@Bidthedog

This comment has been minimized.

Show comment
Hide comment
@Bidthedog

Bidthedog Sep 15, 2016

Ah yes, we have a website project in most of our solutions. I'll try the beta today.

Bidthedog commented Sep 15, 2016

Ah yes, we have a website project in most of our solutions. I'll try the beta today.

@Bidthedog

This comment has been minimized.

Show comment
Hide comment
@Bidthedog

Bidthedog Sep 15, 2016

I tried this with NuGet Version: 3.5.0.1737 (the one on the downloads page - https://dist.nuget.org/index.html) and it's still happening. How do I get a later build than that?

Bidthedog commented Sep 15, 2016

I tried this with NuGet Version: 3.5.0.1737 (the one on the downloads page - https://dist.nuget.org/index.html) and it's still happening. How do I get a later build than that?

@Bidthedog

This comment has been minimized.

Show comment
Hide comment
@Bidthedog

Bidthedog Sep 15, 2016

Found NuGet Version: 3.6.0.1842 in the "nightly builds", and that seems to work. Can't find 3.5-rtm-1829 anywhere though.

Bidthedog commented Sep 15, 2016

Found NuGet Version: 3.6.0.1842 in the "nightly builds", and that seems to work. Can't find 3.5-rtm-1829 anywhere though.

@Bidthedog

This comment has been minimized.

Show comment
Hide comment
@Bidthedog

Bidthedog commented Sep 16, 2016

Thanks @zhili1208 :)

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Sep 21, 2016

Contributor

Closing as it appears everybody agrees that the 3.5.0-rtm-1829 build has fixed it.

Contributor

rrelyea commented Sep 21, 2016

Closing as it appears everybody agrees that the 3.5.0-rtm-1829 build has fixed it.

@rrelyea rrelyea closed this Sep 21, 2016

@Bidthedog

This comment has been minimized.

Show comment
Hide comment
@Bidthedog

Bidthedog Sep 21, 2016

Yep, 3.5.0-rtm-1829 fixed my problem too

Bidthedog commented Sep 21, 2016

Yep, 3.5.0-rtm-1829 fixed my problem too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment