Runtime: Build and test layout incorrect when consuming classlib with satellite assembly.

Created on 27 Apr 2019  路  14Comments  路  Source: dotnet/runtime

Given a project reference to a classlib with satellite assemblies
Build of the client app laysout the build incorrectly. Satellites are not in the correct directories.

find /Users/stmaclea/git/corefx/artifacts/bin/tests -name ReferencedClassLib.resources.dll
/Users/stmaclea/git/corefx/artifacts/bin/tests/System.Runtime.Loader.Tests/netcoreapp-OSX-Debug-x64/ReferencedClassLib.resources.dll
/Users/stmaclea/git/corefx/artifacts/bin/tests/ReferencedClassLib/netcoreapp-OSX-Debug-x64/en/ReferencedClassLib.resources.dll

```xml

```xml
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <ProjectGuid>{2CD5A44C-65B4-4C51-AC7B-B2938307848A}</ProjectGuid>
    <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="ReferencedClassLib.cs" />
    <EmbeddedResource Include="ReferencedStrings*.resx" />
  </ItemGroup>
</Project>

This is blocking writing proper satellite testing for classlibs in corefx.

Tracking dotnet/sdk#3185

/cc @jkotas @tarekgh @vivmishra I reported in SDK.

area-Infrastructure-libraries bug

Most helpful comment

Changes are in arcade now. Once the arcade packages are ready I'll submit a PR into corefx to manually ingest those in order to fix this.

All 14 comments

@sdmaclea did you mean ProjectReference and not a package reference?

Also, are you using the corefx test infrastructure in your test or you are purely using CLI? Maybe providing the full repro sample will help here. at least can generate the build logs to know what msbuild is doing in such case compared to the full framework.

ProjectReference and not a package reference?

Yes. editted top post...

Maybe providing the full repro sample

Snippets from top post are coming from dotnet/corefx#37248 . I will keep the relevant classlibs w/ satellites, but will disable affected tests.

Will try to look around on Monday to see what is going on while build.

@sdmaclea this scenario work fine if you do it in VS. The issue is specific to the corefx infrastructure. I am seeing in corefx we build the binaries fine but placing the generated satellite assemblies is not happening. I am CC'ing @joperezr and @safern for that.

Considering the issue looks specific to corefx, I think the issue you opened in SDK repo should be closed.

Talked offline to @joperezr and he is going to take a look fixing it in Arcade.

Changes are in arcade now. Once the arcade packages are ready I'll submit a PR into corefx to manually ingest those in order to fix this.

@joperezr you should have the Arcade fix in CoreFx now. Can you resolve this?

@ericstj The arcade fix is not in master yet. The updates have been closed due to breaking arcade changes.

It was merged on monday. https://github.com/dotnet/corefx/pull/37340/files#diff-8b8f08ffbf7b863fb3700c1718eeb4cbR35

I still see

eng/Version.Details.xml:    
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19229.8">

The arcade change was removed from that PR as noted here https://github.com/dotnet/corefx/pull/37340#issuecomment-489445805

Arcade SDK was undone but not the Configuration package as I indicated in the diff. Please try it and you should see it is fixed.

I just validated that this change is in corefx master now. @sdmaclea you should be able to see now that the Binplace.targets will set the new TargetPath by including the satellite subdirectory correctly. Closing this issue as I've validated the change is in corefx now, but feel free to reopen if you think otherwise.

Thanks

Was this page helpful?
0 / 5 - 0 ratings