Build fails with Exception "Absolute path expected. (Parameter 'fullPath')"
Opened this issue · 4 comments
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
Can not reproduce the problem in either PAClient or PA UI tools.
This the reference record I used for testing. Do you mind sharing the csproj file?
<Reference Include="Antlr3.Runtime">
<HintPath>..\..\..\..\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
projects.zip
Attached file contains the solution file and all refrenced .csproj files with their paths maintained.
(please note that the "zip" file is actually a "7z" file but you should be able to open it without any problems.
Thanks, Chris
Can not reproduce the problem in either PAClient or PA UI tools.
This the reference record I used for testing. Do you mind sharing the csproj file?
<Reference Include="Antlr3.Runtime"> <HintPath>..\..\..\..\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath> </Reference>
csproj files attached a couple of days ago.
How do you add the relative path of the reference to the project? Do you modify the manually? Or you use AddReference option by right-click the project in Visual Studio? Or feel free to us an email aws-porting-assistant-support@amazon.com.