Giter VIP home page Giter VIP logo

Comments (15)

Nice3point avatar Nice3point commented on September 10, 2024 3

@ricaun new version of Revit.Build.Tasks is available

In general, Microsoft's approach will now be used
https://github.com/dotnet/sdk/blob/f6a8556dab12a7c27d6d0e66e93194a42dcde25a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets#L422-L444

Always and PreserveNewest are handled separately as well
https://github.com/Nice3point/Revit.Build.Tasks/blob/main/source/Nice3point.Revit.Build.Tasks/targets/Nice3point.Revit.Publish.targets#L22-L23

RevitLookup I have updated, waiting for a fix in Serilog.Sinks.Autodesk.Revit

from revitlookup.

dosymep avatar dosymep commented on September 10, 2024 2

yep, I will remove main.yml :)

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024 1

I guess the problem is related to this line:
https://github.com/dosymep/Serilog.Sinks.Autodesk.Revit/blob/master/src/Serilog.Sinks.Autodesk.Revit/Serilog.Sinks.Autodesk.Revit.csproj#L75

and it's included in the Nuget package
изображение

this was not present in the previous version 1.0.0, most likely a bug in the Nuget package @dosymep

If I set any file as Content is copy to the publish folder, even with the Copy to Output Directory to Do not copy.

i'll check

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024 1

I would definaly change to not copy.

Agree, I will update the publication to include PreserveNewest and Always

from revitlookup.

dosymep avatar dosymep commented on September 10, 2024 1

done Serilog.Sinks.Autodesk.Revit v2.0.1

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

This is coping all the content that is not Never, if the file is set as Content the file is copy to the publish. Don't know if is intended feature.

Yeah, this is expected behaviour
https://github.com/Nice3point/Revit.Build.Tasks#publishing

@ricaun do you have "Do not copy" option? Because i'm not
изображение

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024

Yes, but I'm not explicit setting the CopyToPublishDirectory to never.

image
image
image

You probably need to check if Content.CopyToPublishDirectory is not empty or only copy is is Always or PreserveNewest.

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

Yes, but I'm not explicit setting the CopyToPublishDirectory to never.

But you show CopyToOutputDirectory) This is not the same as CopyToPublishDirectory
this file is not included in the bin directory

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024

But you show CopyToOutputDirectory) This is not the same as CopyToPublishDirectory this file is not included in the bin directory

Ops, didn't see that is two different properties.

So, by default gonna copy every content to the publish folder, even files that is not coping to the output folder.

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024

yep, I will remove main.yml :)

Yep!

@Nice3point Still find odd that by default all the content is copy to the publish folder, I thought the CopyToOutputDirectory was the main propriety used to copy to the publish as well.

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

yep, I will remove main.yml :)

you can write something like this:
<None Update="$(SolutionDir)/.github/workflows/*.yml" Link="ci/%(Identity)" />

Or just use SolutionItems to add this file to the Solution explorer

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

@Nice3point Still find odd that by default all the content is copy to the publish folder, I thought the CopyToOutputDirectory was the main propriety used to copy to the publish as well.

Content implies the use of the file for publishing, its other purpose is wrong. And you should use None or something else, but not Content
https://learn.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-items?view=vs-2019#content

CopyToOutputDirectory is not used because the files will be copied to the root. PublishDirectory together with CopyToPublishDirectory allows you to configure the destination directory

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024

Content implies the use of the file for publishing, its other purpose is wrong. And you should use None or something else, but not Content https://learn.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-items?view=vs-2019#content

CopyToOutputDirectory is not used because the files will be copied to the root. PublishDirectory together with CopyToPublishDirectory allows you to configure the destination directory

Yes makes sense, content could be used to publish.
The problem I see is that the default CopyToPublishDirectory is copy the file and the main.yml file was injected in the publish without noticed. Is better to explicit set what you want to send to the publish that's how the CopyToOutputDirectory works.
I would definaly change to not copy.

from revitlookup.

ricaun avatar ricaun commented on September 10, 2024

I would definaly change to not copy.

Agree, I will update the publication to include PreserveNewest and Always

You could use the PublishDirectory as well to assume that the file need to be copy to the publish folder.

from revitlookup.

Nice3point avatar Nice3point commented on September 10, 2024

You could use the PublishDirectory as well to assume that the file need to be copy to the publish folder.

It's more logical to split it up, and keep the 2 properties to be responsible for their own purpose

from revitlookup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.