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

Blazor Hybrid + Web solution template missing project refs in .sln when created via VS Code #22381

Closed
BethMassi opened this issue May 13, 2024 · 11 comments
Assignees
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@BethMassi
Copy link

Description

Trying out the new .NET Blazor Hybrid and Web App template in VS Code (with C# Dev Kit and MAUI extension installed), the .SLN file isn't generated properly so the solution never opens in the Solution Explorer. This happens on Windows and Mac.

Steps to Reproduce

C# Dev Kit v1.5.20
.NET MAUI extension v0.11.87
Microsoft.Maui.Templates.net8.8.0.100-dev.nupkg installed
Windows or Mac

  • Create a new .NET project in VS Code (Windows or Mac) via the command pallet and select the new .NET MAUI Blazor and Web App template.

VSCodeCreate

  • Notice that it doesn't open the project in VS Code
  • Open the folder and the projects are created but the .SLN is missing the project references.
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

Link to public reproduction project repository

No response

Version with bug

8.0.10 SR3

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Windows, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@BethMassi BethMassi added t/bug Something isn't working area-blazor Blazor Hybrid / Desktop, BlazorWebView labels May 13, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@PureWeen PureWeen added this to the .NET 8 SR6 milestone May 15, 2024
@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jun 5, 2024
@Zhanglirong-Winnie
Copy link

Verified this issue with VSCode 1.89.1(.net9). Can repro this issue.
image

@PureWeen PureWeen modified the milestones: .NET 8 SR6, .NET 8 SR7 Jun 7, 2024
@PureWeen PureWeen modified the milestones: .NET 8 SR7, .NET 8 SR8 Jul 2, 2024
@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
@PureWeen PureWeen modified the milestones: .NET 8 SR8, .NET 8 SR9 Jul 30, 2024
@PureWeen PureWeen added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Aug 2, 2024
@BethMassi
Copy link
Author

BethMassi commented Sep 11, 2024

This is still happening in VSCode v1.93 with C# DevKit v1.11.6 and .NET MAUI extension v1.3.29. What's weird is I don't see the new .NET MAUI Multi-project in VSCode (I see it on the CLI) so perhaps solution templates shouldn't be supported?

image

@mkArtakMSFT mkArtakMSFT modified the milestones: .NET 8 SR9, .NET 9.0 GA Sep 25, 2024
@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Sep 25, 2024

@vijayrkn do you own project creation experience in VSCode? Looks like the project creation for VS Code only is broken for this solution, and it works just fine when created from the CLI.

If you don't own this experience, can you please ping / include whoever does? Thanks in advance.

@mkArtakMSFT mkArtakMSFT assigned vijayrkn and unassigned Eilon Sep 25, 2024
@vijayrkn
Copy link

Hey @mkArtakMSFT Tagging @smitpatel @JakeRadMSFT who owns this experience.

@mkArtakMSFT mkArtakMSFT assigned smitpatel and unassigned vijayrkn Oct 10, 2024
@smitpatel
Copy link
Member

Where is the source for template?

@smitpatel
Copy link
Member

{
"condition": "(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\")",
"path": "MauiApp.1/MauiApp.1.csproj"
},
{
"condition": "(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\")",
"path": "MauiApp.1.Shared/MauiApp.1.Shared.csproj"
},
{
"condition": "(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\")",
"path": "MauiApp.1.Web/MauiApp.1.Web.csproj"
},
{
"condition": "(UseWebAssembly && (HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
"path": "MauiApp.1.Web.Client/MauiApp.1.Web.Client.csproj"
}

A project or solution template should add paths to csproj files in primary outputs. (the condition for dotnetcli is incorrect.

@BethMassi
Copy link
Author

@smitpatel cool, is this something you can fix? Or @Eilon ?

@smitpatel
Copy link
Member

@BethMassi submitted #25303

@Eilon
Copy link
Member

Eilon commented Oct 21, 2024

Fixed by #25303. Thanks @smitpatel !!

@Eilon Eilon closed this as completed Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

8 participants