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!

Splunk Developers: Go Beyond the Dashboard with These .Conf25 Sessions

  Whether you’re building custom apps, diving into SPL2, or integrating AI and machine learning into your ...

Index This | How do you write 23 only using the number 2?

July 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk ITSI & Correlated Network Visibility

  Now On Demand   Take Your Network Visibility to the Next Level In today’s complex IT environments, ...