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;
Could not copy the file "C:\Projects\sample\project.Blurring\project.Blurring.exe" because it was not found.
Could not copy the file "C:\Projects\sample\project.Blurring\project.Blurring.exe" because it was not found.
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
Destination Unknown
Adding my own exe file works. But why?
Bobby Bob
Bobby Bob3w ago
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
ero
ero3w ago
i would say this is fairly irrelevant. a solution isn't ".net based", it can contain many types of projects.
Bobby Bob
Bobby Bob3w ago
Hmmm... but how would these interact with each other?
ero
ero3w ago
what do you mean?
Bobby Bob
Bobby Bob3w ago
Like say there's a function in a python file And a C# file needs to call that function
ero
ero3w ago
what c# file?
Bobby Bob
Bobby Bob3w ago
How does that work? @ero
ero
ero3w ago
they made no mention of c#
Bobby Bob
Bobby Bob3w ago
Just a standard C# code Oh I thought "solution" implictly meant C#
ero
ero3w ago
far from it a solution just collects projects that are compatible with the format that might be c#, py, c, c++, rs(?), js/ts
Destination Unknown
Exactly
jcotton42
jcotton423w ago
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.
Bobby Bob
Bobby Bob3w ago
Ooooo, that's interesting.... I never knew that python and C++ was supported as a solution
Destination Unknown
To get back to the question; why do I need to add an .exe file myself? to get it running with Docker

Did you find this page helpful?