Debashisenator
Debashisenator

Reputation: 1739

How to resolve the following error shown while trying to build the code for Azure DevOps on Visual Studio 2022 on Windows Server 2019

##[error]C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1217,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.5 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...

Upvotes: 5

Views: 18452

Answers (4)

João Vitor
João Vitor

Reputation: 1

My solution was to use the VSBuild@1 task and use an old version of Visual Studio, I'm using Visual Studio 2013 but I'm not sure if it's the only one that works. I also set my vmImage pool with windows-2019.

Upvotes: 0

Mujtaba Hassan
Mujtaba Hassan

Reputation: 2493

Changing from

vmImage: 'windows-latest'

to

vmImage: 'windows-2019'

worked for me. It used to work earlier because 2019 was latest, now the latest is 2022 and there is issue with that.

https://github.com/actions/runner-images/issues/5055

Upvotes: 1

Mxo Sibeko
Mxo Sibeko

Reputation: 147

my solution was to upgrade any project targeting .Net Framework 4.5 to 4.7.2 and then building on Visual Studio 2019 instead of 2022, same Win Server 2019

Upvotes: 1

Debashisenator
Debashisenator

Reputation: 1739

I got this issue resolved by downgrading from Visual Studio 2022 to Visual Studio 2014. I uninstalled Visual Studio 2022 and installed Visual Studio 2014, and the rest fell in place. My installation is now up and running.

Upvotes: 0

Related Questions