找不到用于英特尔C ++编译器17.0的构建工具(平台工具集=“英特尔C ++编译器17.0”)

时间:2019-12-19 13:48:06

标签: c visual-studio-2017

我有一个C代码(很旧的代码),我试图在VS17中运行,并且遇到此错误:

var type1Intervals = GetRetryIntervals(10, TimeSpan.FromMilliseconds(100), TimeSpan.FromMilliseconds(10000));
var type2Intervals = GetRetryIntervals(10, TimeSpan.FromMilliseconds(50), TimeSpan.FromMilliseconds(20000));

Policy
  .Handle<Exception>()
  .WaitAndRetryAsync(5, async (exception, retryCount) =>
  {
      if(exception is Type1Exception)
      {
          await Task.Delay(type1Intervals.ElementAt(retryCount)).ConfigureAwait(false);
      }
      if(exception is Type2Exception)
      {
          await Task.Delay(type2Intervals.ElementAt(retryCount)).ConfigureAwait(false);
      }
   }   
  })
  // execute the command
  .ExecuteAsync(async () => await DoSomething())
  .ConfigureAwait(false);

我不包含旧的代码。 有人可以提出问题所在吗?

1 个答案:

答案 0 :(得分:2)

这意味着您的项目配置是使用旧版本的Visual Studio完成的。

我建议您遵循VS建议:在解决方案窗格中,右键单击项目/解决方案,然后选择“重新定位解决方案”。这会将您的解决方案/项目配置更改为当前使用的Visual Studio(2017)。

由于项目/解决方案文件将被“重定向”过程覆盖,因此值得复制解决方案/项目文件(甚至是整个解决方案)  目录)),然后再开始执行“重新定位解决方案”过程,因此您可以恢复到之前的状态进行故障排除等。

一个例子: 我想构建一个旧版本的librdkafka,它最初是用VS2010构建的,我想使用VS2017。 当查看解决方案资源管理器窗格时,您可以在每个项目名称的左侧看到所有项目旁边都有“(Visual Studio 2010)”标题。

enter image description here

现在,我右键单击解决方案,然后选择“重新定位解决方案”: enter image description here

在对话框中,单击确定,就是这样。

相关问题