dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.55k stars 4.54k forks source link

System.Resources.Extensions.Tests resource re-generation is broken after BinaryFormatter extrication #104216

Open stephentoub opened 5 days ago

stephentoub commented 5 days ago

Trying these instructions: https://github.com/dotnet/runtime/blob/fcdb6dba4c1d904d9ebe35f66fbfed8befa19755/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj#L34-L55

Results in:

  Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Serialization.Formatters, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
  File name: 'System.Runtime.Serialization.Formatters, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
     at System.Resources.Extensions.Tests.TestData.WriteResourcesStream(Stream stream)
     at System.Resources.Extensions.Tests.TestData.WriteResources(String file) in D:\repos\runtime\src\libraries\System.Resources.Extensions\tests\TestData.cs:line 228
     at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
     at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\repos\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
     at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr) in D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 178
  --- End of stack trace from previous location ---
     at Microsoft.DotNet.RemoteExecutor.Program.Main(String[] args) in /_/src/Microsoft.DotNet.RemoteExecutor/src/Program.cs:line 97
stephentoub commented 5 days ago

cc: @bartonjs, @adamsitnik, am I just holding it wrong or do the instructions need to be redone?

dotnet-policy-service[bot] commented 5 days ago

Tagging subscribers to this area: @dotnet/area-system-resources See info in area-owners.md if you want to be subscribed.

bartonjs commented 4 days ago

That looks like some piece is missing the package reference to the new nuget package, since it's complaining it can't find the 9.0.0 version of the assembly.

steveharter commented 2 days ago

Assigning to @adamsitnik; PTAL