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
2 changes: 1 addition & 1 deletion Examples/Example2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static void Run() {
body.Instructions.Add(OpCodes.Ret.ToInstruction());

// Save the assembly to a file on disk
mod.Write(@"C:\saved-assembly.dll");
mod.Write(@"saved-assembly.dll");
}
}
}
4 changes: 2 additions & 2 deletions Examples/Example3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void Run() {
mod.Kind = ModuleKind.Console;

// Add the module to an assembly
var asm = new AssemblyDefUser("MyAssembly", new Version(1, 2, 3, 4), null, null);
var asm = new AssemblyDefUser("MyAssembly", new Version(1, 2, 3, 4), null, UTF8String.Empty);
asm.Modules.Add(mod);

// Add a .NET resource
Expand Down Expand Up @@ -72,7 +72,7 @@ public static void Run() {
epBody.Instructions.Add(OpCodes.Ret.ToInstruction());

// Save the assembly to a file on disk
mod.Write(@"C:\saved-assembly.exe");
mod.Write(@"saved-assembly.exe");
}
}
}
2 changes: 1 addition & 1 deletion Examples/Example4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace dnlib.Examples {
public class Example4 {
public static void Run() {
// This is the file that will be created
string newFileName = @"C:\ctor-test.exe";
string newFileName = @"ctor-test.exe";

// Create the module
var mod = new ModuleDefUser("ctor-test", Guid.NewGuid(),
Expand Down
2 changes: 1 addition & 1 deletion Examples/Example5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace dnlib.Examples {
/// </summary>
public class Example5 {
public static void Run() {
string sectionFileName = @"c:\section{0}.bin";
string sectionFileName = @"section{0}.bin";

// Open the current mscorlib
var mod = ModuleDefMD.Load(typeof(int).Module);
Expand Down
2 changes: 1 addition & 1 deletion Examples/Example6.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Example6 {
public static void Run() => new Example6().DoIt();

void DoIt() {
string destFileName = @"c:\output.dll";
string destFileName = @"output.dll";

// Open the current module
var mod = ModuleDefMD.Load(typeof(Example6).Module);
Expand Down
2 changes: 1 addition & 1 deletion Examples/Examples.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net45</TargetFrameworks>
<TargetFrameworks>net10.0;net45</TargetFrameworks>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
Expand Down