-
Couldn't load subscription status.
- Fork 1.2k
Apply conflict resolution to RuntimeTargets items #1121
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
Changes from all commits
20d6230
0071f52
176e559
c7036c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,21 @@ Copyright (c) .NET Foundation. All rights reserved. | |
| To do this, we look at the files that would be copied local when CopyLocalLockFileAssemblies is true | ||
| --> | ||
| <_LockFileAssemblies Include="@(AllCopyLocalItems->WithMetadataValue('Type', 'assembly'))" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Existing issue, but we also need to do conflict resolution of native assets. Is that covered by this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like it is. NuGet.ProjectModel is returning "assembly" for the Type property for this entry in the assets file: "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {
"type": "package",
"runtimeTargets": {
"runtimes/debian.8-x64/native/System.Security.Cryptography.Native.OpenSsl.so": {
"assetType": "native",
"rid": "debian.8-x64"
}
}
},So when we get to this line, it is included in what we pass to the conflict resolution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. interesting, I guess the deps file is still correct since that gets copied from assets but this is something @eerhardt might hit if we tried to reconstruct the deps file from these items. |
||
|
|
||
|
|
||
| <!-- Also include RuntimeTarget items, which aren't included in AllCopyLocalItems, but need to be considered | ||
| for conflict resolution --> | ||
| <_RuntimeTargetItems Include="@(_ActiveTFMFileDependencies->WithMetadataValue('FileGroup', 'RuntimeTarget'))" /> | ||
| <__RuntimeTargetPublishItems Include="@(FileDefinitions)" Exclude="@(_RuntimeTargetItems)" /> | ||
| <_RuntimeTargetPublishItems Include="@(FileDefinitions)" Exclude="@(__RuntimeTargetPublishItems)" /> | ||
|
|
||
| <_LockFileAssemblies Include="@(_RuntimeTargetPublishItems->WithMetadataValue('Type', 'assembly')->'%(ResolvedPath)')"> | ||
| <Private>false</Private> | ||
| <NuGetIsFrameworkReference>false</NuGetIsFrameworkReference> | ||
| <NuGetSourceType>Package</NuGetSourceType> | ||
| <NuGetPackageId>%(PackageName)</NuGetPackageId> | ||
| <NuGetPackageVersion>%(PackageVersion)</NuGetPackageVersion> | ||
| </_LockFileAssemblies> | ||
| </ItemGroup> | ||
|
|
||
| <ResolvePackageFileConflicts References="@(Reference)" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
| using System.Xml.Linq; | ||
|
|
||
| namespace Microsoft.NET.TestFramework | ||
| { | ||
| public class ConflictResolutionAssets | ||
| { | ||
| public static IEnumerable<Tuple<string, string>> ConflictResolutionDependencies | ||
| { | ||
| get | ||
| { | ||
| string netstandardDependenciesXml = @" | ||
| <group targetFramework="".NETStandard1.3""> | ||
| <!--dependency id=""Microsoft.NETCore.Platforms"" version=""1.1.0"" /--> | ||
| <dependency id=""Microsoft.Win32.Primitives"" version=""4.3.0"" /> | ||
| <dependency id=""System.AppContext"" version=""4.3.0"" /> | ||
| <dependency id=""System.Collections"" version=""4.3.0"" /> | ||
| <dependency id=""System.Collections.Concurrent"" version=""4.3.0"" /> | ||
| <dependency id=""System.Console"" version=""4.3.0"" /> | ||
| <dependency id=""System.Diagnostics.Debug"" version=""4.3.0"" /> | ||
| <dependency id=""System.Diagnostics.Tools"" version=""4.3.0"" /> | ||
| <dependency id=""System.Diagnostics.Tracing"" version=""4.3.0"" /> | ||
| <dependency id=""System.Globalization"" version=""4.3.0"" /> | ||
| <dependency id=""System.Globalization.Calendars"" version=""4.3.0"" /> | ||
| <dependency id=""System.IO"" version=""4.3.0"" /> | ||
| <dependency id=""System.IO.Compression"" version=""4.3.0"" /> | ||
| <dependency id=""System.IO.Compression.ZipFile"" version=""4.3.0"" /> | ||
| <dependency id=""System.IO.FileSystem"" version=""4.3.0"" /> | ||
| <dependency id=""System.IO.FileSystem.Primitives"" version=""4.3.0"" /> | ||
| <dependency id=""System.Linq"" version=""4.3.0"" /> | ||
| <dependency id=""System.Linq.Expressions"" version=""4.3.0"" /> | ||
| <dependency id=""System.Net.Http"" version=""4.3.0"" /> | ||
| <dependency id=""System.Net.Primitives"" version=""4.3.0"" /> | ||
| <dependency id=""System.Net.Sockets"" version=""4.3.0"" /> | ||
| <dependency id=""System.ObjectModel"" version=""4.3.0"" /> | ||
| <dependency id=""System.Reflection"" version=""4.3.0"" /> | ||
| <dependency id=""System.Reflection.Extensions"" version=""4.3.0"" /> | ||
| <dependency id=""System.Reflection.Primitives"" version=""4.3.0"" /> | ||
| <dependency id=""System.Resources.ResourceManager"" version=""4.3.0"" /> | ||
| <dependency id=""System.Runtime"" version=""4.3.0"" /> | ||
| <dependency id=""System.Runtime.Extensions"" version=""4.3.0"" /> | ||
| <dependency id=""System.Runtime.Handles"" version=""4.3.0"" /> | ||
| <dependency id=""System.Runtime.InteropServices"" version=""4.3.0"" /> | ||
| <dependency id=""System.Runtime.InteropServices.RuntimeInformation"" version=""4.3.0"" /> | ||
| <dependency id=""System.Runtime.Numerics"" version=""4.3.0"" /> | ||
| <dependency id=""System.Security.Cryptography.Algorithms"" version=""4.3.0"" /> | ||
| <dependency id=""System.Security.Cryptography.Encoding"" version=""4.3.0"" /> | ||
| <dependency id=""System.Security.Cryptography.Primitives"" version=""4.3.0"" /> | ||
| <dependency id=""System.Security.Cryptography.X509Certificates"" version=""4.3.0"" /> | ||
| <dependency id=""System.Text.Encoding"" version=""4.3.0"" /> | ||
| <dependency id=""System.Text.Encoding.Extensions"" version=""4.3.0"" /> | ||
| <dependency id=""System.Text.RegularExpressions"" version=""4.3.0"" /> | ||
| <dependency id=""System.Threading"" version=""4.3.0"" /> | ||
| <dependency id=""System.Threading.Tasks"" version=""4.3.0"" /> | ||
| <dependency id=""System.Threading.Timer"" version=""4.3.0"" /> | ||
| <dependency id=""System.Xml.ReaderWriter"" version=""4.3.0"" /> | ||
| <dependency id=""System.Xml.XDocument"" version=""4.3.0"" /> | ||
| </group>"; | ||
|
|
||
| XElement netStandardDependencies = XElement.Parse(netstandardDependenciesXml); | ||
|
|
||
| foreach (var dependency in netStandardDependencies.Elements("dependency")) | ||
| { | ||
| yield return Tuple.Create(dependency.Attribute("id").Value, dependency.Attribute("version").Value); | ||
| } | ||
|
|
||
| yield return Tuple.Create("System.Diagnostics.TraceSource", "4.0.0"); | ||
| } | ||
| } | ||
|
|
||
| public static string ConflictResolutionTestMethod | ||
| { | ||
| get | ||
| { | ||
| return @" | ||
| public static void TestConflictResolution() | ||
| { | ||
| new System.Diagnostics.TraceSource(""ConflictTest""); | ||
| }"; | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this comment?