Splunk Dev

C# SDK examples

rmorlen
Splunk Employee
Splunk Employee

I downloaded the SDK, opened the project in VS 2012. Built the solution. Setup .splunkrc. None of the examples work. Many of the Unit Tests fail. Where is the proper place to get help on this?

Tags (2)
1 Solution

rmorlen
Splunk Employee
Splunk Employee

The issue was related to HOMEDRIVE environment variable mapped to a remote machine. A workaround, in this case, is to create a new env variable (and use it in the Command.Splunkrc()that points to local C:\ and put the .splunkrc in this new location.

Another option is to modify Command.cs to the following:

//  const string ToExpand = "%HOMEDRIVE%%HOMEPATH%";

const string ToExpand = "%LOCALAPPDATA%";
</code></pre>

This will look for the file in the c:\users\myuserid\AppData\Local directory.

View solution in original post

rmorlen
Splunk Employee
Splunk Employee

The issue was related to HOMEDRIVE environment variable mapped to a remote machine. A workaround, in this case, is to create a new env variable (and use it in the Command.Splunkrc()that points to local C:\ and put the .splunkrc in this new location.

Another option is to modify Command.cs to the following:

//  const string ToExpand = "%HOMEDRIVE%%HOMEPATH%";

const string ToExpand = "%LOCALAPPDATA%";
</code></pre>

This will look for the file in the c:\users\myuserid\AppData\Local directory.

Neeraj_Luthra
Splunk Employee
Splunk Employee

What specific issues are you running into? Can you provide more detail? Feel free to email me directly and I would be happy to look into it.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...