From b63ad0aed00e78897df8c6c9eea5f0a92ea43cd4 Mon Sep 17 00:00:00 2001
From: Cal <42492716+ly3027929699@users.noreply.github.com>
Date: Fri, 6 Dec 2024 10:51:22 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=91=E5=B8=83=E7=9A=84ba?=
=?UTF-8?q?t=EF=BC=8C=E4=BD=BF=E7=94=A8=E7=9B=B8=E5=AF=B9=E8=B7=AF?=
=?UTF-8?q?=E5=BE=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Console/Console.csproj | 9 ++++++++-
Console/Program.cs | 12 ++++++------
FileUtilsCs/FileUtilsCs.csproj | 1 +
FileUtilsCs/publish.bat | 1 +
4 files changed, 16 insertions(+), 7 deletions(-)
create mode 100644 FileUtilsCs/publish.bat
diff --git a/Console/Console.csproj b/Console/Console.csproj
index 05aa491..733052a 100644
--- a/Console/Console.csproj
+++ b/Console/Console.csproj
@@ -1,10 +1,17 @@
Exe
- .net8
+ net8.0
12
enable
true
true
+ ../bin
+
+
+ FileUtilsCs.dll
+ PreserveNewest
+
+
diff --git a/Console/Program.cs b/Console/Program.cs
index 93e5012..587268c 100644
--- a/Console/Program.cs
+++ b/Console/Program.cs
@@ -20,18 +20,18 @@ unsafe
(char*)Unsafe.AsPointer(ref Unsafe.AsRef(in "C:\\B".GetPinnableReference())));
Console.ReadKey();
- [DllImport("E:\\Program\\AOTTools\\FileUtilsCs\\bin\\Debug\\net8.0\\win-x64\\native\\FileUtilsCs.dll", EntryPoint = "TestLog")]
+ [DllImport("FileUtilsCs.dll", EntryPoint = "TestLog")]
static extern void TestLog();
- [DllImport("E:\\Program\\AOTTools\\FileUtilsCs\\bin\\Debug\\net8.0\\win-x64\\native\\FileUtilsCs.dll", EntryPoint = "SetLogInfo")]
+ [DllImport("FileUtilsCs.dll", EntryPoint = "SetLogInfo")]
static extern unsafe void SetLogInfo(delegate* logInfoFunc);
- [DllImport("E:\\Program\\AOTTools\\FileUtilsCs\\bin\\Debug\\net8.0\\win-x64\\native\\FileUtilsCs.dll", EntryPoint = "SetLogError")]
+ [DllImport("FileUtilsCs.dll", EntryPoint = "SetLogError")]
static extern unsafe void SetLogError(delegate* logInfoFunc);
- [DllImport("E:\\Program\\AOTTools\\FileUtilsCs\\bin\\Debug\\net8.0\\win-x64\\native\\FileUtilsCs.dll", EntryPoint = "TestLogError")]
+ [DllImport("FileUtilsCs.dll", EntryPoint = "TestLogError")]
static extern unsafe void TestLogError();
- [DllImport("E:\\Program\\AOTTools\\FileUtilsCs\\bin\\Debug\\net8.0\\win-x64\\native\\FileUtilsCs.dll", EntryPoint = "Tick")]
+ [DllImport("FileUtilsCs.dll", EntryPoint = "Tick")]
static extern unsafe void Tick();
- [DllImport("E:\\Program\\AOTTools\\FileUtilsCs\\bin\\Debug\\net8.0\\win-x64\\native\\FileUtilsCs.dll", EntryPoint = "MoveFolder")]
+ [DllImport("FileUtilsCs.dll", EntryPoint = "MoveFolder")]
static extern unsafe void MoveFolder(char* sourcePath, char* destinationPath);
static unsafe void LogInfo(nint obj)
diff --git a/FileUtilsCs/FileUtilsCs.csproj b/FileUtilsCs/FileUtilsCs.csproj
index fcce192..1c6c71a 100644
--- a/FileUtilsCs/FileUtilsCs.csproj
+++ b/FileUtilsCs/FileUtilsCs.csproj
@@ -6,6 +6,7 @@
enable
true
true
+ ../bin
diff --git a/FileUtilsCs/publish.bat b/FileUtilsCs/publish.bat
new file mode 100644
index 0000000..20d7903
--- /dev/null
+++ b/FileUtilsCs/publish.bat
@@ -0,0 +1 @@
+dotnet publish -r win-x64 -c Debug -o ../bin
\ No newline at end of file