How to find the references of documented classes - c#

I always struggle with finding references for documented classes. Take the HardwareIdentification class for example. Ik can find the documentation just fine here. In the documentation it says the class is in the System.Windows.Profile library. When however I open the 'Add reference' box this library is not found in either 'Assemblies.Framwork' or 'Assemblies.Extensions'. My search on Google results in find nothing. The NuGet package manager doesn't find this assembly either. So where is it? It's not in the GAC too.

The docs page mentions the Device Families and luckily provides the Windows SDK version that goes with that:
Windows Desktop Extension SDK (introduced v10.0.10240.0)
Windows Mobile Extension SDK (introduced v10.0.10240.0)
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
It also mentions that these Assemblies are for the WindowsRT / UWP development, it's likely these won't work elsewhere.
You can download the latest Windows SDK here:
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
The default installation location is:
C:\Program Files (x86)\Microsoft SDKs
C:\Program Files\Microsoft SDKs
If you're using Visual Studio 2017, you may need to enable the correct workloads for the SDK elements to be installed, my workload, for example, doesn't contain UWP.

Related

Could not locate the assembly "Microsoft.Expression.Drawing" in a WPF solution

I attempt to open and build a WPF solution in Visual Studio 2022. However, I get this build error:
Could not resolve this reference. Could not locate the assembly "Microsoft.Expression.Drawing". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
A similar issue has been posted before regarding Microsoft.Expression.Interactions here. However, how can I resolve the issue for Microsoft.Expression.Drawing? I've installed the Microsoft.Xaml.Behaviors.Wpf NuGet package.
The new Microsoft.Xaml.Behaviors.Wpf NuGet package replaces the System.Windows.Interactivity types that were shipped as part of Blend. It does not provide Microsoft.Expression.Drawing types.
The expression blend assemblies are deprecated and not shipped anymore. The Blend for Visual Studio SDK for .NET could be installed until Visual Studio 2017 and found here:
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.5\Libraries
You could download Visual Studio 2017 (Community is sufficient) and install it from there.
The original Blend SDK was still provided by Microsoft for download as standalone about a year or two ago, but now all the links are dead. Fortunately, there is a snapshot on Wayback Machine where you can reach the original download.
Other than that there are only unofficial sources like these NuGet packages:
Expression.Blend.Sdk.WPF
Microsoft.SDK.Expression.Blend
If you can, please stick to the original SDK, since unofficial packages may contain any code, including malware. They might impose a security risk or contain assemblies not allowed for redistribution.

Unsupported PCL Profile in Xamarin

I am working with the GoPro camera and trying to run a library made by r1pper. The project is described as
A lightweight c# library to access and control GoPro HERO Action cameras
It has a functional media browser based on Ambarella and GoPro App, it has also the full control of the camera, and live preview.
I am having trouble when trying to compile on the Xamarin IDE:
/Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/4.5/Microsoft.Common.targets: Error:
Unsupported PCL Profile '.NETPortable,Version=v4.0,Profile=Profile96'. (GoPro.Hero)
I have looked at a couple of forums and blogs that mention there is no fix for this bug:
http://forums.xamarin.com/discussion/164/pcl-build-problems
http://forums.xamarin.com/discussion/6334/problem-with-pcl-support-after-update
Is there really no workaround to this bug? Or am I misunderstanding something?
It looks like Profile 96 is not available in Mono.
I would change the Portable Class Library (PCL) project so it targets a different profile that is available on Mono. I would pick Profile 78 or Profile 259 since these are the ones generally recommended by Xamarin. You can do this in the Project Options under Build - General.
You may need to reinstall/retarget the NuGet packages after changing the project's PCL profile. If you are using a recent version of Xamarin Studio then it should tell you if this is the case in the Package Console window.
If I'm not mistaken you didn't install Visual Studio 2012/2013 (which Automatically configure MSBuild for PCL usage), in this case you should install and configure PCL on your system manually (it is only needed for development, not for distribution)
Here are the steps based on this Guide
1- Install .NET Framework 4.5.1
2- Install Mono MDK
3- Install PCL Library Tools : it will install MSBuild tools and Profile96
4-(Optional) Install PCL Reference Assemblies for newer PCL profiles
after installation copy 4.6 PCL assemblies from
C:\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6\PortableReferenceAssemblies.zip
to
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable
5-Reinstall Xamarin Suite

Using a Windows 8.0 Extension SDK component built using Visual C++ 2012 in a Windows 8.1 app

