VisualStudio 2012 - C# missing methods - c#

I have win 8 system with .net framework 4.5 and visual studio 2012
I had some problems when I work on a metro style app and when I searched the problems I found results in msdn with some properties and events like textBox.keyPressed, Control.ModifierKeys and some more. visual studio says method does not exist.
do I have to download a class or something

Framework which is used to develop Windows Store applications is a subset of .Net 4.5 framework.
You may to check whether they exists in msdn.
For instance System.Windows.Forms.dll library does not exist for Windows Store applications thus, Control.KeyPress event does not exist as you can not use dll mentioned above in a windows store application.

Related

Running Mono C# projects on Mac ... and Winforms

For the first time I am trying Visual Studio for Mac and I located a tutorial for writing a exe that shows a window with a simple menu.
My two questions are:
How does a user of a Mac get the Mono platform? I can't find instructions for deploying Mono. When I look in my exe folder there is no other files. Just the exe.
Maybe this should be a different question but I could not find any "WinForms" version in Visual Studio for mac. I had to use Gtk2 (I think).
If there is a better place to ask these questions please direct me. Thanks.
I know understand that the best course of action was:
Create a Xamarin.Forms multi-platform project.
Create a Cocoa Mac OS project.
Add a reference to project 1 into project 2.
Using Nuget Package Manager download Xamarin.Forms into each project.
Now it is easy to create an application with XAML (similar to WPF).
Visual Studio for Mac creates the multi-platform project (step 1 above) automatically with the Android and iOS platform builds, but not the macOS.
I also see that I don't really need to download Mono as it is all dealt with automatically.
.NET Core does support Mac and Linux. And even though .NET Core now supports Windows Forms. Windows Forms is only supported on Windows. It's unlikely this will ever change due to Windows Forms dependency on the Windows APIs.

Where in Visual Studio 2017 can I find "Blank App (Xamarin.Forms Portable)"?

I'm using Visual Studio 2017 for personal Apps (Windows Form), now I'm trying to use it for Xamarin Apps, but I can not find "Blank App (Xamarin.Forms Portable)" under Visual C# in the New Project creating Windows.
Do I miss any special update or something?
You mention Portable in your title but Portable Class Libraries (PCLs) have been deprecated in favor of .Net Standard. The current VS 2017 no longer supports creating them. If you're new and don't really know the difference between PCL and .Net Standard the chances are pretty good you can just go with .Net Standard and won't have to worry about it. The end result is basically the same. Whatever documentation/tutorial you're using will probably still be applicable even if you're doing a .Net Standard project instead of a PCL.
Along with the other answer that says to make sure you have Xamarin components installed, proceed with the stuff below.
As far as selecting "Blank App" specifically, it's in the second part of the workflow to create the project. I'll show you step 1 and step 2 on my installation.
Ensure this is installed in Visual Studio Installer (run VSI, find your installation and if it's trying to update it, drop down the arrow next to update and choose Modify):

How do I get Visual Studio Intellisense tooltips to show descriptions for .NET Framework 3.5?

I need to use .NET framework 3.5 for my project because it uses some older functionality.
The tooltips in Visual Studio aren't showing descriptions like they do when targeting a later framework. I just see basic information like method signatures and data types. Is there a way to fix this?
I looked for the xml files in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5 and it looks like it just has the files for the 3.5 Client Profile.
I tried reinstalling the 3.5 framework from this link: https://www.microsoft.com/en-us/download/details.aspx?id=21
I have no idea if it's working or not. When I run the executable nothing happens. I tried running as administrator. When I run it from command prompt there is no output.
I noticed the file is a hundred times smaller that the download for the latest .NET framework. Does that mean it doesn't include the files it's supposed to?
I'm guessing if there's a fix, it's either getting the correct xml files for .NET 3.5 or getting Visual Studio to use the xml files for .NET 4.6 even though my project is targeting 3.5.
Thanks in advance!
I don't think the earlier versions of .net provide the level of tooltips that your after unfortunately. One last thing you could try is to ensure you have all of the elements in the "Add windows programs and features" enabled. Not sure what version of windows your running on but this should explain what I mean:
https://learn.microsoft.com/en-us/dotnet/framework/install/dotnet-35-windows-10
You can enable the .NET Framework 3.5 through the Windows Control Panel. This option requires an Internet connection.
Press the Windows key Windows Windows logo on your keyboard, type "Windows Features", and press Enter. The Turn Windows features on or off dialog box appears.
Select the .NET Framework 3.5 (includes .NET 2.0 and 3.0)
check box, select OK, and reboot your computer if prompted.
You could try downloading the whole installer not just the bootloader installer.
.net 3.5 sp1
http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe
or if you dont want sp1
.net 3.5
http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe
Edit
If you are unable to run the installer at all it sounds to me like it is already installed. You could try to verify the installation using this tool. This page also explains how to find the setup logs. It should shed some light on what is happening.

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):

How to use SQLite on new Windows 8.1 Store app (Visual Studio 2013)

So, I installed Visual Studio 2013 on my Windows 8.1 box. I want to experiment with it and created a new Windows Store Grid App. I want to persist data on a SQLite database, apparently the database of choice for WinRT apps.
Quickly found links to the vsix needed in order to be able to use the SDK: SQLite download page, and downloaded sqlite-winrt81-3080002.vsix.
Installed it, then in my project, added the reference to the newly installed SDK (right click references, add reference, navigate to Windows, select extensions and tick SQLite for Windows Runtime (Windows 8.1) checkbox.
Also quickly found that it won't compile on Any CPU. On Configuration Manager, selected Debug, x64 active platform, that made me able to compile the application.
Finally, while attempting to use the namespace SQLite I noticed VS 2013 isn't recognizing it. Attempted many things like adding reference to the .dll directly, exploring the component to see which namespaces were available (which doesn't show anything), and I'm quickly running out of ideas. Because it's kinda new thing, and with limited interest, google, the saviour, doesn't want to save me today.
So, how one would be able to use the SQLite SDK in their Visual Studio 2013 projects, targeting Windows Runtime 8.1?
These are the contents of my csproj file
UPDATE
Stupid me, thought there was no managed land (.net) in Metro style land. Sorry for causing any confusion.
I installed the VSIX for SQLite and noticed that it is a native DLL to be used in Windows Store 8.1 C++ apps. It is not for managed C# projects.
The current NuGet package for SQLite from what seems to be the 'official' SQLite team is only working for .NET 4.5, if you try to install it, it will error saying it does not support .NET 4.51.
There is also the NuGet package SQLite-net, which works for .NET Windows Store apps. All you need to add is the SQLite using statement.
You will need this NuGet package as it is the managed wrapper for the SQLite, without you will not be able to properly reference the right DLL for SQLite.
Here is the link to the project information from that NuGet package. SQLite Runtime Support
Here is an article on how to use SQLite with Windows Store apps in VS2012 but it should still all apply:
SQLite and Windows Store Apps

Categories

Resources