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

298 views Asked by At

I'm having a problem understanding how to use the API 1.1 in Visual Studio 2010 Professional. Image 1 below proves the install of the SDK was successful. This is the good news.

My problem is I can't reference the Smartsheet.API namespace. When I try to do this via "using Smartsheet.API", I get a compile error. I don't understand why I don't see "Smartsheet.API" in my project's list of references (see Image 2) below.

Any ideas on what I'm doing wrong here?

Image 1: [1]: https://i.stack.imgur.com/x9RlU.png Image 2: [1]: https://i.stack.imgur.com/mjb3I.png

2

There are 2 answers

1
Brett On

It seems that the package is partially installed and Visual Studio is confused.

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:

    <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.

    <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:

Install-Package smartsheet-csharp-sdk
0
khazrim On

I think you must add reference in your project to external assembly(dll in this case) then you can use namespaces from this assembly.