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
windows-latest missing reference assemblies for .NETFramework,Version=4.6.1 #5055
Comments
Hi @chriscfox Lets check whether it is sufficient to mitigate the issue by adding these components.
|
@chriscfox gentle ping on this |
Hi All. Apologies for the delay. I have now tried this. It fails for me with exit code 1. Being a noob, let me elaborate by saying:
|
Strangely, my build now seems to be working with windows-latest. So I wonder if something else got fixed in the interim? |
I have the same problem and when trying to use the suggested solution by @shilovmaksim. Even after installation I still get the error message. PowerShell:
Build:
|
Hi @chriscfox, @IwryRozemberg . Provided snippet can be executed inline. If you are calling it from the script then repo checkout should come first.
|
|
or "runs-on: windows-2019" ? |
@OZZlE the issue seems to affect only windows-2022 |
@IwryRozemberg @chriscfox it turned out that VS2022 doesn't have Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToAdd = @(
"Microsoft.Net.Component.4.6.2.TargetingPack"
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
if ($process.ExitCode -eq 0)
{
Write-Host "components have been successfully added"
}
else
{
Write-Host "components were not installed"
exit 1
} |
As a palliative solution I changed the pipeline version to windows-2019, over the weekend, I will update the .NET in the project. |
Hi @chriscfox , @IwryRozemberg .
https://github.com/shilovmaksim/test-repo/runs/5213299825?check_suite_focus=true |
Hi @shilovmaksim and @miketimofeev . I notice you're still tagging me in your proposals. And I don't want to appear ungrateful. But as of my message of 4 days ago, my issue was resolved. I guess I should have closed the issue, but then @IwryRozemberg passengered onto it, so I though I would leave it open for them. Anyway, I just thought I would mention this as I didn't want you to think I was being rude and ignoring your suggestions. |
@IwryRozemberg please feel free to open a new issue. |
Yes but "windows-latest" used to be Windows 2019 and we didn't notice that Github changed to 2022. Our code is made for 2019 and we have that on our servers so makes sense for us to just change. Probably never should have had latest, very future inconsiderate :P |
Yes - that's right. When It appears that changing the Github action runner to |
I know this makes no sense, but my experience was:
That last step makes no sense and I can't explain it. I can only relate my experience. Did something else also happen? I don't know. . |
It's because |
Description
Azure Pipeline shows:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1217,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
on windows-latest. Reverting to windows-2019 fixes it.
I hope I am clear enough. A bit of a noob, I am afraid.
Virtual environments affected
Image version and build link
windows-latest versus windows-2019
Is it regression?
No response
Expected behavior
No response
Actual behavior
No response
Repro steps
The error is produced.
The text was updated successfully, but these errors were encountered: