0

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

Kim Brandl
  • 13,125
  • 2
  • 16
  • 21
Ken
  • 11
  • 1

2 Answers2

0

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

khazrim
  • 11
  • 1
0

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
Brett
  • 2,502
  • 19
  • 30
  • Thanks for the responses. I tried using a new solution and was able to successfully install the smartsheet sdk. I'm going to move forward with my smartsheet development in the new solution and then reference between my original solution and the new solution. – Ken Jul 24 '15 at 21:12