Hi everyone,
I ran into the following error today after updating visual studio 2019 to version 16.6:
unable to find the target operating system for the project
I tried a fair few things to get this going again and I’m assuming they’re not all necessary, but I’ll list them just in case:
– Clean solution
– Close visual studio
– Delete .vs folder
– Ensure that docker-compose is set as startup project
– Edit each project’s .csproj file and ensure that the DockerDefaultTargetOS value is set: Linux
– Edit docker-compose.dcproj and ensure that DocketTargetOS is set
– Restart computer
If you’re able to narrow it down at all I’d be interested in hearing what the actual cause is!
Cheers,
Chris
I removed the DockerDefaultTargetOS entry and deleted the launch settings file to get it working, then I suppose you can add the features back as you need.
LikeLiked by 1 person
Try change the project to target Project instead of Docker. That should changelaunchSettings.json:
{
“profiles”: {
“Intelex.Automation.DataImport”: {
“commandName”: “Project”
},
“Docker”: {
“commandName”: “Project”
}
}
}
LikeLike
I came across this developing on a windows machine using VS 2022 Enterprise. The version of ubuntu used by the Windows Subsystem for Linux (WSL) was old and did not support .NET6 (the version of .NET that my VS project was targeting) See https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#supported-distributions. I upgraded ubuntu used by WSL to the latest LTS version and the error went away.
LikeLiked by 1 person