I have a Windows 8 app built using Visual Studio 2012. This app also uses a 3rd party component (packaged as an Extension SDK) also built using Visual Studio 2012. Since this component is written using C++, the Extension SDK has a dependency on Microsoft.VCLibs.110.00 (Visual C++ 2012 Runtime).
Now, I am trying to rebuild this app for Windows 8.1. When I try to build this project using using Visual Studio 2013, I see the following behavior (using Bing Maps SDK only as an example, this applies to any other SDK built using VS 2012):
Windows 8.1 C++ app referencing a Windows 8.0 Extension SDK component
Build fails with following errors:
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1803,5): warning MSB3842: Project "cppapp" depends upon SDK "Bing Maps for C#, C++, or Visual Basic v1.113.0601.2" which supports apps targeting "Windows 8.0". To verify whether "Bing Maps for C#, C++, or Visual Basic v1.113.0601.2" is compatible with "Windows 8.1", contact the SDK author or see http://go.microsoft.com/fwlink/?LinkID=309181.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1803,5): warning MSB3781: The SDK "Bing.Maps.Xaml, Version=1.113.0601.2" depends on the following SDK(s) "Microsoft.VCLibs, version=11.0", which have not been added to the project or were not found. Please ensure that you add these dependencies to your project or you may experience runtime issues. You can add dependencies to your project through the Reference Manager.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1803,5): error MSB3841: The SDK "Bing Maps for C#, C++, or Visual Basic" depends on the SDK "Microsoft.VCLibs, version=11.0", which is not compatible with "Windows 8.1". Please reference a version of SDK "Bing Maps for C#, C++, or Visual Basic" which supports "Windows 8.1".
Windows 8.1 C# app referencing a Windows 8.0 Extension SDK component
Build fails with following errors:
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1803,5): warning MSB3842: Project "csharpapp" depends upon SDK "Bing Maps for C#, C++, or Visual Basic v1.113.0601.2" which supports apps targeting "Windows 8.0". To verify whether "Bing Maps for C#, C++, or Visual Basic v1.113.0601.2" is compatible with "Windows 8.1", contact the SDK author or see http://go.microsoft.com/fwlink/?LinkID=309181.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1803,5): warning MSB3783: Project "csharpapp" depends upon SDK "Microsoft Visual C++ Runtime Package v11.0" which was released originally for apps targeting "Windows 8.0". To verify whether "Microsoft Visual C++ Runtime Package v11.0" is compatible with "Windows 8.1", contact the SDK author or see http://go.microsoft.com/fwlink/?LinkID=309181.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1803,5): error MSB3841: The SDK "Bing Maps for C#, C++, or Visual Basic" depends on the SDK "Microsoft.VCLibs, version=11.0", which is not compatible with "Windows 8.1". Please reference a version of SDK "Bing Maps for C#, C++, or Visual Basic" which supports "Windows 8.1".
WACK Errors
If I am somehow able to move forward (after changing the SDKManifest.xml of the Bing Maps SDK), I am able to create an app package. When I run WACK on my app, I get the following error:
cppapp takes a dependency on Microsoft Visual C++ Runtime Package (Microsoft.VCLibs.110.00) framework but is missing the framework dependency declaration in the manifest.
Has anyone else faced these problems. If yes, then how have you addressed them?
Visual Studio 2013 Update 1 (see this blog post for details) address these issues. It contains the appropriate fixes to unblock the above mentioned scenario and allows Windows 8.1 apps being built using VS2013 to reference SDKs which are marked as Windows 8 and/or built using Visual C++ 2012.
To reference bing map from a windows 8.1, you should use the SDK for windows 8.1 instead of the one for windows 8.
From here and here an C++ package need to be recompiled to be compatible with windows 8.1 so not much you can do if it is not yet updated and you don't have access to the source code...:
Extension SDKs that were authored in C++ and created for Windows 8
aren't compatible with Windows 8.1.

How can I get/run the 'gsharp' GUI wrapper for the csharp REPL in Mono?

Mono's C# REPL has on its page this bit of info:
A GUI version of this tool is called gsharp and is available when you install the mono-tools package
The same bit of info is mentioned in the Mono 2.2 release notes.
However, while I've installed the 30-day trial of mono-tools (vsix for VS2010), and the normal Mono for Windows package (2.10.8), I don't see anything in either that lets me open the window from the screen shot "C# InteractiveBase Shell". I also can't find any files on my disk (after installing both) starting with 'gsharp'
Did 'gsharp' move somewhere else?
I know the source is available as part of the mono-tools repo # https://github.com/mono/mono-tools/tree/master/gsharp, but just trying to find a 'release build' to use instead if possible. :)
Mono-tools for Visual Studio is a former product of Novell, which is discontinued (which Xamarin doesn't offer either).
I recommend you try to install Mono for Windows official bundle from http://www.mono-project.com/ If that installer doesn't include it, I recommend you compile mono-tools yourself, shouldn't be very hard with cygwin or mingw32.
PS: Note, "Mono tools for Visual Studio" and the "mono-tools" module (https://github.com/mono/mono-tools) are two different things.
(BTW, Mono 2.2 is very old. Only accept Mono 2.10.x or higher nowadays)

Error adding System.Data.Services.Client reference to windowsphone7.1 sdk

After asking my first question Windows Phone 7.1 app accessing Azure Storage directly, I download wp7facebookazure wp7.0 sample.
After i downloaded wp7facebookazure sample from http://wp7azurequickstarts.codeplex.com/releases/view/65745, I compiled WindowsPhoneCloud.StorageClient library, I see it is using custom System.Data.Services.Client library.
After I change the sample to use windowsphone7.1 sdk and then I add System.Data.Services.Client reference, I get following error:
Microsoft Visual Studio
A reference to a higher version or incompatible assembly cannot be added to the project.
How I can use windowsphone7.1 sdk System.Data.Services.Client reference?
Here is what I tried in my machine:
Loaded WP7FacebookAzure solution
Upgraded solution to use Windows Phone SDK 7.1
Removed System.Data.Services.Client project completely
Added System.Data.Services.Client references from C:\Program Files (x86)\Microsoft SDKs\Microsoft Data Framework\Phone\v7.1\bin\System.Data.Services.Client.dll
There were some error which you work to remove however using above steps I was able to integrate System.Data.Services.Client.dll in WP7FacebookAzure solution.

Categories