Can't use Windows.System in C# project - c#

I am trying to use windows.system.launcher.launchUriAsync(uri)
to open a Skype Uris in a Visual C# console app but i can't and i can't find Windows.System in the available references.I am using Visual Studio 2013.
Can you please help me understand why this happens ?
Thanks in advance :)

That assembly (and associated classes and namespaces) are for Windows Store apps only.
You cannot use them in a standard C# project.
Reference on MSDN.

Related

Setting up a mixed C# and C++ project in Visual Studio

I want to create a Windows application using a C# GUI that calls some C++ code but I have troubles setting up the project in Visual Studio.
I understood that I have to do it the following way : 3 projects (the C++ project, the C# project and a wrapper CLR project) that are linked to each others in some way. I just can't figure out how the link works.
If anyone can explain me in details what I have to do, I'd be really happy :3
Otherwise, I can use a Github link of a project already set up that I could copy.
Thanks in advance to anyone who will take some time to answer.

Visual Studio 2015 missing core assemblies/namespaces?

Can someone explain to me how to use/accuire access to vs built-in classes like MusicProperties or ImageProperties listed here?
https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.fileproperties.aspx
My visual studio doesnt recognize it`s namespace even though I have installed latest windows 10 sdk, as listed in the requirements table:
"Universal, introduced version 10.0.10240.0".
Do I have to use explicitly winForms or WPF etc to have access to specific libraries?
You have to create an Universal app or Windows Runtime app to be able to access that namespace.
Pick any of these (note that some project types can have another subset of features enabled):

Using ZeroMQ In c#

I am trying out ZeroMQ to see if it can be used for my application. However, I have problem getting it to work.
OS: Windows 10
Programming Language: C#
SDK: VS 2015 Enterprise
From what I read in order to use it in c#, I will need clrmq (which contains clr namspace for .NET) and zmq.
I gotten the "ZeroMQ.Release.zip" from "https://github.com/zeromq/clrzmq4/releases" and within it, it contains libzmq.dll, libsodium.dll (both from i386 folder in bin) and ZeroMQ.dll (from bin).
When I try to add references (of the mentioned 3 dlls) to my testing project, I got an error stating
"libsodium.dll and libzmq.dll icould not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."
In the end, I only manage to bring in ZeroMQ.dll.
Any help would be appreciated to help me start using zeroMQ in my testing.
Thanks.
Try to use NuGet package ZeroMQ. It will add required references properly.
Try to use Package Manage Console from Tools in VS. Install clrzmq and zeromq it'll solve all problem. In offline mode download the packages and install them.

Compiling Allegro source code

I am trying to build a C# project (downloaded code) in Visual Studio Express 2008. I get the error (my translation):
The type or namespace name "Allegro"
couldn't be found.
for the line
using Allegro;
I know the 2D graphics library Allegro, of course, but I can't find much information on how to use it in C#. It is being used for visualization in the project I am trying to compile.
I also get the warning
This reference couldn't be resolved.
The Universal assembly couldn't be
found.
I haven't been working with C# before and and I barely know Visual Studio Express. These are newbie mistakes - but I just need a fast solution for this problem. Could someone provide me with a short step-by-step solution?
Remove old reference of Allegro.dll from project and add it again.
Allegro isn't a .NET library; it's written in traditional unmanaged C. If you downloaded code that references an Allegro C# library, then perhaps the author was using some unofficial C# bindings. If so, the solution is to find that additional library and use it.
Otherwise, there is no short, step-by-step solution. You would need to use DllImport on each function that you need, and follow the standard practices for using unmanaged C DLLs in C#.

Write visual studio project from code

Is there any way to write a Visual Studio Project file easy or do i have to look at the xml format and write it by hand?
Is there any lib for this in .net framework(3.5)?
Im using vb.net but c# would also work..
Visual Studio since version 2005 uses the MSBuild format to store C# and VB project files.
You could read this primer http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=472 or search the Web for further examples.
For programmatic access you could use the classes in the Microsoft.Build.BuildEngine namespace. Probably the Project class is of most interest to you.
I haven't tried this myself but you might want to look at http://msdn.microsoft.com/en-us/library/microsoft.build.buildengine.project.aspx
We do it from a couple of in-house tools. The project files for Visual Studio are stored as XML, so you can just use whatever XML classes you prefer. Make sure you pay attention to GUIDs as they are used to tie everything together between the various files in Visual Studio.
There is no support for this in the framework. The Visual Studio project file format is specific to Visual Studio. There may be support in the MSBuild libraries but you would need to include them as a reference and interact with it that way. What are you trying to do that requires you to create a VS project file?
The link provided here should give you what you need.

Categories

Resources