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

build.cmd fails when latest int preview of dev17 is installed #13047

Closed
Tracked by #12964
vzarytovskii opened this issue Apr 26, 2022 · 6 comments
Closed
Tracked by #12964

build.cmd fails when latest int preview of dev17 is installed #13047

vzarytovskii opened this issue Apr 26, 2022 · 6 comments
Labels

Comments

@vzarytovskii
Copy link
Member

It builds fine from latest public VS2022 developer shell.

image

Build FAILED.

C:\Users\vlza\code\fsharp\vsintegration\src\FSharp.ProjectSystem.Base\FSharp.ProjectSystem.Base.csproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functi
onality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: Microsoft.VisualStudio.ProjectAggregator 17.0.0-previews-4-31709-430, Microsoft.VisualStudio.ProjectAggregator 17.0.0-p
reviews-4-31709-430.
C:\Users\vlza\code\fsharp\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure
 a consistent restore behavior. The duplicate 'PackageReference' items are: Microsoft.Build.Framework 17.0.0, Microsoft.Build.Framework 17.0.0; System.Runtime.CompilerServices.Unsafe 5.0.0, System.Runtime.Compile
rServices.Unsafe 5.0.0; NUnit 3.13.2, NUnit 3.13.2.
C:\Users\vlza\code\fsharp\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure
 a consistent restore behavior. The duplicate 'PackageReference' items are: Microsoft.Build.Framework 17.0.0, Microsoft.Build.Framework 17.0.0; System.Runtime.CompilerServices.Unsafe 5.0.0, System.Runtime.Compile
rServices.Unsafe 5.0.0; NUnit 3.13.2, NUnit 3.13.2.
C:\Users\vlza\code\fsharp\vsintegration\src\FSharp.ProjectSystem.PropertyPages\FSharp.ProjectSystem.PropertyPages.vbproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use
 the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: System.Reflection.Metadata 5.0.0, System.Reflection.Metadata 5.0.0.
C:\Users\vlza\code\fsharp\src\fsharp\fsi\fsi.fsproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. Th
e duplicate 'PackageReference' items are: System.Diagnostics.Process 4.3.0, System.Diagnostics.Process 4.3.0; System.Linq.Expressions 4.3.0, System.Linq.Expressions 4.3.0; System.Reflection.Emit 4.3.0, System.Ref
lection.Emit 4.3.0; System.Reflection.TypeExtensions 4.3.0, System.Reflection.TypeExtensions 4.3.0; System.Reflection.Metadata 5.0.0, System.Reflection.Metadata 5.0.0; System.Runtime.Loader 4.3.0, System.Runtime.
Loader 4.3.0; System.Security.Principal 4.3.0, System.Security.Principal 4.3.0; System.Threading.Thread 4.3.0, System.Threading.Thread 4.3.0.
C:\Users\vlza\code\fsharp\src\fsharp\fsi\fsi.fsproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. Th
e duplicate 'PackageReference' items are: System.Diagnostics.Process 4.3.0, System.Diagnostics.Process 4.3.0; System.Linq.Expressions 4.3.0, System.Linq.Expressions 4.3.0; System.Reflection.Emit 4.3.0, System.Ref
lection.Emit 4.3.0; System.Reflection.TypeExtensions 4.3.0, System.Reflection.TypeExtensions 4.3.0; System.Reflection.Metadata 5.0.0, System.Reflection.Metadata 5.0.0; System.Runtime.Loader 4.3.0, System.Runtime.
Loader 4.3.0; System.Security.Principal 4.3.0, System.Security.Principal 4.3.0; System.Threading.Thread 4.3.0, System.Threading.Thread 4.3.0.
C:\Users\vlza\code\fsharp\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure
 a consistent restore behavior. The duplicate 'PackageReference' items are: Microsoft.Build.Framework 17.0.0, Microsoft.Build.Framework 17.0.0; System.Runtime.CompilerServices.Unsafe 5.0.0, System.Runtime.Compile
rServices.Unsafe 5.0.0; NUnit 3.13.2, NUnit 3.13.2.
C:\Users\vlza\code\fsharp\vsintegration\src\FSharp.ProjectSystem.PropertyPages\FSharp.ProjectSystem.PropertyPages.vbproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use
 the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: System.Reflection.Metadata 5.0.0, System.Reflection.Metadata 5.0.0.
C:\Users\vlza\code\fsharp\vsintegration\src\FSharp.ProjectSystem.Base\FSharp.ProjectSystem.Base.csproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functi
onality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: Microsoft.VisualStudio.ProjectAggregator 17.0.0-previews-4-31709-430, Microsoft.VisualStudio.ProjectAggregator 17.0.0-p
reviews-4-31709-430.
C:\Users\vlza\code\fsharp\src\fsharp\fsi\fsi.fsproj : error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. Th
e duplicate 'PackageReference' items are: System.Diagnostics.Process 4.3.0, System.Diagnostics.Process 4.3.0; System.Linq.Expressions 4.3.0, System.Linq.Expressions 4.3.0; System.Reflection.Emit 4.3.0, System.Ref
lection.Emit 4.3.0; System.Reflection.TypeExtensions 4.3.0, System.Reflection.TypeExtensions 4.3.0; System.Reflection.Metadata 5.0.0, System.Reflection.Metadata 5.0.0; System.Runtime.Loader 4.3.0, System.Runtime.
Loader 4.3.0; System.Security.Principal 4.3.0, System.Security.Principal 4.3.0; System.Threading.Thread 4.3.0, System.Threading.Thread 4.3.0.
    0 Warning(s)
    10 Error(s)

Time Elapsed 00:03:34.67
@KevinRansom
Copy link
Member

Do we think this is an issue with our repo or arcade or the dotnet sdk?

@baronfel
Copy link
Member

baronfel commented Apr 26, 2022

We have this in the SDK itself, too - NuGet added some new features for detecting cycles in this spec. These particular errors are likely due to SDK targets, and we may incidentally end up fixing them as part of dotnet/sdk#24747. I need to triage that one soon. As you can see from the linked SDK issue, tons of MS repos are disabling the warning until we fix it.

@vzarytovskii
Copy link
Member Author

Okay I will disable this warning for the time being.

@vzarytovskii
Copy link
Member Author

Workaround merged in #13055

@vzarytovskii
Copy link
Member Author

vzarytovskii commented May 3, 2022

We got another batch of issues, this time mostly in vsintegration:

error NU1504: Duplicate 'PackageReference' items found. Remove the duplicate item
s or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: System.Runtime.CompilerServices.Unsafe 6.0.0, System.Runtim
e.CompilerServices.Unsafe 6.0.0.

FYI @baronfel
Also, it's different error - nu1504 vs nu1505 mentioned in dotnet/sdk#24747

@vzarytovskii vzarytovskii reopened this May 3, 2022
@baronfel
Copy link
Member

baronfel commented May 3, 2022

Couple quick notes, will update as I see things:

  • System.Runtime.CompilerServices.Unsafe error is because of these two duplicate references, which should be consolidated
  • FSharp.ProjectSystem.Base.csproj does have duplicate PackageReference items for Microsoft.VisualStudio.ProjectAggregator, also an easy fix
  • VisualFSharp.UnitTests.fsproj are duplicate as well - both the fsproj and the vsintegration/Directory.Build.targets have the Microsoft.Build.Framework PackageReference in them. Possibly some build logic needs to change here on your part
    • the NoMsbuild condition doesn't seem to be used anywhere - so I think these references are just universal
  • FSharp.ProjectSystem.PropertyPages.vbproj - same thing, duplicated PackageReferences between the project file and the vsintegration/Directory.Build.targets
  • Fsi.fsproj - duplicate packagereferences in the project file here too.

baronfel added a commit to baronfel/fsharp that referenced this issue May 4, 2022
KevinRansom pushed a commit that referenced this issue May 4, 2022
* reduce duplicate packagereferences per #13047 (comment)

* remove nu1504 nowarns now that we are hopefully compliant.
charlesroddie pushed a commit to charlesroddie/fsharp that referenced this issue May 2, 2023
* reduce duplicate packagereferences per dotnet#13047 (comment)

* remove nu1504 nowarns now that we are hopefully compliant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants