porting-assistant-dotnet-client
porting-assistant-dotnet-client copied to clipboard
Build fails with Exception "Absolute path expected. (Parameter 'fullPath')"
Describe the bug
When assessing a .NET Framework 4.8 Web Forms application and associated libraries, the assessment fails to build. Log file shows:
[2023-11-10 12:38:05 ERR] (1.9.9) PortingAssistant.Api.Application: Failed to analyze solution
{
"RequestPayload": {
"solutionFilePath": "C:\\path\\to\\solution\\My Solution.sln",
"runId": "01234567-89ab-cdef-0123-456789abcdef",
"triggerType": "UserRequest",
"settings": {
"IgnoreProjects": null,
"TargetFramework": "net6.0",
"ContiniousEnabled": false,
"CompatibleOnly": false,
"ActionsOnly": false,
"UseGenerator": false,
"VisualStudioVersion": null
},
"preTriggerData": {}
},
"RequestType": "AnalyzeSolutionRequest",
"TraceId": "9b93d951-d93b-45f7-81d9-74ff783b2a64",
"TimeStamp": "2023-11-10 12:37:59Z"
}
System.ArgumentException: Absolute path expected. (Parameter 'fullPath')
at PortingAssistant.Api.Application.<SetupConnection>b__5_0(AnalyzeSolutionRequest request) in C:\codebuild\tmp\output\src4028753889\src\github.com\aws\porting-assistant-dotnet-ui\packages\csharp\PortingAssistant\PortingAssistant.Api\Application.cs:line 78
[2023-11-10 12:38:05 INF] (1.9.9) PortingAssistant.Api.Application: End OnAnalyzeSolutionRequest
Expected behavior
Assessment to complete without error
Steps to Reproduce
Steps to reproduce the behavior:
- Create a new .NET Framework 4.8 Web Forms project.
- Create or add reference to another .NET Framework library
- Amend Web Forms project's .csproj file so that reference to library is a valid relative path e.g.
<Reference Include="Azure.Identity, Version=1.8.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>C:\packages\Azure.Identity.1.8.0\lib\netstandard2.0\Azure.Identity.dll</HintPath>
</Reference>
to
<Reference Include="Azure.Identity, Version=1.8.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>..\..\..\..\Azure.Identity.1.8.0\lib\netstandard2.0\Azure.Identity.dll</HintPath>
</Reference>
VS2022 will compile the project without issue but the asessment project with fail with the above error.
Desktop
- OS: Windows 11