Skip to content

Excel demo requires Windows SDK? #5718

@imba-tjd

Description

@imba-tjd

Issue description

I'm trying https://github.com/dotnet/samples/tree/main/core/extensions/ExcelDemo

& "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" "-t:Restore;Build" ExcelDemo.csproj:

It seems to requre WinSDK. If so, I think it should be documented in example and dotnet/docs

MSBuild version 17.5.0+6f08c67f3 for .NET Framework
Build started 2023/3/1 20:31:08.
Included response file: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.rsp

Project "C:\dotnet\ex\ExcelDemo.csproj" on node 1 (Restore;Build target(s)).
_GetAllRestoreProjectPathItems:
  Determining projects to restore...
Restore:
  X.509 certificate chain validation will use the default trust store selected by .NET.
  X.509 certificate chain validation will use the default trust store selected by .NET.
  Assets file has not changed. Skipping assets file writing. Path: C:\dotnet\ex\obj\project.assets.json
  Restored C:\dotnet\ex\ExcelDemo.csproj (in 78 ms).

  NuGet Config files used:
      C:\Users\xxx\AppData\Roaming\NuGet\NuGet.Config
      C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config

  Feeds used:
      https://nuget.cdn.azure.cn/v3/index.json
      C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
  All projects are up-to-date for restore.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2977,5): warning MSB3084
: Task attempted to find "AxImp.exe" in two locations. 1) Under the "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tool 
s\" processor specific directory which is generated based on SdkToolsPath 2) The x86 specific directory under "C:\Program Files (x86)\Micros 
oft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\" which is specified by the SDKToolsPath property. You may be able to solve the problem by doing 
 one of the following:  1) Set the "SDKToolsPath" property to the location of the Microsoft Windows SDK. [C:\dotnet\ex\ExcelDemo.csproj]     
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2977,5): error MSB3086: 
Task could not find "AxImp.exe" using the SdkToolsPath "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\" or the re 
gistry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.8.1\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set  
and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed [C:\do 
tnet\ex\ExcelDemo.csproj]
Done Building Project "C:\dotnet\ex\ExcelDemo.csproj" (Restore;Build target(s)) -- FAILED.


Build FAILED.

"C:\dotnet\ex\ExcelDemo.csproj" (Restore;Build target) (1) ->
(ResolveComReferences target) ->
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2977,5): warning MSB30 
84: Task attempted to find "AxImp.exe" in two locations. 1) Under the "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 To 
ols\" processor specific directory which is generated based on SdkToolsPath 2) The x86 specific directory under "C:\Program Files (x86)\Micr 
osoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\" which is specified by the SDKToolsPath property. You may be able to solve the problem by doi 
ng one of the following:  1) Set the "SDKToolsPath" property to the location of the Microsoft Windows SDK. [C:\dotnet\ex\ExcelDemo.csproj]   


"C:\dotnet\ex\ExcelDemo.csproj" (Restore;Build target) (1) ->
(ResolveComReferences target) ->
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2977,5): error MSB3086 
: Task could not find "AxImp.exe" using the SdkToolsPath "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\" or the  
registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.8.1\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is se 
t and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed [C:\
dotnet\ex\ExcelDemo.csproj]

    1 Warning(s)
    1 Error(s)

Target framework

Check the .NET target framework(s) being used, and include the version number(s).

  • .NET Core
  • .NET Framework
  • .NET Standard
dotnet --info output or About VS info
Microsoft Visual Studio Community 2022
版本 17.5.0
VisualStudio.17.Release/17.5.0+33414.496
Microsoft .NET Framework
版本 4.8.09032

已安装的版本: Community

Azure 应用服务工具 3.0.0 版   17.5.317.37931
Azure 应用服务工具 3.0.0 版

C# 工具   4.5.0-6.23109.5+6a5a63bbc9f4449d9bd1e95a8f9624939c3ccdc3
IDE 中使用的 C# 组件。可能使用其他版本的编译器,具体取决于你的项目类型和设置。

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet 包管理器   6.5.0
Visual Studio 中的 NuGet 包管理器。有关 NuGet 的详细信息,请访问 https://docs.nuget.org/

Visual Basic 工具   4.5.0-6.23109.5+6a5a63bbc9f4449d9bd1e95a8f9624939c3ccdc3
IDE 中使用的 Visual Basic 组件。可能使用其他版本的编译器,具体取决于你的项目类型和设置。

Visual F# Tools   17.5.0-beta.23053.5+794b7c259d9646a7eb685dad865aa27da7940a21
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
Visual Studio 的 AI 协助开发。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions