-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content items brought in by EnableWebFormsDefaultItems include (published) output under bin and obj #25
Comments
@mcnallys The props file actually adds all the item types to DefaultItemExcludes so using that to exclude won't work. <!-- Exclude WebForms items from default items -->
<PropertyGroup Condition="'$(EnableWebFormsDefaultItems)'=='true'">
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.asax;*.asax</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.ascx;*.ascx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.ashx;*.ashx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.asmx;*.asmx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.aspx;*.aspx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.master;*.master</DefaultItemExcludes>
<DefaultWebFormsItemExcludes>$(BaseOutputPath)\**;$(BaseIntermediateOutputPath)\**</DefaultWebFormsItemExcludes>
</PropertyGroup>
<!-- Include WebForms items as content -->
<ItemGroup Condition="'$(EnableWebFormsDefaultItems)'=='true'">
<Content Include="**\*.asax" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.ascx" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.ashx" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.asmx" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.aspx" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.master" Exclude="$(DefaultWebFormsItemExcludes)" />
</ItemGroup>
If you try this (but change |
I'm trying to follow but not quite understanding, am I changing these files locally in my project or yours? |
@mcnallys Add the following to your project file and change <!-- Exclude WebForms items from default items -->
<PropertyGroup Condition="'$(EnableWebFormsDefaultItems2)'=='true'">
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.asax;*.asax</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.ascx;*.ascx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.ashx;*.ashx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.asmx;*.asmx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.aspx;*.aspx</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**\*.master;*.master</DefaultItemExcludes>
<DefaultWebFormsItemExcludes>$(BaseOutputPath)\**;$(BaseIntermediateOutputPath)\**</DefaultWebFormsItemExcludes>
</PropertyGroup>
<!-- Include WebForms items as content -->
<ItemGroup Condition="'$(EnableWebFormsDefaultItems2)'=='true'">
<Content Include="**\*.asax" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.ascx" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.ashx" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.asmx" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.aspx" Exclude="$(DefaultWebFormsItemExcludes)" />
<Content Include="**\*.master" Exclude="$(DefaultWebFormsItemExcludes)" />
</ItemGroup>
This will allow you to test the update - if it works correctly for you, then I will make the changes to MSBuild.SDK.SystemWeb.DefaultItems.props. |
This almost worked but my baseoutputpath and baseintermediateoutputpath already had a trailing slash.
Notice That fixed it locally and I will report back on the results of our build system. |
Everything looked good in the build. |
@mcnallys This logic should be implemented with V4.0.58 - Let me know if you have any issues. |
Well I was so hopeful, it's still including the obj folder. If I add this line to my project it works as expected.
I wonder if BaseIntermediateOutputPath is not populated at the time it's being evaluated. |
@mcnallys I think I have found the issue - the |
@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:
to
Originally posted by @mcnallys in #24 (comment)
The text was updated successfully, but these errors were encountered: