aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 123 forks source link

Need to close & reopen VS 2017 for publish exclude to take hold #948

Open scottaddie opened 7 years ago

scottaddie commented 7 years ago

Using VS 2017 RC3, create a new ASP.NET Core 1.1 Web Application targeting .NET Core using the project template. Edit the project file by right-clicking the project in Solution Explorer and selecting the context menu option. Add the following ItemGroup:

    <ItemGroup>
        <Content Update="wwwroot/images/*.svg" CopyToPublishDirectory="Never" />
    </ItemGroup>

Publish to the file system using the Folder publish target. Check the bin\Release\PublishOutput folder and notice that the SVG files which should've been excluded were published.

Closing and reopening Visual Studio fixes the problem. It seems as though VS is aggressively caching the metadata and not refreshing until the IDE is restarted.

mlorbetske commented 7 years ago

@vijayrkn