Build error building on macOS 14
Have you checked Github Issues for similar errors? YES
Exception /Users/steve/.nuget/packages/cosmos.build/0.1.0-localbuild/build/Cosmos.Build.targets(185,9): error MSB4062: The "Cosmos.Build.Tasks.IL2CPU" task could not be loaded from the assembly /Users/steve/.nuget/packages/cosmos.build/0.1.0-localbuild/build/../tools/net48/Cosmos.Build.Tasks.dll. Could not load file or assembly 'Cosmos.Build.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983'. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/Users/steve/source/jos/jos.csproj]
Visual Studio Output Logs Post the entire output log given by Visual Studio for the build
How To Reproduce
- Git clone the Cosmos sources as per the instructions.
- Run make, sudo make install in the Cosmos folder.
- Run dotnet new --install ./source/templates/csharp/
- In a new folder, run dotnet new cosmosCSKernel -n jos
- Edit the Kernel.cs to enter a valid namespace (to replace the template string).
- Compile with dotnet build.
Screenshots If applicable, add screenshots to help explain your problem.
Context Before posting please confirm that the following are in order [X] Both Cosmos VS Extensions are installed [ ] In the NuGet Package Manager "Include prerelease" is selected [ ] The Cosmos NuGet package store is selected (NOT nuget.org) in 'Manage NuGet Packages' [X] The Cosmos NuGet packages are installed
I'm unclear why it is seemingly attempting to load the net48 version of Cosmos.Build.Tasks.dll despite the above. Have I missed a step?
At which commit did you clone the repository? we recently changed versions to fix an issue similar to this
It was the HEAD commit (2d59be2336692214abd3d7917294195fef0f8a89) as of this morning.
Can you checkout commit e8029773c7f9374773c13975e2b66883f883b900 and see if it works?
for mac os you need to edit the make file so it will build il2cpu for masos and not linux, other then that if you follow the linux install guide it should work
Can you clarify what edits to the makefile you're referring. The only one I have made is:
@echo "Publishing IL2CPU"
$(DOTNET) publish $(IL2CPU_DIR)/source/IL2CPU -r osx-x64 --self-contained $(DOTNETFLAGS)
Is there something else?
Can you checkout commit e802977 and see if it works?
I already have that according to the git log:
commit e8029773c7f9374773c13975e2b66883f883b900 Merge: 95a6434dc 16ae7a711 Author: Quajak [email protected] Date: Wed Oct 18 09:44:30 2023 -0400
I meant checkout that commit if the recent changes after that commit were the issue.
No luck. Same problem, sorry.
The assembly /Users/steve/.nuget/packages/cosmos.build/0.1.0-localbuild/build/../tools/net48/Cosmos.Build.Tasks.dll is present at that path. Opening the assembly in VS's Object Browser shows that there is indeed a Cosmos.Build.Tasks.IL2CPU class. So in theory the referenced assembly ought to be fine and the issue is down to missing dependencies or this is the wrong assembly type for the build. I don't have enough information yet to tell for sure.
I sadly have no experience with Mac and I can't reproduce the issue locally. Unless you have some idea of getting more information, I don't know how we can solve this issue.
Understood. I'll continue to investigate and look for a resolution. @zarlo - can you please answer the question about what edits to the makefile you were referring here ? Possibly that may be germane to the issue.
Can you clarify what edits to the makefile you're referring. The only one I have made is:
@echo "Publishing IL2CPU" $(DOTNET) publish $(IL2CPU_DIR)/source/IL2CPU -r osx-x64 --self-contained $(DOTNETFLAGS)Is there something else?
i think that is it