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

[release/6.3] Switch to embedded package icon #1291

Merged
merged 7 commits into from
Nov 21, 2019
Merged

Conversation

wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented Sep 24, 2019

Contributes to aspnet/AspNetCore-Internal#3103

@wtgodbe wtgodbe requested a review from a team September 24, 2019 20:13
@wtgodbe wtgodbe changed the title [release/3.0] Switch to embedded package icon [release/6.3] Switch to embedded package icon Sep 24, 2019
@wtgodbe wtgodbe added the area-infrastructure Issues related to our MSBuild projects and targets, build scripts, CI, etc. label Sep 24, 2019
@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 24, 2019

Just updated to the GA SDK

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 24, 2019

CSC : error CS1508: Resource identifier 'System.Data.Entity.Query.StoredProcedures.IceAndFireModel' has already been used in this assembly [F:\workspace_work\1\s\test\EntityFramework\FunctionalTests\FunctionalTests.csproj]

Seeing CS1508 in dotnet/razor#1166 as well

@@ -4,12 +4,12 @@
<id>EntityFramework.CodeTemplates.CSharp</id>
<version>$NuGetPackageVersion$</version>
<title>EntityFramework.CodeTemplates.CSharp</title>
<iconUrl>http://go.microsoft.com/fwlink/?LinkID=386613</iconUrl>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<tags>Microsoft EF EntityFramework</tags>
<projectUrl>http://go.microsoft.com/fwlink/?LinkID=$ProjectUrlFwLinkID$</projectUrl>
<licenseUrl>http://go.microsoft.com/fwlink/?LinkID=$LicenseUrlFwLinkID$</licenseUrl>
Copy link
Member

Choose a reason for hiding this comment

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

Get rid of this by switching to use $CommonMetadataElements$ for the majority of the properties. That is, remove everything set in https://github.com/dotnet/arcade/blob/dd885745172424fc8df97295514f693efaec8d24/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets#L102-L118 and add $CommonMetadataElements$. Compare the final result 😺

Copy link
Member Author

Choose a reason for hiding this comment

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

How does this package get built? This one & EntityFramework.CodeTemplates.VisualBasic don't get built by build -pack, and I only see those two namespaces being referenced by their own .nuspec files.

Copy link
Contributor

Choose a reason for hiding this comment

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

These don’t ship

@@ -4,12 +4,12 @@
<id>EntityFramework.CodeTemplates.VisualBasic</id>
<version>$NuGetPackageVersion$</version>
<title>EntityFramework.CodeTemplates.VisualBasic</title>
<iconUrl>http://go.microsoft.com/fwlink/?LinkID=386613</iconUrl>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<tags>Microsoft EF EntityFramework</tags>
<projectUrl>http://go.microsoft.com/fwlink/?LinkID=$ProjectUrlFwLinkID$</projectUrl>
<licenseUrl>http://go.microsoft.com/fwlink/?LinkID=$LicenseUrlFwLinkID$</licenseUrl>
Copy link
Member

Choose a reason for hiding this comment

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

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 25, 2019

Lots of test failures:

System.Resources.MissingManifestResourceException : Could not find the resource "System.Data.Entity.Properties.Resources.resources" among the resources "System.Data.Entity.Resources.Strings.resources", "System.Data.Resources.AnnotationSchema.xsd", "System.Data.Resources.CodeGenerationSchema.xsd", "System.Data.Resources.CSDLSchema_1.xsd", "System.Data.Resources.CSDLSchema_1_1.xsd", "System.Data.Resources.CSDLSchema_2.xsd", "System.Data.Resources.CSDLSchema_3.xsd", "System.Data.Resources.EntityStoreSchemaGenerator.xsd", "System.Data.Resources.SSDLSchema.xsd", "System.Data.Resources.SSDLSchema_2.xsd", ... embedded in the assembly "EntityFramework", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.

Investigating

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 25, 2019

Perhaps the resources were embedded with an incorrect name.

@pranavkm is this related to https://github.com/aspnet/EntityFramework6/pull/1291/files#diff-72030269340a8915d41311ff20a0fff6R9 / https://github.com/aspnet/EntityFramework6/pull/1291/files#diff-c9127cef44c83bc099dd5837e7a5f15fR11? I took that fix from your commit to my AspNetCore-Tooling PR - dotnet/razor@83b434d

@pranavkm
Copy link
Contributor

The error message doesn't look like the one documented in the known issues list: https://github.com/dotnet/core/blob/master/release-notes/3.0/3.0-known-issues.md#preview-9

@nguerrera \ @rainersigwald, does this error message ring a bell?

@nguerrera
Copy link
Contributor

Yes, if the build succeeds, you will often get this error at runtime due to the name of the resource not being what you expected.

@nguerrera
Copy link
Contributor

nguerrera commented Sep 25, 2019

But this is looking for a .resources file, so I don't think it is really dotnet/msbuild#4740 which is for non-resx, non-resources. It is also possible that you have code assuming the DependentUpon convention is not used to pick the .resources name and now it is. That would have been an intentional change in preview 9.

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 25, 2019

Ah - https://github.com/aspnet/EntityFramework6/blob/70db72c100755c9051a9a2c48d3bcc9546cbe586/test/EntityFramework/FunctionalTests/FunctionalTests.csproj#L169-L329, https://github.com/aspnet/EntityFramework6/blob/70db72c100755c9051a9a2c48d3bcc9546cbe586/src/ef6/ef6.csproj#L39-L45 (These were the 2 files where I applied the EmbeddedResourceUseDependentUponConvention workaround). I'm not familiar enough with this concept to know what we're trying to do here - is there a better workaround I should use? When I remove <EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>, I get the following:

CSC : error CS1508: Resource identifier 'Configuration' has already been used in this assembly [E:\code\aspnet\entityframework6\src\ef6\ef6.csproj]
CSC : error CS1508: Resource identifier 'System.Data.Entity.Query.StoredProcedures.IceAndFireModel' has already been used in this assembly [E:\code\aspnet\entityframework6\test\EntityFramework\FunctionalTests\FunctionalTests.csproj]

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 26, 2019

@nguerrera @JunTaoLuo did you guys discuss a resolution/workaround for this new error? I see the same thing came up here: dotnet/razor#1172 (comment)

CC @pranavkm @BrennanConroy in case something like dotnet/razor@4eb9386 would work better here

@rainersigwald
Copy link
Member

Tests are failing to extract a resource with this error (reformatted):

System.Resources.MissingManifestResourceException : Could not find the resource 
\"System.Data.Entity.Properties.Resources.resources\" among the resources 
\"System.Data.Entity.Resources.Strings.resources\", 
\"System.Data.Resources.AnnotationSchema.xsd\", 
\"System.Data.Resources.CodeGenerationSchema.xsd\", 
\"System.Data.Resources.CSDLSchema_1.xsd\", 
\"System.Data.Resources.CSDLSchema_1_1.xsd\", 
\"System.Data.Resources.CSDLSchema_2.xsd\", 
\"System.Data.Resources.CSDLSchema_3.xsd\", 
\"System.Data.Resources.EntityStoreSchemaGenerator.xsd\", 
\"System.Data.Resources.SSDLSchema.xsd\", 
\"System.Data.Resources.SSDLSchema_2.xsd\", ... embedded in the assembly \"EntityFramework\", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.

I think the critical one is the first one:

- System.Data.Entity.Properties.Resources.resources
+ System.Data.Entity.Resources.Strings.resources

Why is it getting that name? Because that's what the DependentUpon convention requests, because it's next to this file:

https://github.com/aspnet/EntityFramework6/blob/810cc4054c34af36c25b9b2c996d0f899f2c60d6/src/EntityFramework/Properties/Resources.cs#L3-L15

That's generated because of

https://github.com/aspnet/EntityFramework6/blob/810cc4054c34af36c25b9b2c996d0f899f2c60d6/src/EntityFramework/Properties/Resources.tt#L155-L161

So it looks like the DependentUpon convention should not be used. Trying that locally.

@wtgodbe
Copy link
Member Author

wtgodbe commented Oct 8, 2019

Updated to use the fix from #1312

@wtgodbe
Copy link
Member Author

wtgodbe commented Oct 9, 2019

Just the one test failure, in GetSpatialDataReader_throws_on_non_SqlDataReader

Actual string does not match the message defined in resources.\r\nExpected:'Spatial readers can only be produced from readers of type SqlDataReader. A reader of type Castle.Proxies.DbDataReaderProxy was provided.',\r\nActual:'The provider did not return a 'DbSpatialServices' instance. In order to use the 'DbGeography' or 'DbGeometry' spatial types the EF provider being used must support spatial types and all prerequisites for the provider must be installed. See http://go.microsoft.com/fwlink/?LinkId=287183 for details.'\r\nExpected: True\r\nActual: False

at System.Data.Entity.StringResourceVerifier.VerifyMatch(String expectedResourceKey, String actualMessage, Boolean isExactMatch, Object[] stringParameters) in //test/EntityFramework/FunctionalTests.Transitional/TestHelpers/StringResourceVerifier.cs:line 83
at System.Data.Entity.ExceptionTestExtensions.ValidateMessage(Exception exception, Assembly resourceAssembly, String expectedResourceKey, String resourceTable, Boolean isExactMatch, Object[] parameters) in /
/test/EntityFramework/FunctionalTests.Transitional/TestHelpers/ExceptionTestExtensions.cs:line 59
at System.Data.Entity.ExceptionTestExtensions.ValidateMessage(Exception exception, Assembly resourceAssembly, String expectedResourceKey, String resourceTable, Object[] parameters) in //test/EntityFramework/FunctionalTests.Transitional/TestHelpers/ExceptionTestExtensions.cs:line 45
at System.Data.Entity.SqlServer.SqlProviderServicesTests.GetSpatialDataReader_throws_on_non_SqlDataReader() in /
/test/EntityFramework/FunctionalTests/SqlClient/SqlProviderServicesTests.cs:line 51

