Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio remote Linux project compilation results in error MSB4044 despite the valid connection

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?

like image 587
serwus Avatar asked Oct 28 '25 17:10

serwus


1 Answers

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.

enter image description here

like image 164
Strahinja Radman Avatar answered Oct 31 '25 08:10

Strahinja Radman



Donate For Us

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