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

Building an app with PreserveCompilationContext=true causes files from the shared runtime to be copied to bin\refs directory #2121

Closed
pranavkm opened this issue Apr 9, 2018 · 6 comments
Assignees
Labels
Milestone

Comments

@pranavkm
Copy link
Contributor

pranavkm commented Apr 9, 2018

This is a regression (?) in 2.1.0-preview2 sdk. Repro steps:

  1. Acquire preview1 Sdk - https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview1
  2. dotnet new mvc
  3. dotnet build

Examine the bin\Debug\netcoreapp2.1 directory and notice all it has is the app's binaries.

  1. Clean the bin directory and run dotnet build using the preview2 Sdk (I used 2.1.300-preview2-008367)

The bin directory has a refs directory that contains 300+ files from shared runtimes.

@pranavkm
Copy link
Contributor Author

pranavkm commented Apr 9, 2018

_CopyReferenceOnlyAssembliesForBuild uses _ReferenceAssemblies as input for files to copy. Between preview1 and preview2, NuGetSourceType is no longer being set which causes package and runtime refs files to get copied to the bin directory.

Preview1 Preview2
image image

@livarcocc livarcocc added this to the 2.1.3xx milestone Apr 9, 2018
@livarcocc
Copy link
Contributor

@nguerrera caused by your changes?

@nguerrera
Copy link
Contributor

Yes. I will fix this.

@pranavkm
Copy link
Contributor Author

Is there a CLI available that contains this fix? Just like to verify this fixes Mvc scenarios e2e.

@nguerrera
Copy link
Contributor

@pranavkm I don't think so unless there are already RC prodcon builds happening: cc @mmitche.

@mmitche
Copy link
Member

mmitche commented Apr 17, 2018

There are, but nothing through CLI yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants