Last post Mar 27, 2009 02:40 AM by Thomas Sun – MSFT
Mar 24, 2009 11:45 AM|mcclausky|LINK
I built a "release" version of my site with Web Deployment Project. I noticed WDP created several
.compiled files inside the bin folder. Inside each of these files is a reference to the original .aspx and .cs file, but the path is
wrong because it's including the folder name.
<filedep name="/MyFolderName/Users.aspx" />
<filedep name="/MyFolderName/Users.aspx.cs" />
This will not work on the final production server, because I will not use the same folder. How can I remove the "MyFolderName" from being included in the final release? I have almost 50 .compiled files and it makes no sense to edit them one by one each
time I build a release.
Your help will be appreciated.
Thank you in advance.
remove virtual directory folder
Mar 24, 2009 02:07 PM|hongping|LINK
Before you build, what folder name is your web site in? Perhaps you could try putting the website in a folder with the desired name before building? If you do that, does that change the folder name being generated in the .compiled files?
Mar 27, 2009 02:40 AM|Thomas Sun – MSFT|LINK
If we use Publish utility to precompile ASP.NET website without updatable option, the .compiled files will be created. ASP.NET needs to know where to load assembly for requested page and this linker is in .compiled file.
After the precompiled application is deployed, ASP.NET uses the assemblies in the Bin folder to process requests. The .aspx pages just are placeholders for pages. If we change the path, the hash code of file won't match and the exception will be thrown.
In this case, you can either change name during development or precompile website with updatable option (Select "Allow this precompiled site to be updatable" in Web Deployment project's Properties page).
I look forward to receiving your test results.