AssemblyAttribute automatically added to AssemblyInfo of a non-Module project #14443
Replies: 3 comments 5 replies
-
Hmm, what exactly is the build error you're seeing? But yeah, in this scenario, those marker attributes shouldn't be on the Helpf To be clear, none of the mentioned Helpful Libraries projects reference |
Beta Was this translation helpful? Give feedback.
-
Hi Zoltán,
I believe that the solution has been cleaned to use all the project
references of OC


This issue is just a little weird, I think we should let it aside for
bigger ones.
I appreciate your support!
Best regards,
…On Tue, Oct 10, 2023 at 7:58 PM Zoltán Lehóczky ***@***.***> wrote:
I don't see the Lombiq projects added to the solution there. However,
those projects load Orchard Core from NuGet. Mixing that together with the
full Orchard Core source code will cause all kinds of mismatches. You can
attempt to make it work by changing all the OC package references to
project references. However, in your place I'd rather use OC from packages
instead.
—
Reply to this email directly, view it on GitHub
<#14443 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXI6NNMSO2BBBTB4Q7FNO3X6VA6HAVCNFSM6AAAAAA5VQLCQKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TENBQHA3DO>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
The issue does happen when I mix library/helper projects (e.g., Lombiq.HelpfulLibraries.AspNetCore, Lombiq.HelpfulLibraries.Common) with the "Module" projects since the "Module" projects (in case using ProjectReference, not PackageReference) need import (through the .csproj file) the OrchardCore.Module.Targets.targets which has its a target to automatically update the AssemblyInfo.cs. For solving the issue (this is like the Orchard Module projects are in the same OrchardCore.Modules folder): Have the "Module" projects separately in a folder and have Directory.Build.props Directory.Build.targets (which imports the OrchardCore.Module.Targets.targets) in this folder. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The OrchardCore.Module.Targets.targets has its Target OrchardCoreEmbedModuleAssets, this target has a ItemGroup to help automatically generate 2 assembly lines to the AssemblyInfo.cs like
[assembly: OrchardCore.Modules.Manifest.ModuleMarkerAttribute("...") ]
[assembly: OrchardCore.Modules.Manifest.ModuleAssetAttribute("...") ]
this should be intended only to every Module (has Manifest.cs file in its project).
But, this is a circumstance:
My question is: how to condition that OrchardCore.Module.Targets.targets to only add the [assembly ...] lines to Module project (which has dependent/reference on OrchardCore)?
Should I bring this as a bug to OrchardCore team?
Beta Was this translation helpful? Give feedback.
All reactions