Usage of Fody/Costura and Obfuscar in Visual Studio 2017

TheGuy

I would like to ask if it is possible to use Fody-Costura, which embeds dependencies into the executable and Obfuscar, for obfuscation, together.

At the moment I’m struggling because the msbuild target in Visual Studio 2017 of Costura gets executed before the one of obfuscar (which then complains about missing dependency files).

As obfuscar does not provide a target by itself, I'm using MSBuild.Obfuscar.

Is there a way to combine those two, maybe by specifying the order of the targets?

asherber

I made a quick Framework console app project, and I added Costura, MSBuild.Obfuscar, and NLog. In order to get Obfuscar to work, all I had to do was edit the Obfuscar.xml file to include the actual assembly name:

<?xml version="1.0" encoding="utf-8"?>
<Obfuscator>
  <Var name="InPath" value="bin\Release" />
  <Var name="OutPath" value="$(InPath)\obfuscated" />
  <Var name="HidePrivateApi" value="true" />
  <!-- was: file="$(InPath)\"  -->
  <Module file="$(InPath)\ConsoleApp1.exe" />
</Obfuscator>

This built for me just fine. The resulting assembly had my code obfuscated and also included NLog as a resource. If you're seeing different results, then maybe it has to do with the specific other NuGet packages your solution includes.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Visual Studio 2017 crash

分類Dev

Manually update Visual Studio 2017

分類Dev

AnkhSVN crash in Visual Studio 2017

分類Dev

Visual Studio 2017 - python tool

分類Dev

Downgrade Visual Studio 2019 back to Visual Studio 2017

分類Dev

Visual Studio 2017 Upgrade from Community to Enterprise

分類Dev

Create Ribbon in WPF App with with Visual Studio 2017

分類Dev

Python Tools Visual Studio 2017 RC

分類Dev

Visual Studio 2015/2017のTSLint?

分類Dev

Visual Studio 2017 TypeScript compilation errors

分類Dev

F#、Visual Studio 2017、dotnet new

分類Dev

Visual Studio 2017 Reference Manager is empty

分類Dev

Solution for developing in Windows Silverlight in Visual Studio 2017?

分類Dev

How to disable AVX in Visual Studio 2017 15.5?

分類Dev

Visual Studio 2017 debug error: "Frame not in module"

分類Dev

CUDA 9 unsupported error with Visual Studio 2017

分類Dev

Visual Studio 2017 - Not Able to see Publish Profiles

分類Dev

Open file in existing instance of Visual Studio 2017

分類Dev

How to upgrade NuGet with Visual Studio 2017?

分類Dev

Visual studio 2017 reorders includes without asking

分類Dev

Visual Studio 2017 TypeScript compilation errors

分類Dev

Visual Studio 2017 File icons broken

分類Dev

Visual Studio 2017 App.config

分類Dev

Are editorconfig files supported in visual studio 2017 for mac?

分類Dev

Visual Studio 2017 App.config

分類Dev

Determination of the work mode with the project in Visual Studio 2017

分類Dev

Update Visual Studio 2017 to Preview version

分類Dev

Where is properties menu in Visual Studio 2017 Xamarin

分類Dev

Visual Studio 2017 Blazor Project Templates Missing

Related 関連記事

ホットタグ

アーカイブ