Skip to content
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

Create Web Site project, open NuGet UI, meet error. #2601

Closed
v-lawu opened this issue Apr 18, 2016 · 17 comments
Closed

Create Web Site project, open NuGet UI, meet error. #2601

v-lawu opened this issue Apr 18, 2016 · 17 comments
Assignees
Labels
Milestone

Comments

@v-lawu
Copy link

v-lawu commented Apr 18, 2016

NuGet 840

Repro steps:
1.Create empty Web Site project.
2.Right click the project node and select Manager NuGet Packages...

Expected: Can open NuGet UI.
Actually: Meet error.
capture

@rrelyea
Copy link
Contributor

rrelyea commented Apr 19, 2016

What version of VS & NuGet are you using?
If you aren't using 3.4.2, please try that one and let us know what happens.

@rrelyea rrelyea added this to the 3.4.3 milestone Apr 19, 2016
@rohit21agrawal
Copy link
Contributor

@rrelyea @yishaigalatzer @v-lawu
Does not repro for me with Nuget 3.4.3 build 840 on Dev15.
Nor does it repro on Visual Studio 2015.

@rrelyea rrelyea assigned zhili1208 and unassigned rohit21agrawal Apr 20, 2016
@rrelyea
Copy link
Contributor

rrelyea commented Apr 20, 2016

@zhili1208 investigated. Seems like VS2015 Update 2 w/ NuGet 3.3 or NuGet 3.4.3 -- there are errors. They differ, but the problem is the same. As such, we'll move out of the 3.4.3 milestone and consider the scenario in triage.

@rrelyea rrelyea removed the Type:Bug label Apr 20, 2016
@rrelyea rrelyea removed this from the 3.4.3 milestone Apr 20, 2016
@zhili1208
Copy link
Contributor

@rrelyea I just found 3.3 works for this scenario, the error of 3.3 is from my machine proxy setting, this is an regression, I fixed this and will send a pr soon

@zhili1208 zhili1208 self-assigned this Apr 20, 2016
zhili1208 added a commit to NuGet/NuGet.Client that referenced this issue Apr 20, 2016
@yishaigalatzer
Copy link

Can you explain the exact scenario? The fix is about project.json so it's hard for me to tell how it is related to a web site project that typically used web.config

Sent from Outlook Mobilehttps://aka.ms/xp9y6l

On Wed, Apr 20, 2016 at 2:00 PM -0700, "Zhi Li" <notifications@github.commailto:notifications@github.com> wrote:

@rrelyeahttps://github.com/rrelyea I just found 3.3 works for this scenario, the error of 3.3 is from my machine proxy setting, this is an regression, I fixed this and will send a pr soon

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/2601#issuecomment-212604177

@zhili1208
Copy link
Contributor

@yishaigalatzer web site project don't use project.json, but nuget search project.ProjectName.json or project.json for every project, nuget try to get project name from msbuild file, but for web site, there is no such file, so the project name will be empty string, then when we search project.ProjectName.json, it will throw Exception from Project Name emptyOrNull check

@rrelyea rrelyea added this to the 3.4.3 milestone Apr 20, 2016
zhili1208 added a commit to NuGet/NuGet.Client that referenced this issue Apr 21, 2016
@joelverhagen
Copy link
Member

I followed the repro steps on 840/dev15preview and did not see the problem. To verify this fix I'd want to see the problem first.

@joelverhagen
Copy link
Member

Thanks @rohit21agrawal -- I was doing the repro wrong!

@MosheL
Copy link

MosheL commented May 13, 2016

Installed.

Fixed the main problem, but added a new one .

Ttry to open NuGet Package manager - works, but not for one of my projects and VS crashed.
Tried the Console way and I am getting this, in any Web Project I am trying:


PM> Install-Package Microsoft.AspNet.Mvc -Version 5.2.3
Attempting to gather dependency information for package 'Microsoft.AspNet.Mvc.5.2.3' with respect to project 'http://matimim.home.a7.org/', targeting '.NETFramework,Version=v4.6.1'
Attempting to resolve dependencies for package 'Microsoft.AspNet.Mvc.5.2.3' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Microsoft.AspNet.Mvc.5.2.3'
Resolved actions to install package 'Microsoft.AspNet.Mvc.5.2.3'
Adding package 'Microsoft.AspNet.Razor.3.2.3' to folder 'E:\המסמכים שלי\Visual Studio 2015\Projects\matimim.home.a7.org\packages'
Added package 'Microsoft.AspNet.Razor.3.2.3' to folder 'E:\המסמכים שלי\Visual Studio 2015\Projects\matimim.home.a7.org\packages'
Install failed. Rolling back...
Package 'Microsoft.AspNet.Razor.3.2.3' does not exist in project 'http://matimim.home.a7.org/'
Removing package 'Microsoft.AspNet.Razor.3.2.3' from folder 'E:\המסמכים שלי\Visual Studio 2015\Projects\matimim.home.a7.org\packages'
Removed package 'Microsoft.AspNet.Razor.3.2.3' from folder 'E:\המסמכים שלי\Visual Studio 2015\Projects\matimim.home.a7.org\packages'
Install-Package : An error occurred while writing file 'e:\inetpub\matimim\packages.config': Failed to write packages.config as XML fil
e 'e:\inetpub\matimim\packages.config'. Error: 'Illegal characters in path.'.
At line:1 char:1
+ Install-Package Microsoft.AspNet.Mvc -Version 5.2.3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

PM> 

@yishaigalatzer
Copy link

תודה על העדכון :)

@zhili1208
Copy link
Contributor

zhili1208 commented May 13, 2016

tried on my machine, looks like the path is good on my machine, the issue here is the website project root path is bad for nuget, not sure it's a path encoding issue or something else. so @MosheL what's your project path for the web project? and what's the nuget version? Does it work for any nuget version before? Not sure it's an regression or not.

@emgarten emgarten self-assigned this May 13, 2016
@emgarten emgarten modified the milestones: 3.4.4, 3.4.3 May 13, 2016
@emgarten
Copy link
Member

@MosheL which version of NuGet did this last work with? Are you able to repro this with 3.3.0?

@MosheL
Copy link

MosheL commented May 14, 2016

@zhili1208

  1. web project, c:\inetpub\matimim on this error message
  2. solution is on MyDocs, so in my machine it's have a hebrew name (E:\המסמכים שלי)
  3. Install-Package : An error occurred while writing file 'e:\inetpub\matimim\packages.config': Failed to write packages.config as XML file 'e:\inetpub\matimim\packages.config'. Error: 'Illegal characters in path.'.
    the path is correct, tested via copy/paste to CMD (start e:\....).
  4. Visual studio 2015 u1
    on 3.4.x I have the main problem. I was installed file from github - NuGet.0d421874-a3b2-4f67-b53a-ecfce878063b.3.4.4.870.vsix. this file has the new error message..

Tried to install 3.3, installation failed.
I do not know what the specific version I was used before, but it works on these projects and still working on my other Machine on Web projects with similar configuration (solution in MyDocs, website in IIS folders))

@yishaigalatzer
Copy link

Can you please go to tools and options -> extensions and updates and tell us what version of nuget is installed on your other machine?

Also can you share the packags.config file?

@MosheL
Copy link

MosheL commented May 14, 2016


<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="ImageResizer" version="3.2.4" targetFramework="net40" />
</packages>


for working version I can check on morning.

@yishaigalatzer
Copy link

Thanks

@emgarten
Copy link
Member

@MosheL this sounds like a different issue, I've opened #2798 to track it. please add comments there if you find where this was last working. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants