Must be doing something stupid

I must be doing something stupid here…I’m sure this isn’t rocket science.

I’m going through the Getting Started Turorial using .Net.
Build the Producer and Consumer csproj files and associated classes.

When I try to produce events: dotnet run --project producer.csproj $(pwd)/getting-started.properties

I get:

Please provide the configuration file path as a command line argument
Unhandled exception. System.IO.FileNotFoundException: 
The configuration file 'kafka-dotnet-getting-started' was not found and is not optional. The physical path is 'C:\Mas_Applications\POCs\kafka-dotnet-getting-started'.
   at  Microsoft.Extensions.Configuration.FileConfigurationProvider.HandleException(ExceptionDispatchInfo info)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load()
   at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at Consumer.Main(String[] args) in C:\Mas_Applications\POCs\kafka-dotnet-getting-started\consumer.cs:line 14

Tried in a command window and PowerShell, no luck.
It’s even saying the error is in the consumer when I’m not even running the consumer, I’m trying to start the Producer.
Both compiles were successful.

Any help would be greatly appreciated,
Thanks is advance.

1 Like

I’ve got stuck on the same issue but it’s very simple. Just instead of $(pwd)/getting-started.properties put the path to getting-started.properties file. For the path put \ instead of /s in the path. That’s all.

I faced this problem today, If you have gitbash run this command there in the same directory.