Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/159 Upgrade VTS to .NET 8.0 #171

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

lmalenfant
Copy link
Member

No description provided.

Update .NET version
Update .NET version and action versions
@lmalenfant lmalenfant linked an issue Sep 12, 2024 that may be closed by this pull request
@hayakawa16
Copy link
Member

@lmalenfant, what is the best way to check that I am running .NET 8 when I build this branch and try it?

@lmalenfant
Copy link
Member Author

@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.

@hayakawa16
Copy link
Member

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.

@janakarana janakarana requested review from janakarana and removed request for janakarana September 12, 2024 17:59
@janakarana
Copy link
Member

I have installed .Net 8 already on my Windows machine. It builds without any issues.

@hayakawa16
Copy link
Member

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?

… the archives to overwrite in case one exists
@lmalenfant
Copy link
Member Author

@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.

Copy link
Member

@janakarana janakarana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mac didn't have .Net 8. Before updating to .Net 8, I got an error. After I installed .Net SDK 8.0.401 (x64) MacOS. everything works fine.

Copy link

Copy link
Member

@hayakawa16 hayakawa16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran unit tests in VS and ran BuildTestReleaseMCCL on Windows and Linux and all looks great! Thanks @lmalenfant for the hard work!

@lmalenfant lmalenfant merged commit 66cd90a into master Sep 17, 2024
3 checks passed
@lmalenfant lmalenfant deleted the feature/159-upgrade-vts-to-net-80 branch September 17, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade VTS to .NET 8.0
3 participants