-
-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"The assembly has already been processed by Fody" in nuke #1167
Comments
I can repro this as I'm getting lots of "The assembly has already been processed by Fody." warnings, but the produced binlog file does not contain those warnings. |
At which stage are you getting the warnings? Right at the beginning or rather in the middle? |
a
|
I checked again: With With |
Looks like this is the root cause. When you trigger multiple compilations, you should set a property per compilation - like the MAUI build does with |
But that would trigger an unnecessary recompile I suppose. 🙁 The weaving task shouldn't be triggered on the second build if csc didn't run. Hooking Fody to OTOH this thing seems like it's purpose-built for Fody, so maybe we should try... |
Sounds promising - is there any official documentation? |
Seems to depend on the project type: |
Of course there isn't any doc. 😅 You're right: we need to take care about the compatibility. The code was already present in 2015 for C#: dotnet/roslyn@aa8d4ae (I didn't dig deeper to find when it was actually introduced) but F# is a concern though as it only has this feature since 2021. |
Is there any way to apply a workaround from my codebase? |
Sorry, we currently don't provide a warning code you could silence. 😕 Adding a code wouldn't be enough though: Fody's task would also need to take |
Afaik, MSBuild handles the warning suppression. You'd just need to use the MSBuild logger. |
You're right, I didn't know The following project doesn't display any warning: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<NoWarn>$(NoWarn);LOL</NoWarn>
</PropertyGroup>
<Target Name="Lol" AfterTargets="Build">
<Warning Code="LOL" Text="Hello" />
</Target>
</Project> It was introduced by dotnet/msbuild#5671 (the underlying magic property is actually |
Confused :) Is this workaround (my side) related? |
Well I was saying we could add error codes to Fody messages on our end, and that would require less work than I initially thought to silence Fody warnings. That would be a temporary "solution". I still intend to take a closer look at this issue when I'll have some time. |
@matkoch can you try https://www.nuget.org/packages/Fody/6.6.5-beta2 ? |
seems to work well! |
@tom-englert any idea when this could be released? |
…_been_processed_by_Fody #1167 assembly has already been processed by fody
@matkoch 6.7.0 is now available 😃 |
Danke dir Tom! :) |
build.sh
orbuild.ps1
msbuild.binlog
in the rootNote that calling
build.sh/ps1
will first compile all projects as part of compiling_build.csproj
. After that, the_build.csproj
will initiate another compilation. That's just what you end up when you do dogfooding :) Both produced warnings at some point.The suggested property from #1023 did not change anything, but if it's MAUI specific, that explains it.
Originally posted by @matkoch in #895 (comment)
The text was updated successfully, but these errors were encountered: