Closed chucker closed 2 years ago
It has been a while since I did webforms development (I mainly use/maintain MVC and Razor these days).
Are there any other types that should be included? I seem to remember master pages (.master
?).
I believe these should be recursive so they include at any depth of folder, not just the root so probably something like
<ItemGroup>
<Content Include="**\*.asax" />
<Content Include="**\*.ascx" />
<Content Include="**\*.asmx" />
<Content Include="**\*.aspx" />
<Content Include="**\*.master" />
</ItemGroup>
I'll look at adding these as default includes, perhaps behind a flag so that they can be disabled if required.
Good point — .master
, too. And yes, it should be recursive (technically, the rules are more complex; e.g. App_Code
should not contain markup).
I believe .ashx
should be also included
Possibly also resx, axd, config.
@chucker .resx and web.config files were already handled. And .axd files do not actually exist - the URLs are just routed to a handler class by IIS.
@CZEMacLeod Thanks for the great work on this project. I updated to this version and noticed an issue after performing a publish.
In my project I end up with "bin\Release\Publish" as the output folder, however if turn on EnableWebFormsDefaultItems, once I publish it see's that published folder as content. Then each publish adds more content upon itself and eventually errors.
I have worked around this in some of my other globs by adding Exclude="$(DefaultItemExcludes)".
I recommend changing from:
<Content Include="**\*.asax" />
<Content Include="**\*.ascx" />
<Content Include="**\*.ashx" />
<Content Include="**\*.asmx" />
<Content Include="**\*.aspx" />
<Content Include="**\*.master" />
to
<Content Include="**\*.asax" Exclude="$(DefaultItemExcludes)" />
<Content Include="**\*.ascx" Exclude="$(DefaultItemExcludes)" />
<Content Include="**\*.ashx" Exclude="$(DefaultItemExcludes)" />
<Content Include="**\*.asmx" Exclude="$(DefaultItemExcludes)" />
<Content Include="**\*.aspx" Exclude="$(DefaultItemExcludes)" />
<Content Include="**\*.master" Exclude="$(DefaultItemExcludes)" />
@mcnallys I've created a new issue #25 for this problem.
I'm deploying as follows:
This does build a new DLL and upload that and its dependencies to the server. However, it does not replace any
aspx
files on the server.I notice VS infers the build action for
aspx
asNone
, and I'm not seeing a reason at a glance, in mycsproj
. Some snippets:I'm guessing asmx and ascx files would be affected as well.
So I think the default item includes should have: