how to make a solution from server hosted files - asp.net

I have a old website which running on iis6.
I have the hosted files in the virtual directory of this hosted website.
But I lost all the solution or project files which can be opened in visual studio 2003 for modification of this website.
Since it is missing I am thinking to make the solution file, .SLN file from the files resides in virtual directory and open this in visual studio 2003 for further modification.
Any idea how to create solution file from virtual directory files?

You can create a solution file by following steps.
1) Open visual studio
2) click on File -> Open -> Website --> File system dialogue will open
3) Navigate to your hosted files root folder and select folder --> Click on open
4) So your solution will be prepared by visual studio
5) Click on file-> save
Thats it, visual studio will create .sln file for you.
Cheers,
Vijay

Related

Visual Studio Copy the Project to an external drive

I had done a project by using ASP.NET MVC. How do I copy and paste the project to an external drive. I have to submit my project as coursework yet they request to copy the entire project to a CD/VCD.
The problem is when I copy & paste the project into a CD, it can't run properly with loads of errors. How do I do this in the cleanest way possible?
Snippet:
Here's the warning message.
You can delete .vs folder. Visual Studio will recreate it, when you open the project.
The main issue is Visual Studio cannot read and write to CD. However, you can copy the project into USB Flash Drive, and open the project straight from it.
Starting from Visual Studio 2012, Microsoft uses IIS Express by default to host ASP.NET applications, which relies on a file applicationHost.config to store the site information.
The design of applicationHost.config, means a physical path to your project directory is hard coded which prevents this project from running if you simply copy the project to another location on another machine without updating applicationHost.config. What's worse, starting from VS2015 this applicationHost.config lives in .vs folder inside your project directory, which can be copied to other machines by mistake.
Read my blog post to understand the technical details if you like,
https://blog.lextudio.com/jexus-manager-secrets-behind-visual-studio-iis-express-integration-834f88c8e8b

MVC: Visual Studio Publish Web dialog cannot find my application's Views

I am using these steps to publish my ASP.NET MVC 4 application using Visual Studio 2010 on IIS 7.5 running on a 64-bit Windows 7 Professional machine.
When I click the Publish button on the wizard after entering the values, it reports a single error that reads:
Copying file Views\Shared\Error.cshtml
to obj\Debug\Package\PackageTmp\Views\Shared\Error.cshtml failed.
Could not find file 'Views\Shared\Error.cshtml'.
I looked into the target folder where the wizard dumps the necessary files that will be needed to deploy the application. It turns out that the folder had the Views folder which had only the _ViewStart.cshtml of the root Views folder, but no other View. My application has at least 20 views, perhaps more.
I realized that it was my fault. The local copy of my project had the file Error.cshtml in the Views\Shared folder. However, the TFS copy of the project file did not. Apparently, the file had been excluded from the project at some stage.
I excluded the file from my project locally and ran the build and it worked.
In my case the problem was that the file was in the solution but didn't actually exist on the local file system.
For me, this problem occurred when I moved a file (via explorer) from the shared folder to another folder.
I added the file in visual studio, but did not "delete" the file from the shared folder (as far as visual studio was concerned).
For some reason, visual studio did not put a little flag or warning sign to tell me the expected file was missing (even after a refresh), so I didn't notice (although trying to open the missing file revealed the problem).
The error message is clear, and self explanatory. I just couldn't understand it for some reason.

Visual Studio 2010 doesn't deploy App_Theme folder

I have a simple web app project in Visual Studio 2010 (converted from 2008 project). For some reason when I publish the app, Visual Studio doesn't copy the App_Theme -folder to the publish destination folder. This will cause the app to fail when deployed to production environment.
App_Theme is considered as "system" folder by VS (shown as grey), which means that I can't manually set it's publish properties.
Can anyone tell me how to get VS to copy App_Theme -folder when deploying?
I had same problem, located and deleted TEMP folders with cached data about publish, and then publish gone fine.
%userprofile%\AppData\Local\Microsoft\WebsiteCache
%temp%\VWDCache
%LocalAppData%\Microsoft\Team Foundation\1.0\Cache
Hope this will save time for next people, hitting this problem.
I think Visual Studio has a cache file in the root directory where it tracks what files/folders have already been published. If you nuke that file, it should do a full publish again.

Convert Visual Studio 7.1 project to Visual Studio 9 project?

I have an Asp.Net project in Visual Studio 7.1 , Now when I open it in Visual Studio 2008 , I can't access to project files :
(source: picfront.org)
How can I open the project with VS2008 or VS2010 ?
Open the sln file with a simple text editor (make backup)
and search for your project that did not find, and correct the directory path.
You have probably a line like that... you need to fix the dir, saved it and open it again.
Project("{XXXX-XXXXX-XXXX}") = "PECeShopSame",
"Dir1\PECeShopSame\PECeShopSame.csproj", "{XXXX-XXXXX-XXXX}"
I see this is old post but I learned that you can also accomplish converting the .csproj file by browsing to the .csproj file and double-clicking on it. Visual Studio will open and offer to convert it for you - follow the wizard. As a final step in the wizard, it will prompt you to select the project in solution explorer and convert to web application.
I had situation where the files didn't appear in solution explorer after converting .csproj file therefore I couldn't select "convert to web application". I closed the (empty) solution then opened as web site (instead of project/solution) and all was well!

Visual Studio 2003 vs. Visual Studio 2005

I am personally only familiar with VS 2005 and am working on a project using VS 2003. So I've downloaded the solution to my local drive, opened it and had to fiddle with IIS a bit before it would run and now I also have the website in the inetpub folder.
Can someone just explain using an overall picture what's going on. Am I editing the file in my local source safe folder and when I run the app the sites is copied it the IIS folder?
How do I publish the site, Normally I right click the solution, goto publish and fill out the form. In 1.1 should I just copy the content from my source safe folder to it's destination or copy them out of my IIS folder to the destination or secret option number 3?
Thanks guys
VS 2003 only has the "Web application" project type, not "Websites" that are available in VS 2005. Additionally, the File system website model is lacking in VS 2003.
VS 2003 requires a web application to be a configured virtual folder in IIS. It does not need to be copied to Inetpub\wwwroot folder, but it does need to be a virtual directory. So you do not need to copy the files to the IIS folder.
Lastly, VS 2003 does not have a "Publish" site option because when you build the website, all files are compiled into a single assembly. This is in contrast with the VS 2005 website model where each resource is compiled into a separate assembly allowing for dynamic compilation.
When I developed with vs.net 03, I pointed the IIS site to the same directory to where I had pulled it out of source control, so I dont have to bother copying it over whenever I do any changes, and that seemed to work perfectly well
When publishing the site, you want to copy all the files over, bar the following extensions:
.cs
.resx
.csproj
.projdata
.sln
.csproj.user
.suo
.scc
.load
.vssscc
.vspscc
Dont forget to copy over the bin directory!
In VS2005 you have integrated Web Server, so your web app can be run from any directory on the disk - ie. from your source directory. In VS2003 you can only use IIS, so you have to copy source to IIS folder. Yes, there are tricks to simplify web development in VS2003, but still the comfort of VSA2005 is much, much greater.

Resources