Will look tomorrow

@wtgodbe
Copy link
Member Author

wtgodbe commented Oct 10, 2019

Looks like this test asserts that calling DbProviderServices.GethSpatialDataReader(Mock, 2008) throws a ProviderIncompatibleException with SqlProvider_NeedSqlDataReader:

https://github.com/aspnet/EntityFramework6/blob/6132165166acc36d00b4b114e1c350b393ec7729/test/EntityFramework/FunctionalTests/SqlClient/SqlProviderServicesTests.cs#L47-L50

However, it appears that this type of exception will only be thrown when the first argument is null:

https://github.com/aspnet/EntityFramework6/blob/6132165166acc36d00b4b114e1c350b393ec7729/src/EntityFramework.SqlServer/SqlProviderServices.cs#L494-L496

It looks like instead we're hitting this block:

https://github.com/aspnet/EntityFramework6/blob/6132165166acc36d00b4b114e1c350b393ec7729/src/EntityFramework/Core/Common/DbProviderServices.cs#L401-L406

I'm not sure why this was working before, or how the SDK update triggered the new behavior, as it doesn't appear this code has changed recently. @bricelam @ajcvickers any thoughts?

@ajcvickers
Copy link
Contributor

@bricelam @rainersigwald @dougbu Likewise on this one. Does this change need to go in for the 3.1 release train?

@wtgodbe
Copy link
Member Author

wtgodbe commented Nov 5, 2019

This one should get in for 3.0.2/3.1.1. I've been meaning to circle back to this one but have been caught up with 3.0.1 stuff

@dougbu
Copy link
Member

dougbu commented Nov 5, 2019

@wtgodbe at this point, it may be best to

  1. confirm the .NET Core SDK is recent enough
  2. move to the latest Arcade SDK from the 3.0 channel in this PR (or separately)
  3. switch this PR to use the Arcade infrastructure
  4. wait for 6.3.1 to ship before merging

My preference is for you to get through 1 through 3 today or tomorrow if possible. I'm doing something similar in an update to dotnet/aspnetcore#13899 because that needs the latest Arcade SDK anyhow. You can crib from there when I'm done.

@wtgodbe
Copy link
Member Author

wtgodbe commented Nov 5, 2019

The issue here isn't the package icons, but a test failure related to updating to the GA SDK. I agree though that it'll still be better to switch to the Arcade pattern, I'll do that today

@wtgodbe
Copy link
Member Author

wtgodbe commented Nov 5, 2019

This now does 3 things:

  • Update Arcade
  • Update to the 3.0 GA SDK
  • Apply workarounds

Copy link
Member

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

very nice

@wtgodbe
Copy link
Member Author

wtgodbe commented Nov 5, 2019

Need to update nuget.config

@wtgodbe
Copy link
Member Author

wtgodbe commented Nov 6, 2019

Still have the test failure in GetSpatialDataReader_throws_on_non_SqlDataReader. This seems to be caused by updating to the 3.0 GA SDK. @ajcvickers any idea what might be causing this? I describe the issue in #1291 (comment) and #1291 (comment)

@ajcvickers
Copy link
Contributor

@bricelam Any ideas?

@wtgodbe
Copy link
Member Author

wtgodbe commented Nov 7, 2019

@rainersigwald do I need to update msbuild in this branch as well? #1450 (comment)

Also ping @bricelam

@rainersigwald
Copy link
Member

@wtgodbe Since this is moving to 3.0.100 that bug shouldn't be relevant--it was fixed (just) before RTM. You could try moving to a 3.0.101 prerel build, that picks up a couple of MSBuild fixes--but not anything that would obviously fix the confusing problem you're seeing.

@wtgodbe wtgodbe mentioned this pull request Nov 7, 2019
@JunTaoLuo
Copy link
Contributor

@bricelam will try apply a different workaround that was used in EFCore to resolve a simliar issue.

@bricelam bricelam self-assigned this Nov 11, 2019
@wtgodbe
Copy link
Member Author

wtgodbe commented Nov 21, 2019

F:\workspace.1_work\1\s.dotnet\sdk\3.0.100\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(198,5): error NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below: [F:\workspace.1_work\1\s\src\EntityFramework.SqlServerCompact\EntityFramework.SqlServerCompact.csproj]

Add a dependency group for .NETFramework4.5 to the nuspec

Looking

@wtgodbe wtgodbe merged commit 91ae311 into release/6.3 Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Issues related to our MSBuild projects and targets, build scripts, CI, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants