microsoft / microsoft/vs-solutionpersistence
Custom project types support is broken in slnx
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 213
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
While I was playing with custom project types, I found this bug. I made a minimal repro: repro.zip.
P.S. You can ignore this rant.
Can Microsoft Business Central AL guys and MSBuild guys meet somehow? Please, it is getting ridiculous - AL side is reinvented the wheel and all multiple times already (ALOPS, NAVERTICAL, ALPACA, AL-GO, us, the list goes on) and we still don't have decent solution compilation like there is in dotnet - just a bunch of powershell scripts and still no package manager/repository after like 6+ years since the inception of AL.
This description was generated by AI.
.slnx vs .sln: Custom Project Type Build Behavior
Repro Steps
-
Place these files in the same folder:
- A.sln
- A.slnx
- A.alproj
- AL.Build.targets
-
Run the following commands from the folder:
dotnet build A.sln dotnet build A.slnx
Output
dotnet build A.sln
Good. It actually runs the al.exe.
Restore succeeded with 2 warning(s) in 0,0s
C:\Users\ernes\Desktop\bad publish repro\Product\repro\A.alproj : warning NU1503: Skipping restore for project 'C:\Users\ernes\Desktop\bad publish repro\Product\repro\A.alproj'. The project file may be invalid or missing targets required for restore. C:\Program Files\dotnet\sdk\10.0.102\NuGet.targets(196,5): warning Unable to find a project to restore!
A failed with 2 error(s) (0,1s)
EXEC : error AL1001: Source file 'C:\Users\ernes\Desktop\bad publish repro\Product\repro\app.json' could not be found
C:\Users\ernes\Desktop\bad publish repro\Product\repro\AL.Build.targets(5,5): error MSB3073: The command "al.exe compile /project:"C:\Users\ernes\Desktop\bad publish repro\Product\repro" /out:"C:\Users\ernes\Desktop\bad publish repro\Product\repro\.output\A.app" /packagecachepath:"C:\Users\ernes\Desktop\bad publish repro\Product\repro\..\.alpackages"" exited with code 1.
Build failed with 2 error(s) and 2 warning(s) in 0,3s
dotnet build A.slnx
Bad. It fails to recognize project type.
A.slnx(2,4): error MSB4025:
The project file could not be loaded. Microsoft.VisualStudio.SolutionPersistence.Model.SolutionException: ProjectType '' not found. (Parameter 'projectTypeName')
...
Build failed with 1 error(s) in 0,0s
Summary
.slnbuilds and runs the custom AL project, but fails due to missingapp.json(expected for repro)..slnxfails withProjectType '' not found, even with minimal or customProjectTypeDefinitionattempts.- This demonstrates a gap in
.slnxsupport for custom project types (like.alproj) in the .NET SDK.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Unpack repro.zip and inspect A.sln, A.slnx, A.alproj, and AL.Build.targets. Start by running dotnet build A.sln and dotnet build A.slnx, then trace the .slnx project-type handling that produces ProjectType '' not found. Done means the custom .alproj type is recognized by .slnx and reaches the same build behavior as the .sln repro.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100