简体   繁体   中英

Visual studio 2015 no Basic page when adding new item?

So I want to start doing c# from head first c# 3rd edition, the big problem is that I can't find neither blank page and I saw alot of people saying that using WPF is okay, but when I try and add a new item I see nothing related to c# or what I actually need, what I need is a basic page, here is how it looks like:

在此处输入图片说明

now the problem is I can't fix it to show me what I need only for c# I tried, community,enterprise. Does anyone have any idea of how to fix this?

You seem to be trying to add an item at the solution level. Note that in the screenshot it says "Add New Item - Solution Items". This will create files that exist in the solution, but no belong to any particular project, not affecting the output of compilation of any project. That's the reason why you don't see anything code related, you're not editing a code project.

Instead, right click on the project item on the solution explorer (not on the top solution item) and add a new item there. The selection of options will be specific to the type of code there. For example for WPF you'll get all XAML-based file types, or for Winforms you'll see forms and control classes.

I had this same problem I am using Visual studio 2015 community edition, the problem is you have created the wrong project to start of with. The screenshots in the book are from VS 2013 so it will look a little different.You need to create a Blank App(Universal windows 8.1) highlighted in the image attached and not Blank App(universal window). Once I done this basic page will no be available in the add new item page.

VS 2015 Screenshot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM