Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Confuser2.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<File Path="appveyor.yml" />
<File Path="ConfuserEx.Common.props" />
<File Path="ConfuserEx.Common.targets" />
<File Path="Directory.Build.props" />
<File Path="LICENSE.md" />
<File Path="README.md" />
<File Path="version.json" />
Expand Down
18 changes: 0 additions & 18 deletions ConfuserEx.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@

<PropertyGroup Label="C-Sharp Compiler Settings" Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

<PropertyGroup Label="Assembly Information">
<_CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</_CurrentYear>
<Authors>Ki;Martin Karing;Andrii Kurdiumov</Authors>
<Copyright>Copyright © 2014 Ki, 2018 - 2022 Martin Karing, 2016 - $(_CurrentYear) Andrii Kurdiumov</Copyright>
<RepositoryUrl>https://github.com/kant2002/ConfuserEx.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<PropertyGroup Label="Language">
<NeutralLanguage>en</NeutralLanguage>
</PropertyGroup>

<PropertyGroup Label="SourceLink">
<SourceLinkServerType>GitHub</SourceLinkServerType>
<SourceLinkOriginUrl>$(RepositoryUrl)</SourceLinkOriginUrl>
</PropertyGroup>

<PropertyGroup Label="Code Analysis">
Expand Down
18 changes: 18 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
<Project>
<PropertyGroup>
<UseArtifactsOutput>true</UseArtifactsOutput>
<!--<LangVersion>11.0</LangVersion>-->
</PropertyGroup>

<PropertyGroup Label="Assembly Information">
<_CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</_CurrentYear>
<Authors>Ki;Martin Karing;Andrii Kurdiumov</Authors>
<Copyright>Copyright © 2014 Ki, 2018 - 2022 Martin Karing, 2016 - $(_CurrentYear) Andrii Kurdiumov</Copyright>
<RepositoryUrl>https://github.com/kant2002/ConfuserEx.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<PropertyGroup Label="Language">
<NeutralLanguage>en</NeutralLanguage>
</PropertyGroup>

<PropertyGroup Label="SourceLink">
<SourceLinkServerType>GitHub</SourceLinkServerType>
<SourceLinkOriginUrl>$(RepositoryUrl)</SourceLinkOriginUrl>
</PropertyGroup>
</Project>
38 changes: 38 additions & 0 deletions Tests/Confuser.Core.Test/Project/ConfuserProjectTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System.IO;
using System.Xml;
using Confuser.Core.Project;
using Xunit;

namespace Confuser.Core.Test {
public class ConfuserProjectTest {
[Fact]
public void SerializeConfuserProjectSuccessfully() {
var proj = new ConfuserProject();
proj.BaseDirectory = @"c:\obfuscation\input";
proj.OutputDirectory = @"c:\obfuscation\output";
proj.Debug = true;
proj.Add(new ProjectModule() {
Path = @"c:\obfuscation\input\test.dll"
});
proj.Add(new ProjectModule() {
Path = @"c:\obfuscation\input\test2.dll"
});
proj.ProbePaths.Add(@"c:\obfuscation\input\bin");

var xmlDoc = proj.Save();
var stringWriter = new StringWriter();
var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Indent = true });
xmlDoc.WriteTo(xmlWriter);
xmlWriter.Flush();

Assert.Equal(
@"<?xml version=""1.0"" encoding=""utf-16""?>
<project outputDir=""c:\obfuscation\output"" baseDir=""c:\obfuscation\input"" debug=""true"" xmlns=""http://confuser.codeplex.com"">
<module path=""c:\obfuscation\input\test.dll"" />
<module path=""c:\obfuscation\input\test2.dll"" />
<probePath>c:\obfuscation\input\bin</probePath>
</project>".Replace("\r\n", "\n"),
stringWriter.ToString().Replace("\r\n", "\n"));
}
}
}
Loading