H2O
H2O

Reputation: 63

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. enter image description here

Upvotes: 1

Views: 1822

Answers (2)

Win
Win

Reputation: 62260

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.

Upvotes: 3

Lex Li
Lex Li

Reputation: 63173

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

Upvotes: 1

Related Questions