Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tom Newt 28 posts 181 karma points
    Nov 01, 2023 @ 15:41
    Tom Newt
    0

    Ignore the Usync folder when publishing?

    For our site we do very limited development from Visual Studio. ModelsBuilder is InMemoryAuto, all templates and partial views are edited in the backoffice, and all page and media edits are done in backoffice as well. However, when we do make VS changes and publish our site to folder it takes almost 30 minutes, 20 of which is spend on the uSync folder. I'm happy with usync on the published site, but how do I ignore it when building and publishing from the VS solution?

  • Huw Reddick 1684 posts 5917 karma points MVP c-trib
    Nov 01, 2023 @ 15:58
    Huw Reddick
    0

    just exclude it from the project it then won't get published.

    Righ click on the folder in Solution explorer and select "Exclude from project" in the context menu

  • Tom Newt 28 posts 181 karma points
    Nov 01, 2023 @ 16:05
    Tom Newt
    0

    I've tried that and I still get "Copying uSync files: #46025 files" when I publish. I also just tried editing the .csproj file to never copy to output directory and they still publish.

    <ItemGroup>
      <Compile Remove="uSync\**" CopyToOutputDirectory="Never" />
      <Content Remove="uSync\**" CopyToOutputDirectory="Never" />
      <None Remove="uSync\**" />
    </ItemGroup>
    
  • Marc Goodson 2097 posts 13921 karma points MVP 8x c-trib
    Nov 01, 2023 @ 22:54
    Marc Goodson
    100

    Hi Tom

    I think uSync has a. Targets file that ensures the files are included when you trigger a publish from Visual Studio...

    https://github.com/KevinJump/uSync/blob/c5db3b575b50bd36a096235b02e1479844393cb4/uSync.BackOffice/Targets/uSync.targets

    And

    https://github.com/KevinJump/uSync/blob/c5db3b575b50bd36a096235b02e1479844393cb4/uSync.BackOffice/Targets/uSync.props

    I guess uSync can't risk individual files being missed...

    Regards

    Marc

  • Tom Newt 28 posts 181 karma points
    Nov 02, 2023 @ 13:28
    Tom Newt
    0

    Marking this as the answer. In the end I deleted the contents of the uSync folder in the solution as it's the uSync folder in the published site that we care about.

Please Sign in or register to post replies

Write your reply to:

Draft