Skip to content

Remove cli.proj "AddNoWarnNU5104ByDefault" #569

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

Closed
dagood opened this issue May 21, 2018 · 4 comments
Closed

Remove cli.proj "AddNoWarnNU5104ByDefault" #569

dagood opened this issue May 21, 2018 · 4 comments
Labels
area-upstream-fix Needs a change in a contributing repo

Comments

@dagood
Copy link
Member

dagood commented May 21, 2018

This is a workaround for source-build using CLI 2.1.300-rc1-008673 vs. ProdCon using 2.2.0-preview1-007799, added in #565. (See #565 (comment).) We should remove it and make the CLI build compatible with the source-build tooling by default.

source-build/repos/cli.proj

Lines 120 to 140 in 2587b63

<!--
Ignore this error in the CLI build, which doesn't seem to happen in ProdCon:
error NU5104: A stable release of a package should not have a prerelease dependency. Either
modify the version spec of dependency "NuGet.Frameworks [4.7.0-rtm.5156, )" or update the
version field in the nuspec.
-->
<Target Name="AddNoWarnNU5104ByDefault" BeforeTargets="Build">
<PropertyGroup>
<BuildDefaultsFile>$(ProjectDirectory)build\BuildDefaults.props</BuildDefaultsFile>
<ReplacementEndMark>&lt;/NoWarn&gt;</ReplacementEndMark>
<InsertItemLine>;NU5104$(ReplacementEndMark)</InsertItemLine>
<BuildDefaultsPropsContents>$([System.IO.File]::ReadAllText('$(BuildDefaultsFile)'))</BuildDefaultsPropsContents>
</PropertyGroup>
<WriteLinesToFile File="$(BuildDefaultsFile)"
Lines="$(BuildDefaultsPropsContents.Replace('$(ReplacementEndMark)', '$(InsertItemLine)'))"
Condition="! $(BuildDefaultsPropsContents.Contains('$(InsertItemLine)'))"
Overwrite="true" />
</Target>

Attempting to use the source-build-provided stage0 without this workaround results in this kind of error:

Build FAILED.

...

"/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/build.proj" (default target) (1) ->
"/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/repos/known-good.proj" (Build target) (13:2) ->
"/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/repos/cli.proj" (Build target) (5:2) ->
(RepoBuild target) -> 
  /mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/src/cli/.dotnet_stage0/x64/sdk/2.1.300-rc1-008673/Sdks/NuGet.Build.Tasks.Pack/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(198,5): error NU5104: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency "NuGet.Frameworks [4.7.0-rtm.5156, )" or update the version field in the nuspec. [/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/src/cli/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj] [/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/src/cli/build.proj] [/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/repos/cli.proj]
  /mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/src/cli/.dotnet_stage0/x64/sdk/2.1.300-rc1-008673/Sdks/NuGet.Build.Tasks.Pack/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(198,5): error NU5104: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency "NuGet.Frameworks [4.7.0-rtm.5156, )" or update the version field in the nuspec. [/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/src/cli/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj] [/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/src/cli/build.proj] [/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/repos/cli.proj]
  /mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/repos/dir.targets(202,5): error MSB3073: The command "/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/src/cli/build.sh --stage0 /mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/Tools/dotnetcli/ --runtime-id centos.7-x64 /p:NETCoreAppMaximumVersion=99.9 /p:CoreSetupBlobRootUrl=file:///mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/bin/obj/x64/Release/blobs/ /p:PB_PackageVersionPropsUrl=file:///mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/bin/obj/x64/Release/PackageVersions.props /p:SkipBuildingInstallers=true /p:IncludeNuGetPackageArchive=false /p:IncludeAdditionalSharedFrameworks=false /p:UsePortableLinuxSharedFramework=false /p:IncludeSharedFrameworksForBackwardsCompatibilityTests=false /p:IncludeMSBuildSdkResolver=false '/p:CLITargets="Prepare;Compile;Package"' /v:detailed  /p:DotNetRestoreSourcePropsPath=/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/bin/obj/x64/Release/RestoreSources.props " exited with code 1. [/mnt/resource/j/workspace/dotnet_source-build/dev_release_2.1/CentOS7.1_Release_prtest/repos/cli.proj]

    368 Warning(s)
    3 Error(s)
@dseefeld dseefeld added area-upstream-fix Needs a change in a contributing repo triaged labels Jun 8, 2018
@dseefeld
Copy link
Contributor

dseefeld commented Jun 8, 2018

@dagood to create an issue in CLI to address this

@dagood
Copy link
Member Author

dagood commented Jun 8, 2018

Created https://github.com/dotnet/cli/issues/9445, which ended up broader than this issue: making the repo buildable with a 2.1.300 stage0. Once that's completed, we should be able to update the CLI submodule and remove the workaround.

@dagood
Copy link
Member Author

dagood commented Jun 11, 2018

dotnet/cli#9446 changed the CLI 2.1.3xx branch to use the 2.1.300 CLI as stage0, so once that gets into a 2.1.1 prodcon build we should be able to get rid of this workaround.

@MichaelSimons
Copy link
Member

[Triage] This target no longer exists. Closing as obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-upstream-fix Needs a change in a contributing repo
Projects
None yet
Development

No branches or pull requests

3 participants