Compile Error in .NetFramework 4.8 - error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.8" were not found.

Answered

I got the following error in compiling .NetFramework 4.8 ASP.NET MVC project in TeamCity:
The Build Step configs are:

Runner type: MSBuild
MSBuild version: Microsoft Build Tools 2017
MSBuild ToolsVersion: 15.0
Run platform: x86

 

error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.8" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[14:30:22]_CleanRecordFileWrites

We are using TeamCity Enterprise 2018.2.1 (build 61078)



Where is the problem? What I missed?

 

1 comment
Comment actions Permalink

Hi Saeid,

 

builds are run in build agents, under the user that runs the build agent process. Please make sure that your build agents' machines have the required .NET SDK installed and that the user running the process has access to them. This is the most common situation here and what the error seems to point at.

 

While I am not aware of issues running .NET 4.8 with prior versions, we only confirmed that it works with the 2019.1 release, so you might want to consider upgrading: https://youtrack.jetbrains.com/issue/TW-59226

0

Please sign in to leave a comment.