Closed Kratheon closed 2 years ago
My best guess is that your build pipeline is running using the .NET Core version of MSBuild instead of the full version. The .NET Core version does not work with ConfuserEx yet. Only the full msbuild that is part of Visual Studio and the Visual Studio Build Tools works correctly.
Jetbrain Rider, .NET4.8 with new project format, using Microsoft Build Engine version 17.1.0+ae57d105c for .NET
Confuser.MSBuild.targets(74, 5): [MSB4018] The "Confuser.MSBuild.Tasks.ConfuseTask" task failed unexpectedly.
System.AggregateException: One or more errors occurred. (Could not load file or assembly 'dnlib, Version=3.4.0.0, Culture=neutral, PublicKeyToken=50e96378b6e77999'. The system cannot find the file specified.
)
---> System.IO.FileNotFoundException: Could not load file or assembly 'dnlib, Version=3.4.0.0, Culture=neutral, PublicKeyToken=50e96378b6e77999'. The system cannot find the file specified.
File name: 'dnlib, Version=3.4.0.0, Culture=neutral, PublicKeyToken=50e96378b6e77999'
at Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token)
at Confuser.Core.ConfuserEngine.<>c__DisplayClass3_0.
My best guess is that your build pipeline is running using the .NET Core version of MSBuild instead of the full version. The .NET Core version does not work with ConfuserEx yet. Only the full msbuild that is part of Visual Studio and the Visual Studio Build Tools works correctly.
Yeah, it seems it was that. Msbuild 17.1 worked fine in the pipeline. Thanks for the answer ! :D
This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks!
I've fixed this for me - https://github.com/mkaring/ConfuserEx/pull/488 Could you publish nuget package asap?:)
This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks!
Closing this issue because it needs more information and has not had recent activity. Please re-open this issue if more details can be provided. Thanks!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Steps to Reproduce:
As you can see in the last image, it seems that during the ConfuseTask in the building process of a pipeline, ConfuserEx is not able to find the dnlib.dll
I don't have this problem when I build the project in Visual Studio 2022.
I aldready tried to give the dnlib.dll (v.3.4.0) by adding it in the project root (and copy it in the output directory in the csproj)or adding a probePath in the crproj giving the path of dnlib.dll
Any ideas what I am missing or it is even possible to use Confuser.MsBuild in a pipeline building process ?