dotnet / dotnet/arcade

aspnetcore - Build break after Arcade update

Open
#13,911 19 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
729
Forks
397
Avg merge
3d 15m
Merged PRs (30d)
149

Description

- [x] This issue is blocking
Running build.cmd in the aspnetcore repo is broken at the moment.

- [ ] This issue is causing unreasonable pain

Hey all, we have a build break in aspnetcore since taking an Arcade update. The commit which breaks things is this one: [Update dependencies from https://github.com/dotnet/arcade build 20230… · dotnet/aspnetcore@cb40b05](https://github.com/dotnet/aspnetcore/commit/cb40b050193c104fdf484371512a9549be4a71b1)

The failure looks like this:

```
Unhandled exception. System.ArgumentException: The value cannot be an empty string. (Parameter 'path')
at System.ArgumentException.ThrowNullOrEmptyException(String argument, String paramName)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.OpenText(String path)
at TestTasks.InjectRequestHandler.Main(String[] args) in c:\code\aspnetcore\src\Servers\IIS\IIS\test\testassets\TestTasks\InjectRequestHandler.cs:line 27
c:\code\aspnetcore\src\Servers\IIS\build\testsite.props(77,5): error MSB3073: The command "dotnet c:\code\aspnetcore\src\Servers\IIS\build\..\IIS\test\testassets\TestTasks\bin\Debug\net8.0\TestTasks.d
ll "" " exited with code -532462766. [c:\code\aspnetcore\src\Servers\IIS\IIS\test\testassets\InProcessWebSite\InProcessWebSite.csproj]
```

I investigated this a bit and the issue seems to be that a `PublishDepsFilePath` that was previously populated is no longer being populated (note the empty string passed in in the first argument to the TestTasks thing).

Looking at the binlogs, it looks like the reason why it's not being populated is that the `GeneratePublishDependencyFile` target is being skipped now because `_UseBuildDependencyFile` is true.

`_UseBuildDependencyFile` is set in `_ComputeUseBuildDependencyFile` and has this condition:

```

<_TrimRuntimeAssets Condition="'$(PublishSingleFile)' == 'true' and '$(SelfContained)' == 'true'">true
<_UseBuildDependencyFile Condition="'@(_ExcludeFromPublishPackageReference)' == '' and
'@(RuntimeStorePackages)' == '' and
'$(PreserveStoreLayout)' != 'true' and
'$(PublishTrimmed)' != 'true' and
'$(_TrimRuntimeAssets)' != 'true'">true

```

Presumably one or more of those conditional clauses have flipped in value with the Arcade update?

I looked through the changes between the two arcade versions here: [Comparing 226c103b56a979243f08032e6cddb4deb66ea54b...60ea5b2eca5af06fc63b250f8669d2c70179b18c · dotnet/arcade (github.com)](https://github.com/dotnet/arcade/compare/226c103b56a979243f08032e6cddb4deb66ea54b...60ea5b2eca5af06fc63b250f8669d2c70179b18c)

and didn't see anything that seems like it would obviously affect this. That said, I'm by no means an Arcade expert and today was my first time looking at most of this so maybe I've missed something (or I'm not even looking at the right changes). Can someone please take a look? I can share the good/bad binlogs if that helps.

### Release Note Category
- [ ] Feature changes/additions
- [ ] Bug fixes
- [ ] Internal Infrastructure Improvements
### Release Note Description

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.