Not sure what errors you're seeing, but I just verified that it works. Using Studio '08 I did the following:
- Created a new WinForm VB Smart Device application targeting CF 2.0
- Added a reference to OpenNETCF.dll (version 2.2)
- Added a single button to the Form
- Double-clicked the button in the designer to get a handler and then made my code look like this:
Imports OpenNETCF.Media
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.Show("With empty ctor")
Dim player1 As New SoundPlayer()
player1.SoundLocation = "\Windows\infendo.wav"
player1.Play()
MessageBox.Show("With filename in ctor")
Dim player2 As New SoundPlayer("\Windows\infendo.wav")
player2.Play()
End Sub
End Class