ArxOne / MrAdvice

.NET aspect weaver (build task under NuGet package)
MIT License
311 stars 45 forks source link

Cannot build project on mac #199

Open Alex-Dobrynin opened 11 months ago

Alex-Dobrynin commented 11 months ago

Getting this error /Users/mac/.nuget/packages/mradvice/2.13.0/build/MrAdvice.targets(3,3): Error MSB3073: The command "dotnet "/Users/mac/.nuget/packages/mradvice/2.13.0/build/../tools/net8.0/MrAdvice.Weaver.dll" AssemblyPath="obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll" ReferencePath="@obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll.MrAdvice.ReferencePath.txt" ReferenceCopyLocalPaths="@obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll.MrAdvice.LocalReferencePath.txt" AssemblyOriginatorKeyFile="" SignAssembly="false""

As i know, the command should be a bit different to build dll on mac

If you need assistance with mac, we can arrange a call

picrap commented 11 months ago

The output does not show the error. Do you have some more log ?

Alex-Dobrynin commented 11 months ago

Target MrAdviceWeaver: dotnet "/Users/mac/.nuget/packages/mradvice/2.13.0/build/../tools/net8.0/MrAdvice.Weaver.dll" AssemblyPath="obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll" ReferencePath="@obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll.MrAdvice.ReferencePath.txt" ReferenceCopyLocalPaths="@obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll.MrAdvice.LocalReferencePath.txt" AssemblyOriginatorKeyFile="" SignAssembly="false" EXEC : * Internal error : System.IO.FileLoadException: Could not load file or assembly 'ErrorSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.Runtime.Loader.AssemblyLoadContext.InternalLoad(ReadOnlySpan1 arrAssembly, ReadOnlySpan1 arrSymbols) at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore) at ArxOne.MrAdvice.MrAdviceStitcher.Process(AssemblyStitcherContext context) /Users/mac/.nuget/packages/mradvice/2.13.0/build/MrAdvice.targets(16,3): error MSB3073: The command "dotnet "/Users/mac/.nuget/packages/mradvice/2.13.0/build/../tools/net8.0/MrAdvice.Weaver.dll" AssemblyPath="obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll" ReferencePath="@obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll.MrAdvice.ReferencePath.txt" ReferenceCopyLocalPaths="@obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll.MrAdvice.LocalReferencePath.txt" AssemblyOriginatorKeyFile="" SignAssembly="false"" exited with code -1. Done building target "MrAdviceWeaver" in project "ErrorSample.csproj" -- FAILED.

this is all VS gives me

picrap commented 11 months ago

What if you run the command

dotnet "/Users/mac/.nuget/packages/mradvice/2.13.0/build/../tools/net8.0/MrAdvice.Weaver.dll" AssemblyPath="obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll" ReferencePath="@obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll.MrAdvice.ReferencePath.txt" ReferenceCopyLocalPaths="@obj/Debug/net8.0-ios/iossimulator-x64/ErrorSample.dll.MrAdvice.LocalReferencePath.txt" AssemblyOriginatorKeyFile="" SignAssembly="false"

explicitly?

Alex-Dobrynin commented 11 months ago

there is no ErrorSample.dll, so i cannot run it. And ErrorSample.dll is not existing because i cannot build the project

picrap commented 11 months ago

This is strange that there is no ErrorSample.dll since it is built by the compiler before MrAdvice processes it. Is there a build failure before?

Alex-Dobrynin commented 11 months ago

I can build the project without MrAdvice and without any error

Alex-Dobrynin commented 11 months ago

as i said, we can arrange a call, and i will share you my screen, if this helps you