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

nuget configuration is invalid - VS 2015 VSIX (v3.4.3) #2667

Closed
jhngrant opened this issue Apr 27, 2016 · 19 comments
Closed

nuget configuration is invalid - VS 2015 VSIX (v3.4.3) #2667

jhngrant opened this issue Apr 27, 2016 · 19 comments

Comments

@jhngrant
Copy link

No joy after trying most suggested fixes listed here: http://stackoverflow.com/questions/32344232/unable-to-install-any-package-in-visual-studio-2015

Only solution was to fallback to VS 2015 VSIX (v3.4.2)

Seems to occur when a website project is running in IIS rather that IIS Express ?

@rrelyea
Copy link
Contributor

rrelyea commented Apr 27, 2016

Thanks for the report.
Please tell us detailed steps on how we can reproduce the problems?

@jhngrant
Copy link
Author

Are there any error log files I can send you?

@rrelyea
Copy link
Contributor

rrelyea commented Apr 27, 2016

My guess is that you have a nuget.config that is invalid XML, which used to be silently ignored.
In 3.4.0 we changed that to error: #1567

@yishaigalatzer
Copy link

Our fix went in 3.4 and this complaint is about 3.4.2 vs 3.4.3 so I'm guessing something else is going on. Can you share the nuget.config files and error logs?

@jhngrant
Copy link
Author

I've reinstalled 3.4.3.855. I have a number of projects in a VS solution. When I pick 'Manage NuGet Packages...' on a C# class library NuGet opens as expected. When I try the same command on a Website project hosted in IIS I get the 'nuget configuration is invalid' error alert.

In Tools > NuGet Package Manager > Package Manager Console: All the projects with the error don't appear in the 'Default project' dropdown.

There is no entries relating to NuGet in the VS activity log: %APPDATA%\Microsoft\VisualStudio\Version\ActivityLog.xml

Googled the location of the NuGet error log but can't find it. Can anyone suggest its location?

I've attached: %APPDATA%\NuGet\NuGet.Config

NuGet.zip

@emgarten
Copy link
Member

emgarten commented Apr 28, 2016

@jhngrant what type of project are you using, a web site, web application, something else? Is there an msbuild project file for this project?

Does the project contain a project.json file or packages.config file?

@zhili1208
Copy link
Contributor

@emgarten I think this is also #2601, for some reason, website nugetProject initialization fails.

@yishaigalatzer
Copy link

Can you compare to 2.8.x ?

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

On Wed, Apr 27, 2016 at 7:21 PM -0700, "Zhi Li" <notifications@github.commailto:notifications@github.com> wrote:

@emgartenhttps://github.com/emgarten I think this is also #2601#2601, for some reason, website nugetProject initialization fails.

You are receiving this because you commented.
Reply to this email directly or view it on GitHubhttps://github.com//issues/2667#issuecomment-215289143

@jhngrant
Copy link
Author

@emgarten Web site project

@jhngrant
Copy link
Author

@emgarten Attached is the packages.config of a Web site project with the 'nuget configuration is invalid' error:
packages.zip

There is no project.json

To create this type of project File > New > Web Site...

@mm201
Copy link

mm201 commented Apr 28, 2016

I made the issue replicate. I started my project in VS 2012 then later migrated to 2015. The .sln file looks as follows:


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary3", "ClassLibrary3\ClassLibrary3.csproj", "{861BE5F0-9725-4BE1-82A1-6C3AAD478D4B}"
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "testSite", "http://localhost:63775", "{348EB0EA-8C3F-45CB-A248-BBC2616AAFE4}"
    ProjectSection(WebsiteProperties) = preProject
        UseIISExpress = "true"
        TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
        ProjectReferences = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}|ClassLibrary3.dll;"
        Debug.AspNetCompiler.VirtualPath = "/localhost_63775"
        Debug.AspNetCompiler.PhysicalPath = "testSite\"
        Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_63775\"
        Debug.AspNetCompiler.Updateable = "true"
        Debug.AspNetCompiler.ForceOverwrite = "true"
        Debug.AspNetCompiler.FixedNames = "false"
        Debug.AspNetCompiler.Debug = "True"
        Release.AspNetCompiler.VirtualPath = "/localhost_63775"
        Release.AspNetCompiler.PhysicalPath = "testSite\"
        Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_63775\"
        Release.AspNetCompiler.Updateable = "true"
        Release.AspNetCompiler.ForceOverwrite = "true"
        Release.AspNetCompiler.FixedNames = "false"
        Release.AspNetCompiler.Debug = "False"
        SlnRelativePath = "testSite\"
        DefaultWebSiteLanguage = "Visual C#"
    EndProjectSection
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {861BE5F0-9725-4BE1-82A1-6C3AAD478D4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {861BE5F0-9725-4BE1-82A1-6C3AAD478D4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {861BE5F0-9725-4BE1-82A1-6C3AAD478D4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {861BE5F0-9725-4BE1-82A1-6C3AAD478D4B}.Release|Any CPU.Build.0 = Release|Any CPU
        {348EB0EA-8C3F-45CB-A248-BBC2616AAFE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {348EB0EA-8C3F-45CB-A248-BBC2616AAFE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {348EB0EA-8C3F-45CB-A248-BBC2616AAFE4}.Release|Any CPU.ActiveCfg = Debug|Any CPU
        {348EB0EA-8C3F-45CB-A248-BBC2616AAFE4}.Release|Any CPU.Build.0 = Debug|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal

If I change the second Project line to read, Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "testSite", "testSite\", "{348EB0EA-8C3F-45CB-A248-BBC2616AAFE4}", the problem goes away. Note that sln files generated by VS2015 look like this.

Downgrading to 3.4.2 also solves the issue for me.

@rrelyea
Copy link
Contributor

rrelyea commented Apr 28, 2016

Can you please try:

  1. download not yet final version 3.4.4. of the vsix:
    https://www.myget.org/F/nuget-vsix/vsix/NuGet.0d421874-a3b2-4f67-b53a-ecfce878063b-3.4.4.870.vsix

  2. close VS 2015.

  3. double click the new vsix to install.

  4. launch VS.

  5. try out your project.

  6. tell us how it went

@jhngrant
Copy link
Author

@rrelyea 3.4.4 has fixed the 'nuget configuration is invalid' issue on the web site projects. Also OK on other projects types I work on.

@ardentra
Copy link

@rrelyea we just ran into this same issue for our website projects. Installing this new vsix fixed the issue for usas well.

@yishaigalatzer
Copy link

@emgarten please close with the commit hash and assign to @zhili1208 for validation

@emgarten
Copy link
Member

@emgarten emgarten assigned zhili1208 and unassigned emgarten Apr 29, 2016
@zhili1208
Copy link
Contributor

Tested the fix, works well

@stevanusw
Copy link

cheers guys!

@ventoshe
Copy link

ventoshe commented May 7, 2016

3.4.4 has also fixed the 'nuget configuration is invalid' issue on my web projects. Thanks!

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

No branches or pull requests

9 participants