简体   繁体   English

C#SDK未将Smartsheet-API命名空间显示为可用参考

[英]C# SDK Not Showing the Smartsheet-API namespace as an available reference

I'm having a problem understanding how to use the API 1.1 in Visual Studio 2010 Professional. 我在理解如何在Visual Studio 2010 Professional中使用API​​ 1.1时遇到问题。 Image 1 below proves the install of the SDK was successful. 下图1证明了SDK的安装成功。 This is the good news. 这是个好消息。

My problem is I can't reference the Smartsheet.API namespace. 我的问题是我无法引用Smartsheet.API命名空间。 When I try to do this via "using Smartsheet.API", I get a compile error. 当我尝试通过“使用Smartsheet.API”执行此操作时,出现编译错误。 I don't understand why I don't see "Smartsheet.API" in my project's list of references (see Image 2) below. 我不明白为什么我在下面的项目引用列表中看不到“ Smartsheet.API”(请参见图2)。

Any ideas on what I'm doing wrong here? 对我在这里做错的任何想法吗?

Image 1: [1]: http://i.stack.imgur.com/x9RlU.png Image 2: [1]: http://i.stack.imgur.com/mjb3I.png 图片1:[1]: http//i.stack.imgur.com/x9RlU.png图片2:[1]: http//i.stack.imgur.com/mjb3I.png

我认为您必须在项目中添加对外部程序集的引用(在本例中为dll),然后可以使用该程序集中的名称空间。

It seems that the package is partially installed and Visual Studio is confused. 似乎该程序包已部分安装,并且Visual Studio感到困惑。

I would try the following steps to fully remove the entire package. 我将尝试以下步骤来完全删除整个程序包。

  1. In the Package Manager Console type: 在“程序包管理器控制台”中,输入:

     Uninstall-Package smartsheet-csharp-sdk -Force 
  2. Verify that the packages.conf file does not have a line like the following or remove it if it does: 验证packages.conf文件中没有类似以下内容的行,或者删除该行:

     <package id="smartsheet-csharp-sdk" version="1.0.7.0" targetFramework="net45" /> 
  3. Close Visual Studio, open the *.csproj (AgileAddin.csproj) file in notepad and verify that it does not have a reference the package like the following, if it does remove the block. 关闭Visual Studio,在记事本中打开* .csproj(AgileAddin.csproj)文件,并确认它没有引用以下软件包,如果确实删除了该块。

     <Reference Include="smartsheet-csharp-sdk"> <HintPath>..\\packages\\smartsheet-csharp-sdk.1.0.7.0\\lib\\net40\\smartsheet-csharp-sdk.dll</HintPath> </Reference> 

Now open Visual Studio and install the package again in the Package Manager Console with the command: 现在打开Visual Studio,并使用以下命令在程序包管理器控制台中再次安装程序包:

Install-Package smartsheet-csharp-sdk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM