Adding Custom Refrence for ASP.Net MVC on Visual Studio Code - asp.net-mvc

We are developing an ASP.Net MVC project and some of my co-workers are working on Mac OS. I have installed Visual Studio Code and ASP.Net Helper along with the C#. I have copied the whole project to Mac but the problem is it is not seeing my project refrence file, let's say MyProject.dll. When i add it on the Windows with generic VS, IntelliSense is completing automatically bringing the functions that i wrote.
All i need is adding a refrence and using IntelliSense for my functions on VisualStudio code. Is there anyway to achive that?

Visual Studio Code doesn't support ASP.NET MVC projects. You can load them and view files but you will not be able to use Intellisense, build or debug such projects. If you want your co-workers to use VS Code as the IDE under Mac consider migrating your project to ASP.NET Core.

Related

Can I open dot Net MVC project in VS 2013?

We have a very old legacy system which was developed using MVC1 through Visual Studio. Since then , Visual Studio also evolved and so has MVC.
Now we want to make our MVC1 project compliant with MVC5. Is there any, ready made tool available for this?
Various forums suggest to gradually move the project from MVC1 to MVC2, then from MVC2 to MVC3 and so on.
But I was not able to find any way of converting from MVC1 to MVC2. Although the information regarding the same is still available, but the tool to convert MVC1 to MVC2 is not found.
Can any one please throw some light on this?
You can use the old version of ASP.NET Project upgrade tool as the limitation is
The tool does not support Visual Studio 2008 solutions, MVC 1 projects, or projects targeting .NET 3.5. If you have a MVC 1.0 project you can use the old version of this tool to convert it to MVC 2.
You can also manually upgrade to MVC 3
The white paper steps for upgrading MVC1.0 to MVC2.0 are
Fiddle with web.csproj
Replace Version=1.0.0.0 in web.config by Version=2.0.0.0
Reference System.Web.Mvc (v2.0.0.0) in the project
chnange bindingRedirect in web.config
update css and js files

How to create a ASP.NET MVC web application project in VS2012

I am using Windows 8, and Visual Studio 2012. I need to create a ASP.NET MVC web application. But, when i click on Project types --> visual C# i only see windows store and not Web (as seen in VS 2008).
How can i create a MVC web application ? Help
I suspect you are using Visual Studio Express for Windows 8?
If so, you will also need Visual Studio Express for Web in order to create your MVC app.
See the different versions here: http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
u can also user WebMatrix to create aps.net mvc project
it's free tool for asp.net from microsoft
u can get WebMatrix from here http://www.microsoft.com/web/webmatrix/
During the install, there should have been options, one of which was Visual Web Developer. Make sure that was installed (that was what it was called in VS 2010).

How do I open an old MVC project in Visual Studio 2012 or Visual Studio 2013?

I have an old ASP.NET MVC 2 project which I do not want to upgrade to MVC 3 or MVC 4. I am working on a new machine running Windows 8, Visual Studio 2012 and Visual Studio 2013. When I try to open the MVC 2 project in VS 2012 or VS 2013 I receive the error:
This project is incompatible with the current edition of Visual Studio
The project is then unloaded and grayed out in Solution Explorer. I do not want to install another copy of Visual Studio. How can I open an old MVC project in a new version of Visual Studio?
Opening an unsupported MVC project in Visual Studio 2012 or Visual Studio 2013 is actually pretty easy to accomplish with two steps. In fact, as bytebender’s comment indicates, these same steps should apply to and work for MVC 1 projects. However, I haven’t tested them and therefore cannot guarantee that they do in fact work.
Assuming that you have not already done so step one is to download and install MVC 1, MVC 2 or MVC 3 (close Visual Studio before starting the installation).
Once you have the appropriate flavor of MVC installed the project will still not load in VS 2012. This is because ASP.NET MVC projects are a project subtype of the Web Application project type. This means that the project has additional add ins and features available to it when used within Visual Studio.
Both Visual Studio 2012 and Visual Studio 2013 are limited in their backwards compatibility with ASP.NET MVC and other project types. Unfortunately, installing the old MVC bits did not change that. Visual Studio 2012 is compatible with the ASP.NET MVC 3 and 4 project flavors. Visual Studio 2013 is compatible with MVC 4 and MVC 5.
To get the project to load you will have to modify the project file. To do so right click on the unloaded project and select Edit. Which will open the project file as an XML text file. Find the ProjectTypeGuids node which should look something like this:
<ProjectTypeGuids>
{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>
Remove the appropriate Project Guid from the list:
ASP.NET MVC 1: {603c0e0b-db56-11dc-be95-000d561079b0}
ASP.NET MVC 2: {F85E285D-A4E0-4152-9332-AB1D724D3325} (shown in example above)
ASP.NET MVC 3: {E53F8FEA-EAE0-44A6-8774-FFD645390401}
ASP.NET MVC 4: {E3E379DF-F4C6-4180-9B81-6769533ABE47}
With the appropriate GUID removed the ProjectTypeGuids should look similar to this:
<ProjectTypeGuids>
{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>
Save the file and close the Visual Studio project file editor. Right click the project and select reload. If the project does not reload close and reopen Visual Studio. You should now be able to work with your old ASP.NET MVC project in your new version of Visual Studio.
One important thing to note is that after these modifications Visual Studio is not aware that this is an ASP.NET MVC project; therefore the project-specific features like "Add Controller, View etc." will not be present in menus.
I used #ahsteele's approach (thanks and 2x+1s!), but was having one further error:-
.csproj : error : The operation could not be completed. Invalid class string
I can't find any citations for the real cause of that, but I was able to get VS2012RTM to load the project successfully by changing the <ProjectGuid>. (No idea how this happened - its part of a large solution and VS08, VS10, VS11 Beta and VS2012RC have all upgraded the .csproj and .sln over time.
In VS2017 the solution is to just make it like <ProjectTypeGuids></ProjectTypeGuids> so.
No Spaces in between ladies and gentlemen, otherwise it will waste 48 hours of your time.
Regards

Convert Visual Studio project to ASP.NET MVC

I have a visual studio project which is an ASP.NET MVC project, however it doesn't recognize it as such in Visual Studio so I don't get the nice dropdowns with Add View and such. Rather I just get a very plain add file dialog which doesn't include any MVC file templates. When I create a new MVC project however I get all the nice little VS tools. So, can someone tell me how I can instruct VS to recognize the project as an MVC project?
Thanks
For ASP.Net MVC 3, you will have to change the ProjectTypeGuids property in the project file to:
<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
Well, to answer my own question, you have to change the projecttypeguids in the project file. In the case of ASP.NET MVC RC1 they are:
{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
Though of course these may vary depending on the version you're targeting.

Visual Studio 2008: Synchronizing project structure with underlying file structure

Is there a way of making the (ASP.NET MVC) project structure reflect the underlying physical directory in the same way as ASP.NET Website projects are treated? - so you don't have to explicitly add files that are already in place via the Solution Explorer too.
Thanks
Solved the problem by using Chris Pietschmann's instructions to Convert an ASP.NET MVC application to a website project.
Though it looks like I'll lose some of the suppport features for ASP.NET MVC built into Visual Studio by doing this..

Resources