Closed lmalenfant closed 1 month ago
@hayakawa16 it will not let you build if you only have .NET 6. You can try it on Ubuntu without .NET 8 and I imagine it will give you an error.
Thanks @lmalenfant! I will give it a try tomorrow. I plan to first try Windows, then install .NET 8 on Linux and try it there.
I have installed .Net 8 already on my Windows machine. It builds without any issues.
On Windows I pulled a clean clone, updated to the branch and ran unit tests. All works fine!
On Linux, I installed dotnet:
sudo apt-get update
sudo apt-get install dotnet8
opened powershell and ran BuildTestReleaseMCCL
I get error:
/usr/lib/dotnet/sdk/8.0.108/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file '/home2/hayakawa/vts_240912/src/Vts/obj/project.assets.json' doesn't have a target for 'net6.0'. Ensure that restore has run and that you have included 'net6.0' in the TargetFrameworks for your project. [/home2/hayakawa/vts_240912/src/Vts/Vts.csproj]
So I ran from command line: dotnet restore src/VtsLibrary.sln dotnet build src/VtsLibrary.sln --no-restore dotnet test src/VtsLibrary.sln --no-build --verbosity normal Then tried BuildTestReleaseMCCL again. Still error.
When I do: hayakawa@ulam:~/vts_240912$ dotnet --list-sdks 6.0.132 [/usr/lib/dotnet/sdk] 8.0.108 [/usr/lib/dotnet/sdk]
hayakawa@ulam:~/vts_240912$ dotnet --list-runtimes Microsoft.AspNetCore.App 6.0.32 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.8 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.32 [/usr/lib/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.8 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
It appears that my /src/Vts/obj/project.assets.json targets 6 like here: "MathNet.Numerics/5.0.0": { "type": "package", "compile": { "lib/net6.0/MathNet.Numerics.dll": { <------- HERE "related": ".xml" } }, "runtime": { "lib/net6.0/MathNet.Numerics.dll": { "related": ".xml" } } },
Did I do something wrong?
@hayakawa16 thank you for the detailed instructions, the publish in BuildTestReleaseMCCL.ps1 was still referencing .NET 6.0 so I removed the version and it should now work for future versions also.
While I was fixing this issue, I noticed an issue with creating the archive files, the release folder is deleted when running BuildTestRelease but not BuildTestReleaseMCCL because it would delete the Scripting archives, I added -Force to the archive command to overwrite the existing file.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
@lmalenfant, what is the best way to check that I am running .NET 8 when I build this branch and try it?