visual studio not letting me add a VB.Net file - visual-studio-2010

I have an example web solution that I downloaded and when I try Add New Item (e.g. page, web control, etc.), only C# is present as a language option. In other solutions I use, I see C# and VB. How can I add a new VB item?

If the current project is a C# project, you will only be able to add C# items to an existing project.
You should be able to add a new project to the solution, set it to a VB.Net project, then add VB items to it.

If you're trying to do this in a web project, you might be able to achieve this like DotNetNuke does it. Check out this post as to what files have to go in what folder (specifically App_Code) as well as changes to your web.config file. I do have to admit that other than DNN, I've never tried to do this in a regular web project.

Related

Visual Studio 2013 - Add New Scripts in /Scripts/ Folder in .csproj

I've begun to really enjoy a quick contextual menu that appears when adding new Typescript files into my Visual Studio Web Project. You can see from this image that I can quickly select that I want to create a typescript file without much fuss. Right clicking all I have to do is go through a folder in Scripts > Add > Typescript File to make said file.
I've begun adding my scripts to another referenced .csproj class library, and unfortunately for me, the context menu doesn't work in the same way. Shown here:
I'm wondering if there is a way to reclaim this menu context without having to convert this project into anything different? Or, if changing the project will have minimal impact on everything else.

What is the best way to deploy a Template project in C#?

Heyy all =)
We create a custom project template in C# following This topic to force all developers to develop uniformly, all inherit from the same class and receive the same development tools we developed in four separate DLLs and all have the App.config file with default keys etc.
We work on vs2012 or vs2013.
Since I have put the DLLs manually and attach them to come into the same project ZIP file (are that is the right way to do it or somthing like this answare?) Now if there are any changes we will have time to re-export it, etc. So we thought the installation project.
Now I'm not sure what type of project to use.
I saw that there are a number of options I will list below and I would love advice about the right, the best, and most appropriate way to do it:
Creating Extensions By Using the VSIX Project Template or other Extensibility projects
The WIX way
Using Wizards somthing like this perfect answare
One of the project from the Visual Studio Installer Projects Extension

How to create a Visual Studio add-in to generate files?

I would like to create a Visual Studio add-in to generate files.
For example, I would like to create something similar to the "Add Controller" dialog in ASP.NET MVC. This appears when you right-click on the "Controller" folder in an MVC project in Visual Studio.
However, instead of creating a controller file, I would like to create "Handler", "Request", and "Reply" classes within a folder, for my implementation of a service bus.
Creating these classes over and over again is becoming a bit of a chore, so I'd like to automate it. Is an add-in the way to go here? Do I also need to use macros and/or T4 templates?
It would be nice I could run the add-in by right-clicking on a folder and then choosing Add->Handler or something similar. I'm sure there must be a way to do something like that, but I haven't found a good resource yet through Google.
For reference, I've already looked at these web pages for info:
http://msdn.microsoft.com/en-us/vstudio/bb968855.aspx
http://msdn.microsoft.com/en-us/library/80493a3w.aspx
http://msdn.microsoft.com/en-us/library/7k3w6w59.aspx
http://www.c-sharpcorner.com/UploadFile/mgold/AddIns11292005015631AM/AddIns.aspx
http://www.codeproject.com/Articles/16515/Creating-a-Custom-Tool-to-Generate-Multiple-Files
http://www.olegsych.com/2010/03/t4-tutorial-integrating-generated-files-in-visual-studio-projects/
You can create templates which could make you nearly everithing you would like to do.
Creating Vs-Templates
Item templates
You can use your custom templates with the built in way easily and you can extract them from
...\Documents\Visual Studio 20[XY]\Templates\
folder to migrate them by copying.

how to make solution visible in solution explorer window of visual studio 2010 or visual studio 2012?

i am using visual studio2010. i am facing a problem that when i create a new web project then visual studio makes project and don't show its solution in solution explorer.
And the other thing is that i want to add a project with my existing web project how i can add it with this one, i just know to add another project by its solution right click. first please tell me how i can make solution visible for my existing projects that i made before and for other projects that i will create.
you can make the solution always show by Options dialog
Essentially you should follow this link to create a new solution:
http://msdn.microsoft.com/en-us/library/zfzh36t7.aspx
It also tells you how to add existing projects to new solutions is well. There really isn't that much to it.
Your issue isn't you cannot see the solution. It is that you have created a project only and not a solution. So I would create a new solution and then add existing projects to it.
Also as mentioned by #Devjosh in the comments when creating a new project you can say create new solution with the checkbox.

can i use visual studio 2008 for a regular asp project

i have taken over an asp project from a friend and he was basically just using notepad++ to develop. I would like to use visual studio 2008 but there is no project file or solution file at this point, just a bunch of asp pages and some images, css
the other trick is that he will still be developing for a bit but doesn't want to use VS.
what is the best way to "upgrade" this so i can use VS ide features and he can still use notepad++ without any issue?
EDIT: Thanks for the responses. One additional request. We will ultimately be looking at migrating this to an ASP.net mvc site. Would that change any of the answers below or should i start from scratch when that happens in terms of vs projects solutions?
Yes. We are currently using it that way to support a legacy .asp application. We have a project in one of the solutions for the .asp pages.
edit:
In response to your edit I wouldn't see a need to change anything when migrating to MVC. You'll be adding new project(s) to your solution containing the .asp code. If anything, having it all in one place might make your life a little easier during the transition. Our ASP.net site(s) are in the same solution as the .asp project.
edit (part deux):
Using Notepad++ should present no issues. The edits would be to the .asp files (and .css, etc), not to the VS .proj file. I often use UE to edit the .asp files if I don't need to open the IDE. Assuming you're using a source repository of some sort...
Just create a blank solution (New Project > Other Project Types > Blank Solution) and then include all of the .asp files and any other relevant files.
You can just do File > Open > Web Site... and point VS at the folder containing the files. That should let you just edit the files. I say should as I don't have a classic ASP site to test this on.
When you start the MVC app, I'd start that one from scratch with a new project and then use your existing asp pages as starting points for your views.

Resources