I have a project (on Windows) that needs to be compiled remotely on Linux. It used to work some time ago (and address is valid, because it connects), but now I'm getting following error:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(190,5): error MSB4044: The "ValidateValidArchitecture" task was not given a value for the required parameter "RemoteTarget".
When I double click that error it opens Linux.targets file at following section:
<Target Name="_ValidateValidArchitecture" DependsOnTargets="_ResolveRemoteDebuggingTarget;_RequiresRemoteConnection">
<ValidateValidArchitecture Condition="'$(ValidateArchitecture)' != 'False' and '$(RequireRemoteConnection)' == 'true'"
Platform="$(Platform)"
RemoteTarget="$(ResolvedRemoteDebuggingTarget)"
FailOnInvalidArchitecture="false"
ProjectDir="$(ProjectDir)"
RemoteProjectDir="$(RemoteProjectDir)"
IntermediateDir="$(IntDir)"/>
</Target>
I couldn't find solution in Microsoft documentation. Has anyone encountered such a problem?
This problem can arise if you delete remote target machine, add it again and try to build the project immediately. The solution, at least for me, was to go to Project properties -> General -> Remote Build Machine and make sure that in there is only the IP address of your Linux machine, not some random numbers.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With