Skip to content

Components solution does not build due to missing .npmproj #12653

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

Closed
rynowak opened this issue Jul 27, 2019 · 7 comments
Closed

Components solution does not build due to missing .npmproj #12653

rynowak opened this issue Jul 27, 2019 · 7 comments
Assignees
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Comments

@rynowak
Copy link
Member

rynowak commented Jul 27, 2019

This is failing after the recent changes to fix the build of our node-related projects.

image

VS doesn't appear to support adding projects with arbitrary .*proj file extensions (not an option in the UI, and the commandline dotnet sln add rejects it).

If I use my l33t hacker skills to edit the sln by hand then I get errors like:

36>C:\git\aspnet\AspNetCore\src\Components\test\testassets\BasicTestApp\BasicTestApp.csproj : error NU1105: Unable to find project information for 'C:\git\aspnet\AspNetCore\src\Components\Web.JS\Microsoft.AspNetCore.Components.Web.JS.npmproj'. Inside Visual Studio, this may be because the project is unloaded or not part of current solution so please run a restore from command-line. Otherwise the project file may be invalid or missing targets required for restore.
36>Done building project "BasicTestApp.csproj" -- FAILED.

I think we either need to make these project conditional based on VS - or we need to change them to .msbuildproj - which is the file extension for general-purpose msbuild-based projects.

@rynowak rynowak added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jul 27, 2019
rynowak pushed a commit that referenced this issue Jul 27, 2019
Workaround for: #12653

This isn't a great fix for the this problem but it makes it possible to
build the solution. You'll still see errors when you first open the
solution but they will go away when VS does a restore.

We'll continue the discussion separately about the right fix for this.
rynowak pushed a commit that referenced this issue Jul 27, 2019
Workaround for: #12653

This isn't a great fix for the this problem but it makes it possible to
build the solution. You'll still see errors when you first open the
solution but they will go away when VS does a restore.

We'll continue the discussion separately about the right fix for this.
rynowak pushed a commit that referenced this issue Jul 28, 2019
Workaround for: #12653

This isn't a great fix for the this problem but it makes it possible to
build the solution. You'll still see errors when you first open the
solution but they will go away when VS does a restore.

We'll continue the discussion separately about the right fix for this.
rynowak pushed a commit that referenced this issue Jul 28, 2019
Workaround for: #12653

This isn't a great fix for the this problem but it makes it possible to
build the solution. You'll still see errors when you first open the
solution but they will go away when VS does a restore.

We'll continue the discussion separately about the right fix for this.
rynowak pushed a commit that referenced this issue Jul 28, 2019
Workaround for: #12653

This isn't a great fix for the this problem but it makes it possible to
build the solution. You'll still see errors when you first open the
solution but they will go away when VS does a restore.

We'll continue the discussion separately about the right fix for this.
@dougbu
Copy link
Contributor

dougbu commented Aug 15, 2020

Hmm, @Pilchie and @pranavkm our AspNetCore.sln file does not contain any *.npmproj projects nor any *.javaproj projects. In fact there are no matches for "src\\.*[^c][^s]proj" in the solution file at all. Won't that break people who just run .\restore.cmd from the command line and attempt to build many of our filtered solutions❔

@pranavkm
Copy link
Contributor

I don't think sln files can include npmproj files. Projects that depend on the build output of npmproj files manually build them e.g. https://github.com/dotnet/aspnetcore/blob/master/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj#L31-L37

@dougbu
Copy link
Contributor

dougbu commented Sep 24, 2020

@pranavkm should special cases like that work when building in VS❔ Or, are users required to build the *.npmproj projects before building in VS❔

@dougbu
Copy link
Contributor

dougbu commented Oct 21, 2020

/ping @pranavkm

@pranavkm
Copy link
Contributor

We require users to build the project from the command line before launching in VS. We've tried automating the npm reference and that does not work.

@dougbu
Copy link
Contributor

dougbu commented Nov 14, 2020

@captainsafia this issue indicates a gap in the src/Components/README.md file. That file should indicate that executing src/Components/build.cmd before opening Visual Studio is strongly suggested because otherwise the NPM projects will not be up-to-date and the .NET SDK or runtimes may be missing.

@captainsafia
Copy link
Member

@dougbu Done in #27833.

@wtgodbe wtgodbe closed this as completed Dec 3, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 2, 2021
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