-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Build fails on missing generated files #14941
Comments
@eddynaka Is it possible for you to share a binlog for the failure? That looks like this line sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateAssemblyInfo.targets Line 21 in c816dee
is missing some information--but it doesn't make much sense for |
@rainersigwald , i will configure the binlog. The issue is that it does not happen always. So, will keep triggering the build. |
@rainersigwald, how do I enable for dotnet builds? I saw commands just for MSBuild and in the dotnet docs, I couldn't find anything related. Thank you! |
Add The log will be written to (Make sure none of your CI secrets end up in it. Binlogs end up with a listing of all environment variables.) |
@PathogenDavid , thank you! will add and check! |
Now, since the issue does not happen all the time, a binlog from a successful build would be useful? |
A failing binlog would be better, but a successful one might help. @rainersigwald Per the error message, the file it can't find is So it looks like the |
Attached you can find a working binlog (build that succeeded). For the |
🤦🏻♂️ I'm going to blame Friday Brain for that one. @eddynaka The unusual path is caused by this line in <TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath> That's essentially a copy/paste of the line Daniel linked above but in MSBuild order matters--and here the properties While having a funky path/filename there is nonfatal, I think the lack of Can you just delete that line from |
@rainersigwald , that is used for the github sourcelink when we have a multitarget project. Adding the flag |
Can you clarify please? Since this is a generated file it shouldn't have any sourcelink impact--there's no GitHub URL for the file.
Probably, but this will slow down your build to work around a bug in the build. I recommend fixing the bug instead. |
@rainersigwald to generate a deterministic build we needed this. https://github.com/clairernovotny/DeterministicBuilds |
Ah, thanks! That's no longer needed, but if you want to continue to support building with older SDKs, you should move that line to a |
@rainersigwald , what do you mean by "older SDKs"? Can you give me an example? So I can see if I need to move that to the targets or to remove that. Thank you again! |
@eddynaka That link calls out SDKs <= |
Ok. Got it. You can close this! |
Hi,
I started to see this in one of my Azure Pipeline builds for the specific
.AssemblyAttributes
file but random projects:I observed that this started to happen after net5.0 got installed by default in windows-latest machines.
environment: windows-latest azure pipeline
dotnet versions: 2.1.x, 3.1.x, 5.0.x (versions pre-installed).
cc: @jasonmalinowski
The text was updated successfully, but these errors were encountered: