Skip to content

"The path is not of a legal form" error when adding ASP.NET Core Angular project to existing solution #62227

Open
@ALDamico

Description

@ALDamico

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I'm trying to add a new (non-legacy) angular + ASP.NET Core project to an existing monolith of about 90 projects. However, at the end of the creation wizard, an error box with the message "The path is not of a legal form" appears. If I click OK, everything seems to behave normally, and the project even builds without issue, but if I close and reopen the solution, everything breaks.
Trying to open the properties for the frontend project, a COMException occurs
I lose the ability to recompile, with the frontend project failing because, according to visual studio, the project should reference .NETCoreApp 6.0, which is of course completely incorrect.
If I unload the client project, the solution can be built, but the ASP.NET proxy fails not long after because it cannot serve the client.

Expected Behavior

I expect to be able to add an ASP.NET Core + Angular project to an existing solution.

Steps To Reproduce

No response

Exceptions (if any)

An error occurred in 'Miscellaneous Files' while attempting to open 'angularapp1.client.esproj'
System.Runtime.InteropServices.COMException (0x80041FEB): Exception from HRESULT: 0x80041FEB
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.PlatformUI.Packages.ShellService.EditorFactories.EditorFactory.d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<>c__DisplayClass86_0.<g__CreateEditorInstanceAsync|1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.d__86.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.d__85.MoveNext()

.NET Version

No response

Anything else?

ASP.NET Core 8
Visual Studio 2022 Community

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-area-labelUsed by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions