Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when both VS2017 and VS2019 are installed on same server #11

Open
RoyLofthus opened this issue Dec 16, 2019 · 7 comments
Open

Error when both VS2017 and VS2019 are installed on same server #11

RoyLofthus opened this issue Dec 16, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@RoyLofthus
Copy link

The task started to fail after VS2019 was installed on the build-agent, By looking at the debug-output, it looks like the Get-VsPath method returns paths to both versions, instead of just the Latest. We've tried to specify a specific version, but with same result. Attached is a screenshot of the debug-output

image

@mmajcica mmajcica added the bug Something isn't working label Dec 16, 2019
@mmajcica
Copy link
Owner

Seems that one of the cmdlets in certain cases is returning an array. This I haven't thought to be possible. I made a quick fix, would it be possible for you to test it?
https://github.com/mmajcica/DevEnvBuild/releases/tag/2.0.4

If this works, I will publish it right away.

@mmajcica
Copy link
Owner

@RoyLofthus please ignore my last comment. I checked your logs and seems you were pointing to a specific version. This shouldn't be the case. It is late at my place right now, I'll take a better look at this tomorrow.

@dorChuck
Copy link

dorChuck commented Jul 7, 2020

Was this issue resolved? Yesterday I was receiving the same error message:
##[error]Cannot process argument transformation on parameter 'FileName'. Cannot convert value to type System.String.
I did not have diagnostics logs turned so I can't be sure if all the errors matched the ones received by @RoyLofthus .

After some research, I changed the task version from 1.* to 2.* to have VS 2019 compatibility. I was previously using it for VS 2017 solutions. I believe I got past this error by deleting the DevEnv task and adding a new one. I think I also had the solution file name in the project field after the version change. Which caused other errors.

@Pashanaz
Copy link

Pashanaz commented Mar 8, 2022

image

@Pashanaz
Copy link

Pashanaz commented Mar 8, 2022

image

@Metarract
Copy link

also ran into this issue - but for ours, the problem stemmed from having both VS professional and VS enterprise on the same machine

@Ezeckiel2517
Copy link

Also get the same error. This is cause by the function Get-VSPath that fails to narrow down the path of vs2019.
The code below in incorrect because it filtered all instance version 16 and UP.

if ($Version -eq "16.0" -and ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[16.0,)') -and $instance.installationPath) { return $instance.installationPath }

The correct filter should be
Get-VSSetupInstance | Select-VSSetupInstance -Version '[16.0,17.0)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants