none
In a WPF app for 8.1, what assembly do I reference for ConnectionProfileFilter RRS feed

  • Question

  • I'm trying to reuse some code from a store app, and need this class.

    The docs appear to say ConnectionProfileFilter should be accessible from a desktop app but I can't figure out what I need to reference.  I tried adding a reference to everything in C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades but it still reports

    error CS0246: The type or namespace name 'ConnectionProfileFilter' could not be found (are you missing a using directive or an assembly reference?)

    When I compile

     

    Anthony Wieser | Wieser Software Ltd | www.wieser-software.com

    Wednesday, March 18, 2015 4:13 PM

Answers

  • According to multiple articles, seems that you have to add a reference to “Windows” (Windows.winmd metadata), which is available if you close the solution, then edit the project file (.csproj) manually. Find the TargetFrameworkVersion property in some of <PropertyGroup>, then insert the next line:

        <TargetPlatformVersion>8.1</TargetPlatformVersion>

    After reloading the project, you should see a new group called “Windows 8.1” in Add Reference dialog, where you can select “Windows”.

    If it also ask for System.Runtime assembly and you do not find it in the dialog, then click “Browse” and add a reference to file (usually “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1\System.Runtime.dll”).

    Wednesday, March 18, 2015 6:41 PM

All replies

  • According to multiple articles, seems that you have to add a reference to “Windows” (Windows.winmd metadata), which is available if you close the solution, then edit the project file (.csproj) manually. Find the TargetFrameworkVersion property in some of <PropertyGroup>, then insert the next line:

        <TargetPlatformVersion>8.1</TargetPlatformVersion>

    After reloading the project, you should see a new group called “Windows 8.1” in Add Reference dialog, where you can select “Windows”.

    If it also ask for System.Runtime assembly and you do not find it in the dialog, then click “Browse” and add a reference to file (usually “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1\System.Runtime.dll”).

    Wednesday, March 18, 2015 6:41 PM
  • Thanks for that.  I'd forgotten I'd originally done it as <TargetPlatformVersion>8.0</...>

    Anthony Wieser | Wieser Software Ltd | www.wieser-software.com

    Wednesday, March 18, 2015 10:15 PM