Controlling the automatic name of a website project in a visual studio - asp.net

Is there a way to specifically name a website project "Website" in a visual studio 2012 solution?
For example:
Create a blank solution at c:\temp\Solution
Right-click in solution explorer, select Add New Website at c:\temp\Solution\Website
Problem:
In solution explorer, the website will be named something like Website(1) or Website(2), etc. instead of just Website?
Is this a flaw in visual studio or user error?

it mostly happens if the name conflicts and it starts assigning indexes with website name in project directory, i mean the .sln file.
or if somehow a different port no is used, then it does the same thing.
as said by yourself , its not a problem that is to be bothered...

Related

Rename a Project in Visual Studio 2017

I have a Solution in Visual Studio 2017 and one of the Projects is an ASP.NET Web Forms application.
How can I rename the Project?
I changed the name in the .sln file but within the IDE it is still showing the old name. The folder name matches the required name.
In Visual Studio Enterprise 2013, right click en Solution and search in contextual menu the option "Rename", there put you new solution name solution rename
Thanks for the response.
I had already tried editing the .sln file but it made no difference.
I finally found the problem was in the applicationhost.config file. Once I edited that the new name appeared.

Web Essentials settings error and its setting for LESS

I have installed VS2013 installed on my computer. I also installed
Visual Studio 2013 Update 2 RC
and
Web Essentials 2013 for Update 2 RC
successfully. Now when I work on a website project, go to WEBESSENTIALS top menu, and select create solution settings, I get the following error message:
Path cannot be null.
Parameter name: path
Does anyone know how to solve this issue?
Also, I want use the LESS feature of web essentials. Can anybody tell me how?
Thanks!
You may need to add a solution to your project to create a Web Essentials solution settings file. If your project (Web Site) doesn't have a solution, I'm guessing there's no solution to apply settings to.
What I do is create a New Empty Project, then add a New Web Site... or Existing Web Site.. to the solution.
It seems in my experiences that when I use 'File > Open Website', it creates a temporary solution, but Web Essentials doesn't seem to use this for its solutions settings.
Right-click on the targeted project in your solution & "set as startup project."

ASP.NET relative path is wrong in Visual Studio

I am using relative paths in my ASP.NET project, because I am using friendly URLs.
For instance, I am pointing to my pages like this: "/myPage.aspx".
When I implement this on my web server it's working well, but when I debug it in Visual Studio, it's linking like this:
http://localhost:xxxx/myPage.aspx (which obviously doesn't exist)
Instead of this:
http://localhost:xxxx/MyProjectName/myPage.aspx
It seems like Visual Studio is going all the way up until the Visual Studio folder, instead of stopping at the project's folder name.
How can I resolve this in Visual Studio? I think there should be something in the Solution's Property page, but I am not finding it. I am using Visual Studio 2010.
I prefer to debug in Visual Studio instead of IIS. I know how to make this work in IIS.
Visual Studio opens a port at random and sometimes you don't need a project name! You can create a vpath in IIS or in Visual Studio 2010, right click your project and choose Properties! There you can set your development server instead of IIS, and you can also set the MyProjectName as well!
Note: you'll have to set the Virtual Path to "/". This way the root will always point to the project's root folder.

Cannot load ClassDiagram.cd on Visual Studio. "URI formats are not supported"

When I try to open a class diagram for my asp.net webforms project I get the following error. The Class Diagram (.cd) files get generated but I can't open them.
I do have some classes that use the URI class but i don't really think that could be the issue. Right? Why would a class diagram care about one of my classes using a URI datatype?
I'm using vb.net Visual Studio 2012 and the project is targeting .net 4.0. I'm aware there is another question in stack overflow asked about the same issue, however there were no answers posted to it and it's close to a year old.
Help will be greatly appreciated, thank you.
I had the same problem and was able to fix it in Visual Studio 2012 Professional just now for a website I am working on with my team.
This is not about one of your classes using the URI data type.
My setting under "WEBSITE" in Visual Studio was previously set to "Use IIS Express". When it is set this way, you can select the alternative option, again under "WEBSITE" which is "Use Visual Studio Development Server". I'm not certain, but I think this is what the other posters describe above when they say "open web site in file system mode". When I am not using IIS Express, the class diagram generates, is not blank, and opens fine for viewing in the IDE.
Please open web site in file system mode (and not in IIS express ) and it will work.
when you load the website, visual studio will tell you that it is already using IIS Express to serve websites do you want to continue using it or not, select no so that you can use visual studio and bot the IIS. my things worked after that

couldn't open website visual studio

I created new website(File->Create->WebSite) in visual studio 2010 and then tried to open this in other computer with visual studio 2010, however VS couldn't open the website saying "one ore more projects in solution were not loaded correctly" and output window tells: "website2 (it is name of the website) doesn't exist" despite that this exists.
Does someone know the solution of this?
Try following , It may help.
On your first computer , open the project , Right click on your WebSite and click open containing folder. copy your website from the folder to the new computer. open your project on second computer , remove the website which is not loading correctly and then add existing project to the solution. select the website which you just copied from the first computer.

Resources