I changed a few libraries to multi target net481;net8.0. This all builds perfectly on my local visual studio, also no runtime errors.
However when building this through our on prem team foundation server 2017 i always get following build errors:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v8.0" 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.
I have installed .Net sdk 8.0 on the server that contains the tf-agents, and even on the tf-server itself because i was getting desperate, but both of these yielded no results.
I tried msbuild first as step, then changed it to an msbuild step, but the same error occurs in both
What can i try?
I changed a few libraries to multi target net481;net8.0. This all builds perfectly on my local visual studio, also no runtime errors.
However when building this through our on prem team foundation server 2017 i always get following build errors:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v8.0" 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.
I have installed .Net sdk 8.0 on the server that contains the tf-agents, and even on the tf-server itself because i was getting desperate, but both of these yielded no results.
I tried msbuild first as step, then changed it to an msbuild step, but the same error occurs in both
What can i try?
Share Improve this question asked 2 days ago Thierry VerhaegenThierry Verhaegen 1852 silver badges12 bronze badges 2- MSBuild 15.0 does not support .NET 8. See here: learn.microsoft/de-de/dotnet/core/compatibility/sdk/8.0/… – Klaus Gütter Commented 2 days ago
- Link to the English version docs: learn.microsoft/en-us/dotnet/core/compatibility/sdk/8.0/… – Bright Ran-MSFT Commented yesterday
1 Answer
Reset to default 0As @Klaus Gütter
has stated, .NET 8 SDK is not available for Visual Studio 15.0 (Visual Studio 2017).
The minimum Visual Studio and MSBuild version to support .NET 8 SDK is Visual Studio 17.7 (Visual Studio 2022).
However, to target net8.0
, you must use version 17.8 or later.
For your case, it is recommended to install the latest version of Visual Studio 2022 (see Visual Studio 2022 release notes) on your machine where the agents are hosted.