troubleshooting Question

MSBuild Obfuscation

Avatar of dotnetpro
dotnetpro asked on
.NET ProgrammingC#
16 Comments3 Solutions2241 ViewsLast Modified:
Experts,

I am using C# 2008 to write my WPF application and i publish using ClickOnce. I am using following updates to the .csproj file to obfuscate the .exe after compilation
 <Target Name="BeforeRebuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <CreateProperty Value="true">
      <Output TaskParameter="Value" PropertyName="Obfuscate" />
    </CreateProperty>
  </Target>
  <Target Name="AfterCompile" Condition=" '$(Obfuscate)' != '' ">
    <Exec Command="&quot;C:\Program Files\Microsoft Visual Studio 9.0\Application\PreEmptive Solutions\Dotfuscator Community Edition\dotfuscator.exe&quot; -q Dotfuscator.xml" />
    <Copy SourceFiles="$(ProjectDir)Dotfuscated\$(TargetFileName)" DestinationFiles="$(IntermediateOutputPath)$(TargetFileName)" />
  </Target>

But in the published version when i use ILDASM to look at the .exe its not obfuscated..I think its the Copy task that is not woking...Any ideas as to either how can else can i obfuscate my .exe or any way to check whether Copy is working or not ????
ASKER CERTIFIED SOLUTION
saragani

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros