Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Update the dotnet SDK to 3.0.100-preview6-011681 (latest) #37340

Merged
merged 4 commits into from
May 6, 2019

Conversation

ViktorHofer
Copy link
Member

As discussed here: dotnet/arcade#2654

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check that this had the fix we want? You should be able to see the feeds missing from Microsoft.NETCoreSdk.BundledVersions.props.

@ViktorHofer
Copy link
Member Author

Yes that version contains the fix, I just checked.

@ViktorHofer
Copy link
Member Author

ViktorHofer commented May 1, 2019

@ericstj can you please take a look at the failures? This seems to be your area of expertise:

/Users/vsts/agent/2.150.3/work/1/s/.packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19229.8/build/Packaging.targets(774,5): error MSB4018: The "GenerateRuntimeDependencies" task failed unexpectedly. [/Users/vsts/agent/2.150.3/work/1/s/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/Users/vsts/agent/2.150.3/work/1/s/.packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19229.8/build/Packaging.targets(774,5): error MSB4018: System.TypeLoadException: Method 'WriteArrayStart' in type 'RuntimeJsonWriter' from assembly 'Microsoft.DotNet.Build.Tasks.Packaging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. [/Users/vsts/agent/2.150.3/work/1/s/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/Users/vsts/agent/2.150.3/work/1/s/.packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19229.8/build/Packaging.targets(774,5): error MSB4018:    at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.SaveRuntimeGraph(String filePath, RuntimeGraph runtimeGraph) [/Users/vsts/agent/2.150.3/work/1/s/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/Users/vsts/agent/2.150.3/work/1/s/.packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19229.8/build/Packaging.targets(774,5): error MSB4018:    at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateRuntimeDependencies.cs:line 147 [/Users/vsts/agent/2.150.3/work/1/s/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/Users/vsts/agent/2.150.3/work/1/s/.packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19229.8/build/Packaging.targets(774,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/Users/vsts/agent/2.150.3/work/1/s/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/Users/vsts/agent/2.150.3/work/1/s/.packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19229.8/build/Packaging.targets(774,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/Users/vsts/agent/2.150.3/work/1/s/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]

@ericstj
Copy link
Member

ericstj commented May 1, 2019

Sigh another breaking Nuget change: they added members to a public interface... NuGet/NuGet.Client@32d984b#diff-80bb91cd6c8952511294d414a7e387b4

@ericstj
Copy link
Member

ericstj commented May 1, 2019

Looks like NuGet fixed the bug that caused me to implement that interface, so I can delete my implementation. NuGet/Home#4717

@ViktorHofer
Copy link
Member Author

One of the few occasions when a breaking change makes you happy 😁

@ericstj
Copy link
Member

ericstj commented May 1, 2019

Nope, looks like that wasn't actually fixed. I'll just update it to add those additional methods. I can't do that without breaking task consumption on folks with older SDKs, given we don't care about the old client versions that can't read this format I'll just remove the workaround and use the format NuGet writes.

@dagood
Copy link
Member

dagood commented May 2, 2019

FYI @crummel @dseefeld for source-build.

Maybe ok as long as preview6 builds are compatible with the final preview5 SDK so source-build doesn't fail when it forces the version, but always a risk.

@dagood
Copy link
Member

dagood commented May 2, 2019

(Reading more, sounds like it won't be compatible due to that NuGet breaking change though. 😕 Edit: Oh, now I see dotnet/arcade#2664, maybe it is fine.)

@ViktorHofer
Copy link
Member Author

@tmat seems like your change dotnet/arcade@c4bb6c1 is causing the build failures. Any idea how to fix?

cc @ericstj

@tmat
Copy link
Member

tmat commented May 2, 2019

@ViktorHofer The problem seems to be that CoreFX pkgproj files do not import common targets.
The VersionSuffix is now calculated in CustomBeforeMicrosoftCommonTargets, which are not imported by pkgproj files.

The fix would be to import common targets or to at least import

<Import Project="$(CustomBeforeMicrosoftCommonTargets)" Condition="'$(CustomBeforeMicrosoftCommonTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonTargets)')"/>

@ViktorHofer
Copy link
Member Author

ViktorHofer commented May 2, 2019

@ericstj can you please take a look at this as pkgproj is also your area-of-expertise :)

@ericstj
Copy link
Member

ericstj commented May 2, 2019

Pkgproj isn’t the only place that uses version and doesn’t import common.targets. @tmat please consider a general fix for this regression. You should be able to detect if a project is using common props/targets and decide to import the version targets as was done before.

@tmat
Copy link
Member

tmat commented May 2, 2019

Sure, I can work around for now. But I think we should require all projects to import common targets. If they don't things like Directory.Build.props etc. won't work.

@tmat
Copy link
Member

tmat commented May 2, 2019

dotnet/arcade#2677

@ViktorHofer ViktorHofer force-pushed the ViktorHofer-sdk-3.0.100-preview6 branch from 68e86bc to f01f14a Compare May 3, 2019 21:01
@ViktorHofer ViktorHofer closed this May 3, 2019
@ViktorHofer ViktorHofer reopened this May 3, 2019
@ViktorHofer ViktorHofer closed this May 4, 2019
@ViktorHofer ViktorHofer reopened this May 4, 2019
@ViktorHofer ViktorHofer force-pushed the ViktorHofer-sdk-3.0.100-preview6 branch from f2c378a to 086d321 Compare May 4, 2019 11:06
@ericstj
Copy link
Member

ericstj commented May 6, 2019

I had to downgrade ApiCompat as there seems to be a bug in a newer version,

Can you elaborate? I didn't see any mention here. I was actually waiting to merge dotnet/arcade#2672 so that I wouldn't slow down this PR.

Copying the error from the all configurations leg:

C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018: The "ResolvePackageFileConflicts" task failed unexpectedly. [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]
C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018: System.InvalidOperationException: NuGetPackageId metadata not set on System.IO.Compression [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]
C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ConflictResolution.ConflictItem.get_PackageId() in /_/src/Tasks/Common/ConflictResolution/ConflictItem.cs:line 184 [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]
C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ConflictResolution.PackageOverrideResolver`1.Resolve(TConflictItem item1, TConflictItem item2) in /_/src/Tasks/Common/ConflictResolution/PackageOverrideResolver.cs:line 81 [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]
C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ConflictResolution.ConflictResolver`1.ResolveConflict(TConflictItem item1, TConflictItem item2, Boolean logUnresolvedConflicts) in /_/src/Tasks/Common/ConflictResolution/ConflictResolver.cs:line 177 [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]
C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ConflictResolution.ConflictResolver`1.ResolveConflicts(IEnumerable`1 conflictItems, Func`2 getItemKey, ConflictCallback`1 foundConflict, Boolean commitWinner) in /_/src/Tasks/Common/ConflictResolution/ConflictResolver.cs:line 56 [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]
C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ConflictResolution.ResolvePackageFileConflicts.ExecuteCore() in /_/src/Tasks/Common/ConflictResolution/ResolvePackageFileConflicts.cs:line 84 [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]
C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 39 [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]
C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]
C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Payload\tools\sdk\3.0.100-preview6-011681\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(39,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\dotnetbuild\work\caaa8817-d481-4bd0-8007-28bacc128dee\Work\d4a0b439-c696-4419-bace-59be4cfcd44c\Unzip\net461\project.csproj]

This is the SDK breaking itself. It looks like it is failing because of Package ID on framework references. /cc @dsplaisted

@ViktorHofer
Copy link
Member Author

ViktorHofer commented May 6, 2019

Can you elaborate? I didn't see any mention here. I was actually waiting to merge dotnet/arcade#2672 so that I wouldn't slow down this PR.

ApiCompat complained that Abstract members in the implementation aren't in the contract. I checked them and they were internal abstract ones. Does that maybe ring any bells? Unfortunately I didn't copy the log and force pushed over it. If you need the precise error message I recommend to run corefx locally against the most recent version of ApiCompat.

@ViktorHofer
Copy link
Member Author

OK, produced the ApiCompat errors:

C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Security.AccessControl.GenericSecurityDescriptor.GenericDacl' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Security.AccessControl\src\System.Security.AccessControl.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Security.AccessControl.GenericSecurityDescriptor.GenericSacl' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Security.AccessControl\src\System.Security.AccessControl.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Security.AccessControl.GenericSecurityDescriptor.GenericDacl.get()' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Security.AccessControl\src\System.Security.AccessControl.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Security.AccessControl.GenericSecurityDescriptor.GenericSacl.get()' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Security.AccessControl\src\System.Security.AccessControl.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(85,5): error : ApiCompat failed for 'C:\git\corefx\artifacts\bin\System.Security.AccessControl\netcoreapp-Windows_NT-Debug\System.Security.AccessControl.dll' [C:\git\corefx\src\System.Security.AccessControl\src\System.Security.AccessControl.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.BuiltInWhitespaceFacet' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.FacetsChecker' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.HasLexicalFacets' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.HasValueFacets' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.Restriction' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueConverter' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.BuiltInWhitespaceFacet.get()' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.Compare(System.Object, System.Object)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.DeriveByList(System.Xml.Schema.XmlSchemaType)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.DeriveByRestriction(System.Xml.Schema.XmlSchemaObjectCollection, System.Xml.XmlNameTable, System.Xml.Schema.XmlSchemaType)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.FacetsChecker.get()' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.HasLexicalFacets.get()' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.HasValueFacets.get()' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.IsComparable(System.Xml.Schema.XmlSchemaDatatype)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.IsEqual(System.Object, System.Object)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver, System.Boolean)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.Restriction.get()' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.TryParseValue(System.Object, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver, System.Object)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.TryParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver, System.Object)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueConverter.get()' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaDatatype.VerifySchemaValid(System.Xml.Schema.XmlSchemaObjectTable, System.Xml.Schema.XmlSchemaObject)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Xml.Schema.XmlSchemaGroupBase.SetItems(System.Xml.Schema.XmlSchemaObjectCollection)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(85,5): error : ApiCompat failed for 'C:\git\corefx\artifacts\bin\System.Xml.ReaderWriter\netcoreapp-Windows_NT-Debug\System.Xml.ReaderWriter.dll' [C:\git\corefx\src\System.Xml.ReaderWriter\src\System.Xml.ReaderWriter.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(72,5): error : CannotAddAbstractMembers : Member 'System.Diagnostics.Tracing.DiagnosticCounter.WritePayload(System.Single, System.Int32)' is abstract in the implementation but is missing in the contract. [C:\git\corefx\src\System.Diagnostics.Tracing\src\System.Diagnostics.Tracing.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\1.0.0-beta.19254.1\build\Microsoft.DotNet.ApiCompat.targets(85,5): error : ApiCompat failed for 'C:\git\corefx\artifacts\bin\System.Diagnostics.Tracing\netcoreapp-Windows_NT-Debug\System.Diagnostics.Tracing.dll' [C:\git\corefx\src\System.Diagnostics.Tracing\src\System.Diagnostics.Tracing.csproj]

@natemcmaster
Copy link

resource generation

The problem is evaluation order.

<!-- Include files under StringResourcesPath by convention unless OmitResources is set. -->
<ItemGroup Condition="'$(StringResourcesPath)' != '' AND '$(OmitResources)' != 'true'">
<EmbeddedResource Include="$(StringResourcesPath)">
<Visible>true</Visible>
<ManifestResourceName>$(StringResourcesName)</ManifestResourceName>
<GenerateSource>true</GenerateSource>
<ClassName>$(StringResourcesNamespace).$(StringResourcesClassName)</ClassName>
</EmbeddedResource>
</ItemGroup>
This code defines an EmbeddedResource group after Arcade and Microsoft.NET.Sdk targets are imported, so it is not picking up this item when looking for resx files with GenerateSource==true. I would recommend moving this item group to a props earlier in the project evaluation, such as putting it in Directory.Build.props.

@ericstj
Copy link
Member

ericstj commented May 6, 2019

Are you sure it is after?

<Import Project="$(RepositoryEngineeringDir)blockReflectionAttribute.targets" />
<Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" />
<Import Project="$(RepositoryEngineeringDir)depProj.targets" Condition="'$(MSBuildProjectExtension)' == '.depproj'" />
<Import Project="$(RepositoryEngineeringDir)Resources.targets" />
<Import Project="$(RepositoryEngineeringDir)references.targets" />
<Import Project="$(RepositoryEngineeringDir)resolveContract.targets" />
<Import Project="$(ToolSetCommonDirectory)Tools.proj.nuget.g.targets" Condition="Exists('$(ToolSetCommonDirectory)Tools.proj.nuget.g.targets')" />
<!-- permit a wrapping build system to contribute targets to this build -->
<Import Condition="Exists('$(MSBuildThisFileDirectory)..\open.targets')" Project="$(MSBuildThisFileDirectory)..\open.targets" />
<Import Project="$(RepositoryEngineeringDir)referenceFromRuntime.targets" />
<Import Project="$(RepositoryEngineeringDir)illink.targets" />

@ericstj
Copy link
Member

ericstj commented May 6, 2019

Oh, you're right, this isn't in the NuGet targets, its in sdk targets:

<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

@natemcmaster's suggestion is a good one since it will fix our design time builds when folks modify resx files. We can move the Resources.targets above the SDK.targets import. We shouldn't move into props since we have properties that can be set by projects:

<StringResourcesPath Condition="'$(StringResourcesPath)' == '' AND Exists('$(MSBuildProjectDirectory)/Resources/Strings.resx')">$(MSBuildProjectDirectory)/Resources/Strings.resx</StringResourcesPath>
<StringResourcesNamespace Condition="'$(StringResourcesNamespace)' == ''">System</StringResourcesNamespace>
<StringResourcesClassName Condition="'$(StringResourcesClassName)' == ''">SR</StringResourcesClassName>
<StringResourcesName Condition="'$(StringResourcesName)' == ''">FxResources.$(AssemblyName).$(StringResourcesClassName)</StringResourcesName>
.

@ericstj
Copy link
Member

ericstj commented May 6, 2019

@Anipik it looks like your change around internal abstract members is flagging a few other types that have the same problem.

@ericstj
Copy link
Member

ericstj commented May 6, 2019

The following types should get an internal constructor, today they have protected constructors:

  • System.Security.AccessControl.GenericSecurityDescriptor
  • System.Xml.Schema.XmlSchemaDatatype

This one needs a closer look, since it was just added within the last couple months.

 CannotAddAbstractMembers : Member 'System.Diagnostics.Tracing.DiagnosticCounter.WritePayload(System.Single, System.Int32)' is abstract in the implementation but is missing in the contract`

@sywhang was it your intent that this new type be an internal only abstraction? If not then you should make this member protected. If you wanted this to be an an internal abstraction then you should make the constructor internal and not public.

@Anipik
Copy link

Anipik commented May 6, 2019

@ericstj I will throw up a pr to fix the first 2 atleast

@ViktorHofer
Copy link
Member Author

@Anipik would be great if you could also baseline the third one in your PR so that I don't have to touch that here.

@Anipik
Copy link

Anipik commented May 6, 2019

@ViktorHofer sure

@ericstj
Copy link
Member

ericstj commented May 6, 2019

The package testing was failing because as the SDK probed up the path it found the nuspec we happened to copy here:

<TestSupportFiles Include="$(PackagingTaskDir)..\..\**\*.*">
<DestinationFolder>$(TestToolsDir)%(RecursiveDir)</DestinationFolder>
</TestSupportFiles>

We should instead do this:

    <TestSupportFiles Include="$(PackagingTaskDir)..\..\**\*.*" Exclude="$(PackagingTaskDir)..\..\*.*">
      <DestinationFolder>$(TestToolsDir)%(RecursiveDir)</DestinationFolder>
    </TestSupportFiles>

So that we don't unintentionally copy the root nupkg/nuspec from the package directory.

@ViktorHofer ViktorHofer force-pushed the ViktorHofer-sdk-3.0.100-preview6 branch from cac646f to 81c8d18 Compare May 6, 2019 19:11
@@ -15,6 +15,7 @@
<StrongNameKeyId Condition="'$(IsTestProject)' == 'true'">$(TestStrongNameKeyId)</StrongNameKeyId>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)Resources.targets" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@natemcmaster it is unfortunate that the Arcade change now relies on the importing order. Is there a way to fix this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this particular case, it's tricky. To make Visual Studio editing of .resx files work well, we need to set metadata on an item during static evaluation. There is no perfect solution for import ordering when it comes to static evaluation.

ViktorHofer and others added 2 commits May 6, 2019 21:14
Package testing was failing because the SDK probed up the directory
structure for the locally copied CLI and found our package nupkg/nuspec.
@ViktorHofer ViktorHofer force-pushed the ViktorHofer-sdk-3.0.100-preview6 branch from 81c8d18 to 0375997 Compare May 6, 2019 19:14
@sywhang
Copy link

sywhang commented May 6, 2019

@ericstj I can submit a fix to make the DiagnosticsCounter constructor to internal - should I push it directly to this branch, or submit a separate PR?

@ViktorHofer
Copy link
Member Author

A separate PR pls.

@Anipik
Copy link

Anipik commented May 6, 2019

@sywhang I can make the change in the pr where I am making the other changes

@sywhang
Copy link

sywhang commented May 6, 2019

Thanks @Anipik .

@ViktorHofer ViktorHofer merged commit 0757f65 into master May 6, 2019
@ViktorHofer ViktorHofer deleted the ViktorHofer-sdk-3.0.100-preview6 branch May 6, 2019 20:31
@ViktorHofer
Copy link
Member Author

Thanks all for helping! 👍

@karelz karelz added this to the 3.0 milestone May 22, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…0.100-preview6

Update the dotnet SDK to 3.0.100-preview6-011681 (latest)

Commit migrated from dotnet/corefx@0757f65
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants