Open zlepper opened 6 months ago
I don't think we can realistically make this work. It's going to try to build /nix/store/f1dl7hsx0c5hqwfhnps2i9yw2kgr5z8-my-web-api.csproj
, which is no longer in it's source-tree, so it won't be able to find source files, nuget.config, global.json, etc.
projectFile
really needs to be a relative path to something inside src
. Perhaps we could a check for this?
That's entirely fair, I do try to create reports to also help other people encountering the issue in the future, so maybe they can get unstuck :)
Adding a check and giving a meaningful error would be the best approach here. It'd improve UX without having to do any drastic changes
Describe the bug
If you specify the
projectFile
attribute using a path rather than a string forbuildDotnetModule
then you get a build failure due to duplicate assembly attributes.Working:
Not working:
default.nix file:
As a side note: I'm not sure it should even work with a path, but my naive expectations says it should, so those might be in the wrong here instead :)
Steps To Reproduce
dotnet new webapi --name my-web-api
nix-build -A my-web-api.fetch-deps
and./result
nix-build -A my-web-api
Expected behavior
It builds in both cases
Additional context
Logs from failure:
Notify maintainers
@corngood @mdarocha
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.