.net - 当我尝试使用 NUGet 构建 .Net 项目时遇到问题

标签 .net jenkins nuget devops

当我尝试使用 NUGet 构建 .NET 项目时,出现以下错误。我无法安装 .net 4.5.2,因为我的系统中已经安装了 4.7.1。我什至无法卸载 4.7.1,因为它是 Windows 10 附带的

C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(1098,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5.2" 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. [C:\Users\majid.jenkins\workspace\DotNetFreeStyle\SeleniumNUnitParam\SeleniumNUnitParam.csproj]

最佳答案

您需要安装 4.5.2 的定位包/开发人员包,而不是 4.5.2 框架。

参见https://www.microsoft.com/net/download/all在“开发者包”下

关于.net - 当我尝试使用 NUGet 构建 .Net 项目时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49540004/

相关文章:

nuget - 如何在 VS 之外正确安装 nuget 包并跟踪它们?

c# - 使用 ASP.Net Core 3.0 中的表单添加到模型的 IList

c# - .NET 无法使用 ODBC 5.3 连接到 MySQL?

.net - Destruct.ByTransforming<System.Type> 似乎没有生效

.net - 使用 HttpContext.Current.IsDebuggingEnabled 或 #if DEBUG 更好吗?

git - 通过 Groovy 访问 Jenkins 凭据存储

c# - Visual Studio for Mac : Logs work on a Project and are shown on Azure, 但在同一解决方案的另一个项目上失败

java - 如何在 Jenkins 中配置 Java 的 Checkstyle 配置

maven - Jenkins 果冻 View : How to aggregate multiple checkboxs to display in a single row?

c# - 从 Nuget 包中自动提取 native 和托管 DLL