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!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...