In the ASP.NET Core 3.1 app, the given path in the obfuscar.xml is correct but it is not able to find the assembly/Failed to resolve assembly:
<?xml version='1.0'?>
<Obfuscator>
<Var name="InPath" value=".\bin\Debug\netcoreapp3.1" />
<Var name="OutPath" value="$(InPath)\publish" />
<Var name="KeepPublicApi" value="false" />
<Var name="HidePrivateApi" value="true" />
<Var name="RenameProperties" value="true" />
<Var name="RenameEvents" value="true" />
<Var name="RenameFields" value="true" />
<Var name="UseUnicodeNames" value="true" />
<Var name="HideStrings" value="true" />
<Var name="OptimizeMethods" value="true" />
<Var name="SuppressIldasm" value="true" />
<Module file="$(InPath)\Sample.dll" />
</Obfuscator>
The build error:
4>Note that Rollbar API is enabled by default to collect crashes. If you want to opt out, please run with -s switch
4>Loading project .\obfuscar.xml...
4>An error occurred during processing:
4>Unable to find assembly: .\bin\Debug\netcoreapp3.1\Sample.dll
4>Failed to resolve assembly: 'Microsoft.AspNetCore.Mvc.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
4>G:\SomePath\Sample.csproj(110,5): error MSB3073: The command "if Debug == Debug obfuscar.console .\obfuscar.xml" exited with code 1.
4>Done building project "Sample.csproj" -- FAILED.