简体   繁体   中英

ASP.net Web Application Project directory structure

I've recently converted an ASP.net 2.0 Web Site Project to an ASP.net 3.5 Web Application Project and I'm still getting used to the way the files are structured.

The problem I'm running into is that when I build the corresponding Web Deployment Project it copies the obj directory. But its my understanding that the obj directory is just intermediary and doesn't provide any useful purpose for a deployed website right?

If that is correct, is there some way to configure the Web Application Project to put the intermediary obj directory elsewhere, or is there something else I should be doing to handle this properly?

Just add in the .csproj_deploy file the following

<Target Name="AfterBuild">
    <Message Text="------ Deleting unwanted files ------" Importance="high" />
    <CreateItem Include="$(OutputPath)obj">
        <Output TaskParameter="Include" ItemName="ObjDirPattern"/>
    </CreateItem>
    <RemoveDir Directories="@(ObjDirPattern)">
        <Output TaskParameter="RemovedDirectories" PropertyName="objdir" />
    </RemoveDir>
    <Message Text="Deleted obj directory: $(objdir)" Importance="high" />
</Target>

For more see http://msdn.microsoft.com/en-us/library/7z253716.aspx

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