-
-
Notifications
You must be signed in to change notification settings - Fork 379
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
Deterministic build #881
Deterministic build #881
Conversation
In what way?
Wait a bit. Why? Just turning off this TFM you throw out the whole added code under |
This was the output of the build: Warning: C:\Program Files\dotnet\sdk\7.0.200\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'net5' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [D:\a\shouldly\shouldly\src\Shouldly\Shouldly.csproj::TargetFramework=net5]
D:\a\shouldly\shouldly\src\Shouldly\Shouldly.csproj : error NU1505: Warning As Error: Duplicate 'PackageDownload' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageDownload' items are: Microsoft.NETCore.App.Ref [5.0.0], Microsoft.NETCore.App.Ref [5.0.0]. [TargetFramework=net5]
Build FAILED. It seems that adding the TFM net5.0 adds Microsoft.NETCore.App.Ref implicitly. That causes I could observe that builds i made locally only show the first warning. Not the It might depend on the NuGet version of the build sdk. I think it would be best to add |
Now the build in appveyor failed after I habe added documentation about the flag in README.md. The failing test is |
Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
This seems not to work like expected. I am closing the PR until I found a solution. |
Ok. I figured out that MSBuild evaluates build properties in a way that it is not as easy as i thought to make it configureable. I described the configuration options and fallbacks in READEME.md. |
I've had a look, and this looks good, however I'm at the conclusion the the The |
Hi, what i could read in #795 was that there are two scenarios. The first is what most of the users will do. Use Shoudly in a test project. #795 (comment) explains that the settings in the The second scenario is that people want to use Shouldly in a project as a dependency. In this case I stumbled over this because of exactly this. For me this solution would be good enough. I can use all features locally in Visual Studio. On the build server I circumvent the settings with a flag. |
@iBrotNano @sungam3r could you give me your opinion on #883 I'm leaning towards this because what's proposed in this PR is fine, if you already know what's gone wrong. I've had many reports of people spending hours of investigation to then find Shoudly being culprit, that's something I think we should be avoiding as much as possible. |
Resolved in version 4.2.1 |
The build action was broken by #870. I had to remove the net5.0 target framework to make it work. It is already out of support so it should be removed anyway.
This pull request targets #795.
The idea is to make the configuration in
build.props
conditional. The standard way to use Shouldly is by referencing it in a test project. It should be no big deal to alter the build configuration of those. But if Shouldly is used in a non-test project those settings can break their builds. By setting a property<UseShouldlyInNonTestProject>true</UseShouldlyInNonTestProject>
in the CSPROJ the settings inbuild.props
should be ignored.This would address #795 (comment) without the need for multiple nugets.
It's an alternative to #795 (comment). Maybe more descriptive.