Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

VS 15.8: New project from template results in empty solution #15682

Closed
arpadbarta opened this issue Aug 16, 2018 · 12 comments
Closed

VS 15.8: New project from template results in empty solution #15682

arpadbarta opened this issue Aug 16, 2018 · 12 comments
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@arpadbarta
Copy link

After upgrading VS to 15.8 and .Net Core to 2.1.400 newly created project with the Blazor template results in empty solutions. Trying to add generated projects fails with incomplete project files.

Changing the .Net Core version in global.json to 2.1.400 solves the problem and generated projects can be added.

@MarkStega
Copy link

Confirming the same behavior on my system

@danroth27
Copy link
Member

I'm not able to reproduce this on my machine.

@mlorbetske Any ideas on what could cause this?

@ShadowDancer
Copy link

ShadowDancer commented Aug 16, 2018

@danroth27
If you installed sdk manually it works, if You updated it via visual studio You have 2.1.400 sdk, but not 2.1.300 generated from template. If You try installing sdk then installer only prompts for repair. For some reason projects are kicked out of solution, but I can add them by hand.

@MarkStega
Copy link

MarkStega commented Aug 16, 2018

I can't remember if I deleted the file or if it wasn't generated when I created my working project. Now if I create a new ASP.Net Core project with either Blazor template I get a global.json file in the root of the solution that has

{
  "sdk": {
    "version": "2.1.300"
  }
}

@danroth27 I bet you have the 2.1.300 sdk installed on your system. I do not.

@danroth27
Copy link
Member

@danroth27 I bet you have the 2.1.300 sdk installed on your system. I do not.

Yeah, I have more SDK versions installed than I care to admit 😝. Let me try uninstalling 2.1.300 and see what that does.

@danroth27
Copy link
Member

OK, I'm seeing this issue now with the multi-project templates.

@mlorbetske
Copy link
Contributor

@phenning any ideas?

@danroth27
Copy link
Member

I looked at this with @phenning and it seems to be caused by the global.json file that we drop with the template. It only affects the multi-project templates though.

@phenning
Copy link
Contributor

Note that we do actually create the individual projects, and that manually updating global.json to point to 2.1.400, or deleting it allows the projects to be loaded.

@danroth27
Copy link
Member

At this point I think we should remove the global.json files from our templates. I don't think they are adding any value.

@SteveSandersonMS SteveSandersonMS changed the title New project from template results in empty solution VS 15.8: New project from template results in empty solution Aug 17, 2018
@River39
Copy link

River39 commented Sep 4, 2018

editing the global.json and settings the "version" to "2.1.400" fixed the issue for me.

kant2002 referenced this issue in kant2002/Blazor Sep 4, 2018
I remove only global.json from the template, and leave global.json in the repository root, since it is required for the build.
See #1324
SteveSandersonMS referenced this issue in dotnet/blazor Sep 7, 2018
I remove only global.json from the template, and leave global.json in the repository root, since it is required for the build.
See #1324
@danroth27
Copy link
Member

This should now be fixed by dotnet/blazor#1386

SteveSandersonMS referenced this issue in SteveSandersonMS/BlazorMigration Nov 27, 2018
I remove only global.json from the template, and leave global.json in the repository root, since it is required for the build.
See #1324
@mkArtakMSFT mkArtakMSFT transferred this issue from dotnet/blazor Oct 27, 2019
@mkArtakMSFT mkArtakMSFT added the area-blazor Includes: Blazor, Razor Components label Oct 27, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

8 participants