Welcome to EMC Consulting Blogs Sign in | Join | Help

Merrick Chaffer's Blog

Visual Studio Solutions and Web Projects Gotcha

Symptom 

Aspnet_compiler.exe fails to produce any content apart from the PreCompiledApp.config and the Bin folder.

Reason 

When you save a solution containing a web project (file based), it sets the physical path property Debug.AspNetCompiler.PhysicalPath for the aspnet_compiler. If you then subsequently save your solution to a different folder (i.e. to the parent Solutions folder which houses all your various project folders), then the .sln file gets the update for the path to the project, but it forgets to update the two settings for the aspnet_compiler properties.

Solution

To resolve the issue you must open the sln file in notepad and updated that path as necessary.

Example

Before editing .sln file in notepad we have ...

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "D:\...\MyNameSpace.Host\", "Service\RefData\Tests\MyNameSpace.Host", "{0ACCC7A1-CC83-4854-950D-8F63A74373B9}"

                ProjectSection(WebsiteProperties) = preProject

                                SccProjectName = "SAK"

                                SccAuxPath = "SAK"

                                SccLocalPath = "SAK"

                                SccProvider = "SAK"

                                ProjectReferences = "{80D4EBAA-E27E-45A2-93B2-BB6E2573AB1E}|MyNameSpace.ServiceImplementation.dll;"

                                Debug.AspNetCompiler.VirtualPath = "/MyNameSpace.Host"

                                Debug.AspNetCompiler.PhysicalPath = " Tests\MyNameSpace.Host\"

                                Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\MyNameSpace.Host\"

                                Debug.AspNetCompiler.Updateable = "true"

                                Debug.AspNetCompiler.ForceOverwrite = "true"

                                Debug.AspNetCompiler.FixedNames = "false"

                                Debug.AspNetCompiler.Debug = "True"

                                Release.AspNetCompiler.VirtualPath = "/MyNameSpace.Host"

                                Release.AspNetCompiler.PhysicalPath = "Tests\MyNameSpace.Host\"

                                Release.AspNetCompiler.TargetPath = "PrecompiledWeb\MyNameSpace.Host\"

                                Release.AspNetCompiler.Updateable = "true"

                                Release.AspNetCompiler.ForceOverwrite = "true"

                                Release.AspNetCompiler.FixedNames = "false"

                                Release.AspNetCompiler.Debug = "False"

                                VWDPort = "2596"

                                DefaultWebSiteLanguage = "Visual C#"

                EndProjectSection

EndProject

After editing in notepad you should have...

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "D:\...\MyNameSpace.Host\", "Service\RefData\Tests\MyNameSpace.Host", "{0ACCC7A1-CC83-4854-950D-8F63A74373B9}"

                ProjectSection(WebsiteProperties) = preProject

                                SccProjectName = "SAK"

                                SccAuxPath = "SAK"

                                SccLocalPath = "SAK"

                                SccProvider = "SAK"

                                ProjectReferences = "{80D4EBAA-E27E-45A2-93B2-BB6E2573AB1E}|MyNameSpace.ServiceImplementation.dll;"

                                Debug.AspNetCompiler.VirtualPath = "/MyNameSpace.Host"

                                Debug.AspNetCompiler.PhysicalPath = " Service\RefData\Tests\MyNameSpace.Host\"

                                Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\MyNameSpace.Host\"

                                Debug.AspNetCompiler.Updateable = "true"

                                Debug.AspNetCompiler.ForceOverwrite = "true"

                                Debug.AspNetCompiler.FixedNames = "false"

                                Debug.AspNetCompiler.Debug = "True"

                                Release.AspNetCompiler.VirtualPath = "/MyNameSpace.Host"

                                Release.AspNetCompiler.PhysicalPath = "Service\RefData\Tests\MyNameSpace.Host\"

                                Release.AspNetCompiler.TargetPath = "PrecompiledWeb\MyNameSpace.Host\"

                                Release.AspNetCompiler.Updateable = "true"

                                Release.AspNetCompiler.ForceOverwrite = "true"

                                Release.AspNetCompiler.FixedNames = "false"

                                Release.AspNetCompiler.Debug = "False"

                                VWDPort = "2596"

                                DefaultWebSiteLanguage = "Visual C#"

                EndProjectSection

EndProject

Published 18 April 2007 12:59 by merrick.chaffer

Comments

No Comments
Anonymous comments are disabled

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems