Skip to content
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

[dotnet] Regression on successive builds (without rebuild / clean) #11611

Closed
spouliot opened this issue May 19, 2021 · 4 comments · Fixed by #11797
Closed

[dotnet] Regression on successive builds (without rebuild / clean) #11611

spouliot opened this issue May 19, 2021 · 4 comments · Fixed by #11797
Assignees
Labels
bug If an issue is a bug or a pull request a bug fix dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release regression The issue or pull request is a regression
Milestone

Comments

@spouliot
Copy link
Contributor

Steps to Reproduce

  1. Use main HEAD
  2. build (make, make install, make system-install)
  3. cd tests/dotnet
  4. make compare
  5. make run-dotnet

Expected Behavior

Apps starts on a connected device, greeting you with "Hello World!"

Actual Behavior

Build FAILED.

/Users/poupou/git/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-6.0.100-preview.4.21218.6-osx-x64/packs/Microsoft.iOS.Sdk/14.5.100-ci.main.811/tools/msbuild/iOS/Xamarin.iOS.Common.targets(910,3): error MSB6006: "codesign" exited with code 1. [/Users/poupou/git/xamarin/xamarin-macios/tests/dotnet/size-comparison/MySingleView/dotnet/MySingleView.csproj]
    0 Warning(s)
    1 Error(s)

Problem

make compare does a dotnet build and make run-dotnet also does a dotnet build

The second build is incorrect. Codesign thinks it's not needed (and is skipped) but the verify steps is run (as it should) and complain the app is not signed (and it's not).

If there's a rebuild or clean between both things will work.

Also if you do a

git revert 94196bf767419c6b21346e94672c0aaf1ddad692

Then it works again, c.c. @rolfbjarne wrt 94196bf

@spouliot spouliot added bug If an issue is a bug or a pull request a bug fix regression The issue or pull request is a regression dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release labels May 19, 2021
@spouliot spouliot added this to the .NET 6 milestone May 19, 2021
@rolfbjarne rolfbjarne self-assigned this May 19, 2021
@VividDigital
Copy link

Came back to Xamarin for the first time in quite a while after being so frustrated by #6813, and here we are almost 2 years later running into the same issue. I first tried the simulator, but I can't get that to work because of this, then I tried to use a physical device and ran into this codesign error.....again. I have to clean in between each build and it takes forever, basically rendering development on this platform near impossible. Sad to see things still in this state. This issue was opened 6 days ago. Should it not be prioritized considering the road block it throws up?

@spouliot
Copy link
Contributor Author

This issue has not shipped anywhere.

  • Legacy (pre-net6) SDK are not affected by this issue.
  • net6 builds released today for the msbuild event are preview 4, which are earlier builds than the code that caused this issue.

IOW unless someone is doing net6 development out of main then it has no impact.

If you are using net6 builds out of main then you need to accept that some issues are bound to happen. Otherwise you should use official previews or stable releases.

@VividDigital
Copy link

I am having the same issue with current tooling. It may be that the cause isn't the same, but the outcome is. This was the first issue I saw that matched my issue so I commented here. I now see another open issue(#10641) from over 3 months ago that is similar as well.

@spouliot
Copy link
Contributor Author

I am having the same issue with current tooling.

No, it's definitively not the same issue.

It may be that the cause isn't the same, but the outcome is.

Exactly it might look similar but the reasons behind the issue are totally different. This is important because we're fixing this issue, not how it looks.

If you wait for this issue to be solved then I can guarantee it will not solve your current problem.

IOW if you have a problem please file your own issue and supply all the requested information.

We can easily merge (close as dupe) issues if they end up being identical. OTOH we can not know if your issue is different, than the one you commented in.

rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Jun 3, 2021
…les we add to 'ResolvedFileToPublish'. Fixes xamarin#11611.

Make sure to set CopyToPublishDirectory=PreserveNewest on files we add to
'ResolvedFileToPublish', so that they're not copied unnecessarily (in the case
of the native executable it would also remove the code signature).

Fixes xamarin#11611.
rolfbjarne added a commit that referenced this issue Jun 3, 2021
…les we add to 'ResolvedFileToPublish'. Fixes #11611. (#11797)

Make sure to set CopyToPublishDirectory=PreserveNewest on files we add to
'ResolvedFileToPublish', so that they're not copied unnecessarily (in the case
of the native executable it would also remove the code signature).

Fixes #11611.
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Jun 7, 2021
…ectory=PreserveNewest on files we add to 'ResolvedFileToPublish'. Fixes xamarin#11611. (xamarin#11797)

Make sure to set CopyToPublishDirectory=PreserveNewest on files we add to
'ResolvedFileToPublish', so that they're not copied unnecessarily (in the case
of the native executable it would also remove the code signature).

Fixes xamarin#11611.

Backport of xamarin#11797.
rolfbjarne added a commit that referenced this issue Jun 8, 2021
…ectory=PreserveNewest on files we add to 'ResolvedFileToPublish'. Fixes #11611. (#11797) (#11856)

Make sure to set CopyToPublishDirectory=PreserveNewest on files we add to
'ResolvedFileToPublish', so that they're not copied unnecessarily (in the case
of the native executable it would also remove the code signature).

Fixes #11611.

Backport of #11797.
@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug If an issue is a bug or a pull request a bug fix dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release regression The issue or pull request is a regression
Projects
None yet
3 participants