WeihanLi / dotnet-exec

dotnet execute with custom entry point, another dotnet run without project file
https://weihanli.github.io/dotnet-exec/
Apache License 2.0
45 stars 5 forks source link

Unhandled exception when using the advanced compiler #1

Closed Hachem-H closed 1 year ago

Hachem-H commented 2 years ago

image

I am running a basic script containing nothing but a Console.WriteLine, the program works fine using the default compiler, but as soon as I run it using the advanced compiler, it breaks and gives me an unhandled exception. So is the case with using -a.

WeihanLi commented 2 years ago

Thanks for the feedback, the advanced mode is not working because of the issue https://github.com/dotnet/roslyn/issues/61454

and the issue you met with is can not find the project file, it would look for the project file within the same directory, and you can specify the project file with the --project option.

The advanced mode is to analyze the project file to get the package references and global usings for compiling, currently had to use the default compiler, sorry for the inconvenience

Hachem-H commented 2 years ago

Ah I see thanks for the response, I don't think I was running this script through a project which is probably why it broke. In either way I was just pretty curious on how what the advanced compiler worked so I blindly plugged it in.

WeihanLi commented 2 years ago

Never mind, thanks for the feedback, removed the compiler type from readme for now

WeihanLi commented 1 year ago

Removed the advanced compiler, so I'm going to close this