Closed avriltank closed 2 years ago
thank you, may I ask for more details? What was the Assembly assembly
if you check the Locals when this happens.
Sorry, I don't quite understand what you mean! This is my command to issue a single file:
dotnet publish -c release -r win-x64 /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained true -o publish_ dir_ win_ single.
For the source code of peachpie, I haven't had time to read it! I think it seems that the incompatibility problem is caused by the code shown in the figure below:
The exception is thrown by DeendencyContext.Default.
I have found a workaround on StackOverflow at https://stackoverflow.com/questions/64818343/publishing-error-for-single-file-net-5-project-due-to-3rd-party-dependencies
Although from the exception it seems, /p:PublishSingleFile=true
won't allow us to do what we want to do :) I'll try to workaround it. For now, omitting PublishSingleFile
might help.
Thanks for you!This is a great project that will have high performance Net and simple and fast PHP. I'm trying to learn it and introducing it to my friends At least now it performs very well in synchronous code, and I look forward to the asynchronous feature
thank you!
There is no result when i build a single exe for .net core web project!
There is no result when i build a single exe for .net core web project!
Hi,You should add script reference for your php library when publish a single file,like this
Context.AddScriptReference(System.Reflection.Assembly.Load("phpapp"));
The problem occurred in Net5 or above, which is a comparison of Microsoft's official website Net core URL link