.slnx solution files still cause "No file format header found" in v10.0.1
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp
- Lĩnh vực
- build-system, tooling
Hướng nghiên cứu
Bắt đầu với CodeConv/CodeConv.csproj và CodeConverter/CodeConverter.csproj, sau đó kiểm tra bốn tham chiếu gói Microsoft.CodeAnalysis hiện đang ở phiên bản 4.14.0. Xác minh việc cập nhật dependency dựa trên lỗi .slnx được mô tả trong issue và kiểm thử chuyển đổi một dự án VB bằng một solution .slnx. Hoàn tất khi solution mở được mà không gặp file-format-header exception.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
CodeConverter Version: 10.0.1
OS: Windows
Error
Microsoft.Build.Exceptions.InvalidProjectFileException: No file format header found.
at Microsoft.Build.Construction.SolutionFile.ParseFileHeader()
at Microsoft.Build.Construction.SolutionFile.ParseSolution()
at Microsoft.Build.Construction.SolutionFile.ParseSolutionFile()
at Microsoft.Build.Construction.SolutionFile.Parse(String solutionFile)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadSolutionInfoAsync(...)
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenSolutionAsync(...)
at ICSharpCode.CodeConverter.CommandLine.MsBuildWorkspaceConverter.SolutionLoader.AnalyzeSolutionAsync(...) in MsBuildWorkspaceConverter.cs:line 87
Description
Despite issue #1195 being listed as fixed in v10.0.1, converting a VB project using a .slnx
solution file still fails with the above error. The bundled
Microsoft.CodeAnalysis.Workspaces.MSBuild.dll is version 4.14.0 (file version
4.1400.25.26210). MSBuildWorkspace in 4.x tries to parse .slnx as a traditional .sln file
and fails at the file header check — .slnx is XML-based and has no such header.
Root Cause
.slnx support in MSBuildWorkspace.OpenSolutionAsync requires
Microsoft.CodeAnalysis.Workspaces.MSBuild 5.x. The latest stable is 5.3.0.
Proposed Fix
Update CodeConv/CodeConv.csproj (and CodeConverter/CodeConverter.csproj):
Microsoft.CodeAnalysis.Workspaces.MSBuild4.14.0 → 5.3.0Microsoft.CodeAnalysis.CSharp.Workspaces4.14.0 → 5.3.0Microsoft.CodeAnalysis.VisualBasic.Workspaces4.14.0 → 5.3.0Microsoft.CodeAnalysis.CSharp.Features4.14.0 → 5.3.0
References
- Re-opens / follow-up to #1195
- NuGet: https://www.nuget.org/packages/Microsoft.CodeAnalysis.Workspaces.MSBuild/5.3.0
- Ngôn ngữ chính
- C#
- Star
- 913
- Fork
- 244
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của icsharpcode/CodeConverter
-
C# -> VB
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
icsharpcode/CodeConverter#1281 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
icsharpcode/CodeConverter#1275 ·
-
VB -> C#
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
icsharpcode/CodeConverter#1273 ·
-
VB -> C#: "Group By Into" Linq queries supressing aggregations ("Into" part) in the converted code Đang mởDifficult area VB -> C#
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
icsharpcode/CodeConverter#1272 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
icsharpcode/CodeConverter#1270 ·
Tất cả issue của icsharpcode/CodeConverter
Issue tương tự
-
type/automation type/tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
t/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
ci-failure-cause test-failure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
area:auth FE mvp P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
klasolsson81/jobbliggaren#1788 ·