Multiple projects in one solution like nopCommerce 3.5 - asp.net-mvc

How do I create 2 ASP.NET MVC projects in a single solution, similar to nopCommerce 3.5? The two projects would be:
Web project at http://localhost:15536
Admin project at http://localhost:15536/Admin

In NopCommerce physically there's no two project,
If you go physically you'll find the Nop.Admin project is under the Nop.Web project , and you have to create the second project and you refer to the http://localhost:15536 project in Visual studio and add the second project with add an existing project and you have to implement AreaRegistration to specify your Url in this second project and of corse your dll have to be generated under /bin of the first project.
Best Regards

Related

Unable to add Razor view to project

I can't add razor view to MVC 5 project in Visual Studio 2017.
There just doesn't seem to be the template
As you can see if I choose Web from template list nothing is visible and all I see is Please choose a project type.
Now this is puzzling as I've seen this related SO post & this where both of them suggest to set project type GUID in .csproj.
I do have it set and it was there (I didn't add anything)
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
Looking at the list of GUIDs it seems that the first GUID suggests that this is ASP.NET MVC 5 project.
I also checked VS2017 installation and I do have web tooling installed
Any clue what I can also try to enable adding web templates to project?
Are you trying to add a new project to a solution or a new item to a project? Its not clear in your question?
Within your project (Solution Explorer), try right click on the Views Folder, choose add, New Item and see if you can find anything there?

How do I add a source controlled (tfs) project to a solution and maintain binding?

I would like to create three separate ASP.NET MVC solutions, all pointing to the same Model project. How do I keep changes made from one solution update the others?
Ex, is there is way in Visual Studio to "Add new project from Source Control" like you can with a whole solution?
So you are hoping to have 3 solutions that share a common project.
You can achieve this in 2 ways.
NuGet
Have the project in it's own solution and create a NuGet package of the output, your other solutions can then consume the NuGet Package.
Shared Project
A shared project is easy to do, just ensure that your shared project is available in the same workspace as your solutions.Do a get latest, You can then just right click on the solution and choose add existing project.
Any changes you make will need to be checked back into source control, these changes will then appear in each 'copy' of the project in each of the different solutions.
The shared project works fine, but you may have to make some considerations when you come to building the solutions, the main one being that if you only make a change to the shared project would you want all of the solutions that consume it to be built on check-in?

How to use 2 asp.net projects together

I'm working on a web application with asp.net mvc 4 and I want to do a administration interface,but I want do it in other visual studio's project. So I don't how it works, the routing, how connect to the database from other project. I'd really appreciate any help.
Follow this steps.
Create one solution
Add two projects to the same solution
Point the web.config of the two projects to the same database
It doesn't have to be so complicated with routing, because each project belong to a different site and a different environment.
In my opinion you should create just want project and define a new area for the administration

Sharing Javascript files with other projects

I have a javascript file in another project which is used for validation. I want this file available for my website main project file. How do I go about doing this?
I am using asp.net MVC4.
thanks...
The project files are in a solution folder in visual studio and want to reference to the file in another project.
You might want to use NuGet.
You can add your own custom repository: Hosting Your Own NuGet Feeds
If you want to keep one physical copy of the file, you can keep it in one place, and add it as a "linked" file in your other projects:

namespace problem, multiple projects in single solution

I am following example from MVC book. I was asked to create three projects in one solution ( C# Library, MVC 2 and Test). I did it by right clicking on solution name and choose 'add > new project'. Project names are:
MVCSample.Domain
MVCSample.WebUI
MVCSample.Test
It looks fine but I can not add Domain namespace into class from WebUI project. When I am writing using MVCSample. statement in controler ( class form WebUI) InteliSense prompt only .WebUI as matching ending. What did I wrong?
I am using VS 2010 pro.
It sounds like you haven't added a reference to the Domain project from the WebUI project.
Right-click on the WebUI project in Solution Explorer, pick Add Reference and then choose the Domain project.

Resources