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.
Related
I am building a web application.
I would like to place a html.index file in the wwwroot directory of my project solution to be able to build. However, wwwroot directory does not show in visual studio 2019.
Does anybody understand why this is happening
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
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.
Recently I've upgraded from Visual Studio 2008 to Visual Studio 2010, however I'm having various problems when uploading my compiled web site to the live area. I'm doing exactly the same as I would have done with Visual Studio 2008, however, now I receive errors such as:
{filename}.aspx is not a pre-compiled file
masterpage.master does not exist
All these errors don't make sense. Has anyone encountered these problems before, and was a solution ever found?
Try run the Clean Solution command from the Build menu on your solution.
Try diagnosing by publishing to a brand new IIS location. Perhaps there are files from your VS2008 build that aren't being overwritten by your VS2010 build.
Are all the files present in the bin directory as you'd expect?
Is there an PrecompiledAppConfig.config file in the root?
You can run the Clean command by selecting Build -> Batch Build. You will see the options Build, Rebuild, and Clean in the dialog box.
The web site does not have to be created in IIS in order to use the Batch Build dialog.
Hope this helps,
Rick
you probably have not created an application or virtual directory on your server.
use IIS Manager to create it
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.