MrAdvice icon indicating copy to clipboard operation
MrAdvice copied to clipboard

Containerize the solution in linux with .NET Core 3.1

Open filipendo125 opened this issue 3 years ago • 2 comments

Hi! I have an existing .NET Core 3.1 project which I am trying to containerize via Linux docker containers, but it seems that I am not able to do so, and I get an error coming from MrAdvice upon dotnet build.

error MSB3073: The command ""/root/.nuget/packages/mradvice/2.9.7/build/../tools/net5.0/MrAdvice.Weaver.exe"
AssemblyPath="obj/Release/netcoreapp3.1/Webscheduler.Common.dll"
ReferencePath="@obj/Release/netcoreapp3.1/Webscheduler.Common.dll.MrAdvice.ReferencePath.txt"
ReferenceCopyLocalPaths="@obj/Release/netcoreapp3.1/Webscheduler.Common.dll.MrAdvice.LocalReferencePath.txt"
AssemblyOriginatorKeyFile="" SignAssembly="false"" exited with code 1. [/src/Webscheduler.Common/Webscheduler.Common.csproj]

I am using mcr.microsoft.com/dotnet/sdk:3.1 to build. I don't seem to be allowed to run the exe, and the even when I investigated MrAdvice.targets, it seems that this is the preferred way if I have .NET Core. I tried to modify the project to .NET 6, to use the dotnet command but as there are lots of dependencies on the project, I would need to have multiple SDKs installed, which are not installed.

What should I use to satisfy the requirement to build within Linux container with .NET Core 3.1?

filipendo125 avatar Feb 24 '22 17:02 filipendo125

I have no idea how to build with .NET Core 3.1 😓. Maybe you could try to run the weaver from command line to see if you have more details about the error. But that’s a big “maybe”.

picrap avatar Feb 27 '22 09:02 picrap

Perhaps you can also use "dotnet MrAdvice.Weaver.dll" instead of calling the exe directly as it is now done for .Net 6

jorgenbosman avatar Apr 07 '22 13:04 jorgenbosman

Hi @jorgenbosman, shall we consider this as closed?

picrap avatar Dec 19 '22 11:12 picrap

I think so yes

jorgenbosman avatar Dec 19 '22 12:12 jorgenbosman