简体   繁体   中英

Unable to compile web project with sub-web-projects with MSBuild

I'm trying to compile a web project solution using MSBuild which has other web-projects as sub-folders, and can't get around the problem:

ASPCONFIG: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

I have created a site in IIS and created virtual directories (as it suggests) for all sub-folders which are also web projects, and it now compiles in VS2010, but still get this for the root project when using MSBuild (the aspnet_compiler.exe).

Is there a way I can see how this works in VS so I can use that command-line?

Oh, it seems you can just use VS to do the rebuild using devenv.com:

"C:\\progfiles\\msvs10\\common7\\ide\\devenv.com" "SolutionFile.sln" /Rebuild

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM