Closed ricaun closed 1 month ago
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
This is coping all the content that is not Never, if the file is set as
Content
the file is copy to thepublish
. 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
Yes, but I'm not explicit setting the CopyToPublishDirectory
to never.
You probably need to check if Content.CopyToPublishDirectory
is not empty or only copy is is Always
or PreserveNewest
.
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
But you show
CopyToOutputDirectory
) This is not the same asCopyToPublishDirectory
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.
yep, I will remove main.yml
:)
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.
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
@Nice3point Still find odd that by default all the content is copy to the
publish
folder, I thought theCopyToOutputDirectory
was the main propriety used to copy to thepublish
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
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.
I would definaly change to not copy.
Agree, I will update the publication to include PreserveNewest and Always
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.
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
@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
I was looking the last release project and noticed that in the
publish
folder there is amain.yml
file.Looks like the
Serilog.Sinks.Autodesk.Revit
is adding themain.yml
file in the content for some reason.The odd part is that is only added in the
publish
folder, theDebug R25
does not have the file, maybe the copy is coping extra content.This is coping all the content that is not Never, if the file is set as
Content
the file is copy to thepublish
. Don't know if is intended feature.https://github.com/Nice3point/Revit.Build.Tasks/blob/d778daf98e933441b7931a4ab2460aa91a066f5a/source/Nice3point.Revit.Build.Tasks/targets/Nice3point.Revit.Publish.targets#L22
If I set any file as
Content
is copy to thepublish
folder, even with theCopy to Output Directory
toDo not copy
.