C# 2010 ide problem
-
יום רביעי 18 אפריל 2012 17:50
I have posted this question in another forum days ago and did not did a response. Thus I thought I would see if this is the correct group to post this question.
I have a C# web form 2010 application that I obtained from a contract shop that wrote this application for my small company. it is now my job to support this application. I can get the application to execute from my visual studio.net 2010 professional ide. However my problem is the project file that contains the 'web' component is unavailable to me? i know the files are there since I can see the code through windows explorer.
Thus can you tell me what I need to do so I can open the 'unavailable' files in the visual studio.net 2010 ide?
כל התגובות
-
יום רביעי 18 אפריל 2012 20:28מנחה דיון
There are 2 different types of web projects: web app and web site. The differences between the two are pretty important. You can google for articles on the differences.
If the project contains a .sln then open that in VS. If there is no solution file then look for .csproj file. If there is one then it is a web app and you can open that in VS. If neither of these exist (but you do have the .cs files) then it is most likely a web site.
For web apps you have to have the .sln and .csproj in order to do anything. If all you have are the .cs files then you'll need to create a new, empty project and then add the files into the project by either using Solution Explorer or dragging and dropping from Windows Explorer. In either case you'll want to ensure the project is created in the same directory containing the existing files.
For a web site you just need to create a new web site and point it to the IIS server or folder structure containing the files.
From the sounds of it you have a web app and there should be a .csproj but that file cannot be found. You might be able to search for it as it might have been moved otherwise you'll need to contact your contract shop to get all the files.
Michael Taylor - 4/17/2012
http://msmvps.com/blogs/p3net
-
יום רביעי 18 אפריל 2012 20:44
My app is using an sln file and there is a .csproj file. I know there is a csproj file since I can find the file with windows explorer. I can not see the csproj file in the visual studio.net ide.
Is there something I might need to change in this file by opening it up in notepad?
The code in production uses iis 6, but myworkstation is setup to use the default web server that comes with visual studio.net 2010. There is IIS installed on my workstation, but I do not believe the visual studio is communicating with the iis. Do I need to run some asp.net command for this commincation to occur?
-
יום רביעי 18 אפריל 2012 22:07מנחה דיון
The solution is just pointing to the wrong spot. Remove the project from the solution and then add it back using Add Existing Project and everything should be fine.
Michael Taylor - 4/18/2012
http://msmvps.com/blogs/p3net
- סומן כתשובה על-ידי midnight_car יום חמישי 19 אפריל 2012 21:34