Reputation: 59
I'm using NAudio (1.7.3.0) and NAudio.lame ( 1.0.3.3048 ) to convert Wav to Mp3 audio format.
My code(calling assembly) is strongly named , VS2015 complains that Naudio/NAudioLame dlls should be strongly named too, so I did singed Naudio dlls with strong name. now Unfortunatley I'm build error as
Note : I have strongly named both(Naudio) dlls.
Here is the code.
try
{
string filePath = @"D:\Lame\Wav\25mb.wav";
string outputPath = @"D:\Lame\mp3\25mb.mp3";
using (WaveFileReader wavReader = new WaveFileReader(filePath))
using (WaveStream pcm = WaveFormatConversionStream.CreatePcmStream(wavReader))
using (LameMP3FileWriter fileWriter = new LameMP3FileWriter(outputPath, pcm.WaveFormat, LAMEPreset.VBR_90))
{
pcm.CopyTo(fileWriter);
}
MessageBox.Show("Converted !");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Build error on : LameMP3FileWriter(outputPath, pcm.WaveFormat, LAMEPreset.VBR_90)
Error : The type 'WaveFormat' is defined in an assembly that is not referenced. You must add a reference to assembly 'NAudio, Version=1.7.3.0, Culture=neutral, PublicKeyToken=null.
Any help is appreciate !
Upvotes: 0
Views: 362
Reputation: 49482
You need to build your strongly named NAudio first, and then when you build NAudio.Lame, make sure it references your strongly named NAudio dll
Upvotes: 0