开发者

AspNetCompiler including files that are not in my project

I'm using msbuild to automatically build and package a website ready for deployment. When I compile and then Publish my pro开发者_开发问答ject through Visual Studio 2008 everything works fine.

However when I use msbuild I'm getting errors because AspNetCompiler is trying to compile aspx and ascx files that are not included in my .csproj, but still exist in version control.

I know I can just remove them from version control, but can anyone tell me why these files are being compiled?

Here is my msbuild task.

    <AspNetCompiler                
     TargetPath="$(PackageDir)\Web"
     VirtualPath="/"
     PhysicalPath="$(buildDirectory)\Web"
     Force="true"
     />

Thanks!


The AspNetCompiler task, which wraps _aspnet_compiler.exe_, compiles all "compilable" files in the application, rather than compiling only those files in the .csproj.

The giveaway is that none of the command-line parameters for the executable take a .csproj as input, only paths. (I suppose one could argue that it would look for a .csproj in the directory, but that is unlikely as it would introduce its own set of issues, such as what to do if someone had put two project files in one directory.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