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

Visual Studio shows NU1105 error even though build and tests pass #4183

Closed
natemcmaster opened this issue Nov 21, 2018 · 18 comments
Closed

Visual Studio shows NU1105 error even though build and tests pass #4183

natemcmaster opened this issue Nov 21, 2018 · 18 comments
Assignees
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Comments

@natemcmaster
Copy link
Contributor

Currently, opening the solution files in this repo, like src/Servers/Kestrel.sln, shows a bunch of NU1105 errors in the Error List window. The error looks like this:

Error NU1105 Unable to find project information for "ProjectXYZ.csproj". Inside Visual Studio, this may be because the project is unloaded or not part of current solution.

We believe this is the result of NuGet/Home#5820. There is a draft of a solution in PR in NuGet, but if that doesn't make it in in a reasonable amount of time, we may need to find workarounds.

FWIW - this does not affect command line builds, and also, it appears you can still build and run tests in Visual Studio despite the error.

cc @jainaashish @rrelyea

@natemcmaster natemcmaster added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Nov 21, 2018
@Eilon Eilon self-assigned this Dec 8, 2018
@natemcmaster
Copy link
Contributor Author

Build triage: we are going to workaround this by adding projects to our .sln files. Whenever we get NU1105, the solution should be edited to add the missing project.

@natemcmaster
Copy link
Contributor Author

@JamesNK @JunTaoLuo can you take care of doing this for the solutions that your respective teams work on? Some of this is already done in release/2.2. If you find other places this needs to happen, feel free to edit the .sln and make a PR.

@MarkDixonTech
Copy link
Contributor

I am getting a series of NU1602 errors when opening in Visual Studio. Is this releated?

@natemcmaster
Copy link
Contributor Author

@MarkDixonTech which solution are you opening?

@MarkDixonTech
Copy link
Contributor

@natemcmaster

src\Mvc\mvc.sln
I followed the instructions here:
https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md

@natemcmaster
Copy link
Contributor Author

I'm not aware of any issues with NU1602 in Mvc.sln. It's likely unrelated. @mkArtakMSFT @NTaylorMullen have you seen this before?

@MarkDixonTech
Copy link
Contributor

@JamesNK
Copy link
Member

JamesNK commented Dec 18, 2018

I see this in the release/2.2 branch.

19>C:\Development\Source\AspNetCore\src\Mvc\src\Microsoft.AspNetCore.Mvc.Razor\Microsoft.AspNetCore.Mvc.Razor.csproj : error NU1602: Microsoft.AspNetCore.Mvc.ViewFeatures does not provide an inclusive lower bound for dependency Microsoft.Extensions.WebEncoders. An approximate best match of Microsoft.Extensions.WebEncoders 1.0.0 was resolved.

ViewFeatures.csproj references WebEncoders with <PackageReference Include="Microsoft.Extensions.WebEncoders" Version="$(MicrosoftExtensionsWebEncodersPackageVersion)" /> but MicrosoftExtensionsWebEncodersPackageVersion does not exist in dependencies.props.

@JamesNK
Copy link
Member

JamesNK commented Dec 18, 2018

MicrosoftAspNetCoreChunkingCookieManagerSourcesPackageVersion is also missing. I'll create a PR to add them to 2.2.

@JunTaoLuo
Copy link
Contributor

Oops that's my fault. It was removed in #4618. That package was removed in favour of code under Shared/.

@JamesNK
Copy link
Member

JamesNK commented Dec 18, 2018

Is re-adding them the correct fix for 2.2? #5714

Or should the package be removed in 2.2 and the shared source be referenced instead?

@JunTaoLuo
Copy link
Contributor

Second option. Remove the package and reference the shared source.

@JamesNK
Copy link
Member

JamesNK commented Dec 18, 2018

I've changed the cookie manager to reference shared source, and added the missing webencoders dependency.

Edit: Should WebEncoders also reference shared source?

@JamesNK
Copy link
Member

JamesNK commented Dec 18, 2018

@MarkDixonTech I've merged a fix. Can you try getting the latest code from release/2.2 and seeing whether it builds?

@natemcmaster
Copy link
Contributor Author

Should WebEncoders also reference shared source?

I don't think so. Microsoft.Extensions.WebEncoders is not the same as the code in src/Shared/WebEncoders.

@Eilon
Copy link
Member

Eilon commented Dec 19, 2018

Per @natemcmaster we think this should be taken care of wherever it matters.

Info on how to work around it here: https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md#known-issue-nu1105

@Eilon Eilon closed this as completed Dec 19, 2018
@MarkDixonTech
Copy link
Contributor

@MarkDixonTech I've merged a fix. Can you try getting the latest code from release/2.2 and seeing whether it builds?

Yes. All good for me now, thanks!

@MarkDixonTech
Copy link
Contributor

There was also a problem running startvs.cmd when space exists in user name. Pull request here

#5963

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

No branches or pull requests

5 participants