Can't reference System.Windows.Media.AudioFormat in a universal app

I have a bit of a reason here: I am developing a universal app targeting Windows 8.1. In this application, I need to use System.Windows.Media.AudioFormat.

My projects already include links to Windows 8.1 and Windows Phone 8.1 respectively, since I started with a universal app. The Object Browser tells me that both assemblies include System.Windows.Media.AudioFormat

- but whenever I try to reference the class I get

"The type or namespace name 'Media' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)"

If I use Object Browser to view on Windows Phone 8.1 only, it shows Media.AudioFormat

as part System.Windows

. If I use Object Browser for my solution, it System.Windows

appears as empty. It looks like my link to Windows 8.1 / Windows Phone 8.1 doesn't add my entire solution.

If I use the handy little button in the Object Browser that allows me to add a link to whatever namespace is currently selected in the Object Browser, I get a message that System.Windows was added successfully, but I still get the error that I'm missing an assembly reference.

I understand that this class is part of System.Windows.dll.

. If I try to add this by looking at it, I get an error telling me that this dll cannot be added because it already automatically references the build system.

Visual Studio (Community 2013) does not allow me to remove references on Windows 8.1, so I cannot remove them and then add them again. Also I cannot change the target .NET framework to see if this error can occur.

I'm stumped. Can anyone help please?

+3
c # windows .net


source to share


No one has answered this question yet

Check out similar questions:

683
Error - Unable to access the IIS metabase
205
The type or namespace name does not exist in the namespace "System.Web.Mvc"
sixteen
Add NuGet Reference to Generic Windows Shared Project
1
System.Windows.Media in Windows Phone 8.1 applications
1
Can't use "dynamic" with Json.Net and Universal Apps
1
Accessing ASMX Help in Universal Windows Apps
1
Where is Isolated Inventory in PCL for Universal Applications?
1
nuget was unable to add references to Windows Phone 8.1 project in universal apps
0
How do I use search box control in Windows Phone 8.1 Universal Apps?
-1
Windows Phone - does not exist in the "System.Windows" namespace



All Articles
Loading...
X
Show
Funny
Dev
Pics