Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




GEM-2915 - fixed in 3.5.4, but my program still doesn't work

api

I still seem to be getting an error using the .NET client API to access Version Attributes.

The REST exception I used to get is now gone, but

attributes = sm.ProjectsService.GetProjectVersionAttributes(version.ProjectID)

fails when I later try to reference attributes, saying "Object reference not set to an instance of an object".. I know that the project ID is correct, as it's being retrieved from a VersionEN object which correctly returns a VersionNumber when asked to.

I'll post the full code, but this isn't my development machine, so I'll need to go do some copying.

Any ideas?

 

EDIT:

Complete code:

versions = m_smProxyManager.ProjectsService.GetVersions((int)selectedProject.ProjectID);

versionHash = new Hashtable();

lstVersions.Items.Clear();

for (int i = 0; i < versions.Length; i++)

{

    VersionEN version = versions[ i ];

    if (!version.VersionReleased)

    {

        String versionName = version.VersionName;

        this.versionsByName.Add(versionName);

        versionHash.Add(versionName, version);

        lstVersions.Items.Add(versionName);

    }

}

...

selectedVersion = (VersionEN)versionHash[lstVersions.SelectedItem];

...

FormReleaseNotes frn = new FormReleaseNotes(m_smProxyManager,notes,selectedVersion);

DiagnosticsManager.TraceMessage("Release notes opened with version " + selectedVersion.VersionNumber + " and notes " + notes);

frn.Show();

...

public FormReleaseNotes(CounterSoft.Gemini.WebServices.ServiceManager sm, String initialText,VersionEN version)

    InitializeComponent();

    m_smProxyManager = sm;

    releaseNotes = initialText;

    this.textBox1.Text = releaseNotes;

    this.version = version;

    attributes = m_smProxyManager.ProjectsService.GetProjectVersionAttributes(version.ProjectID);

    foreach (ProjectVersionAttributeEN att2 in attributes)

    ...

alitheg
· 1
alitheg
Replies (3)
helpful
0
not helpful

Please send your complete solution to support at countersoft dot com

I have just tested all attributes via REST and all seem ok.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Should be on its way now.

I've had to remove the "bin" and "obj" directories as the company email server does not permit executable files in attachments.


alitheg
· 1
alitheg
helpful
0
not helpful

Solved. My programming mistake. You'll notice I had the foreach loop looking for att in attributes, instead of att2 in attributes.

Thanks for the help


alitheg
· 1
alitheg