Unit tests fail when running against net6.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- build-system, testing
Research direction
Start with PortToTripleSlashTests.cs at line 15 and reproduce Port_Basic against net6.0. Trace the reported failure through ToTripleSlashPorter.CheckDiagnostics at line 479 and the MSBuild workspace calls, then verify the test no longer reports the missing NuGet assembly or MSBuild diagnostic.
Written by the indexing model from the issue text.
Description
Running unit tests against the main branch with the projects targeting net6.0 is leading to a failed test.
Libraries.Tests.PortToTripleSlashTests.Port_Basic
Source: PortToTripleSlashTests.cs line 15
Duration: 1 sec
Message:
System.Exception : Diagnostic errors found.
Stack Trace:
ToTripleSlashPorter.CheckDiagnostics(MSBuildWorkspace workspace, String stepName) line 479
ToTripleSlashPorter.GetOrAddProject(MSBuildWorkspace workspace, Dictionary`2 projects, String projectPath) line 420
ToTripleSlashPorter.GetProjectInfo(String projectPath, Boolean isMono) line 369
ToTripleSlashPorter.Port() line 142
ToTripleSlashPorter.Start(Configuration config) line 127
PortToTripleSlashTests.PortToTripleSlash(String testDataDir, Boolean save, Boolean skipInterfaceImplementations, String assemblyName, String namespaceName, String typeName) line 54
PortToTripleSlashTests.Port_Basic() line 17
The diagnostic error is:
"Failure - Msbuild failed when processing the file 'C:\\Users\\jeffhand\\AppData\\Local\\Temp\\0shltoqo.fn2\\Project\\MyAssembly.csproj' with message:
The expression \"[MSBuild]::GetTargetFrameworkIdentifier(net5.0)\" cannot be evaluated. MSB0001: Internal MSBuild Error: A required NuGet assembly was not found.
Expected Path: C:\\Program Files\\dotnet\\sdk\\6.0.100-preview.2.21158.2 C:\\Program Files\\dotnet\\sdk\\6.0.100-preview.2.21158.2\\Sdks\\Microsoft.NET.Sdk\\targets\\Microsoft.NET.TargetFrameworkInference.targets"
- Dominant language
- C#
- Stars
- 14
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from dotnet/api-docs-sync
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
dotnet/api-docs-sync#182 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
dotnet/api-docs-sync#181 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dotnet/api-docs-sync#180 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dotnet/api-docs-sync#179 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/api-docs-sync#178 · 1 comment ·
All issues in dotnet/api-docs-sync
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·