Adding Python project to Solution in combination with Docker error
As the titel says, I have added a Python project to my Solution. My docker-compose file can find my Dockerfile in the Python project and all of that seems to be OK.
However, when I try to launch it all, I get the following message;
How can this error even occur in a default blank project? Like I get it; the exe file is not found, but why is it not generated in the first place.
16 Replies
Adding my own exe file works. But why?
this might not be relevant, but what's the rationale of integrating a python project to a .NET based solution? How do you expect these 2 components to even interact? There's no interop between these like there is interop between Blazor and JS
i would say this is fairly irrelevant. a solution isn't ".net based", it can contain many types of projects.
Hmmm... but how would these interact with each other?
what do you mean?
Like say there's a function in a python file
And a C# file needs to call that function
what c# file?
How does that work? @ero
they made no mention of c#
Just a standard C# code
Oh
I thought "solution" implictly meant C#
far from it
a solution just collects projects that are compatible with the format
that might be c#, py, c, c++, rs(?), js/ts
Exactly

Sure there is
- P/Invoke into CPython
- Use something like PythonNet that does the above for you
- IronPython (though that lags behind a lot)
- Some sort of IPC mechanism like pipes
Or just straight up invoking one executable from another and using stdin/stdout.
Ooooo, that's interesting....
I never knew that python and C++ was supported as a solution
To get back to the question; why do I need to add an
.exe
file myself? to get it running with Docker