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 a new project produces a refs folder in the output #7223

Closed
davidfowl opened this issue Feb 3, 2019 · 9 comments
Closed

Building a new project produces a refs folder in the output #7223

davidfowl opened this issue Feb 3, 2019 · 9 comments
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Comments

@davidfowl
Copy link
Member

davidfowl commented Feb 3, 2019

Describe the bug

Superfluous refs folder with a bunch of dll are put in the output folder on build.

To Reproduce

  1. Download the latest core-sdk (https://github.com/dotnet/core-sdk#installers-and-binaries)
  2. Make a new Empty Web project
  3. Build the project
  4. Look at the output folder bin\Debug\netcoreapp3.0
  5. Observe the large refs foler

Expected behavior

There should be no refs folder. We should have turned on PreserveCompilationContext by default in ASP.NET Core applications.

Screenshots

image

Additional info

  1. Using this version of ASP.NET Core 3.0.0-preview-19102-04 (this is the latest 9f202fe)
@davidfowl
Copy link
Member Author

cc @pranavkm

@Eilon Eilon added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Feb 4, 2019
@Eilon
Copy link
Member

Eilon commented Feb 4, 2019

Also tagging @natemcmaster

@pranavkm
Copy link
Contributor

pranavkm commented Feb 4, 2019

https://github.com/dotnet/cli/issues/10502 is the tracking issue for this. For preview3, the RazorSDK will use the flag specified here - dotnet/sdk#2122 to disable publishing the refs directory in the default scenario, with the runtime compilation package turning it back on.

@mkArtakMSFT
Copy link
Member

Closing this one, as it seems all the work necessary to handle this is already being tracked!

@davidfowl
Copy link
Member Author

I don't feel good that nothing is tracked in this repo. How do I know when this is fixed? Which bug should I track for the end to end?

@davidfowl
Copy link
Member Author

@pranavkm is this fixed? Also it seems the deps file for web projects in 3.0 preview3 are still massive by default and it looks like it's due to reference assemblies being preserved.

cc @natemcmaster @pakrym

@pranavkm
Copy link
Contributor

Looks like it. Using the 3.0.100-preview4-010487 SDK, here's the output for the empty-web

D:\temp\empty122> ls .\bin\Debug\netcoreapp3.0\


    Directory: D:\temp\empty122\bin\Debug\netcoreapp3.0


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        2/23/2019   4:09 PM         107005 empty122.deps.json
-a----        2/23/2019   4:09 PM           8704 empty122.dll
-a----        2/23/2019   4:09 PM         320512 empty122.exe
-a----        2/23/2019   4:09 PM           1296 empty122.pdb
-a----        2/23/2019   4:09 PM            176 empty122.runtimeconfig.dev.json
-a----        2/23/2019   4:09 PM            242 empty122.runtimeconfig.json

@davidfowl
Copy link
Member Author

OK I just installed the same SDK (preview4 even though you should be testing preview3 😄):

The following were installed at: 'C:\Program Files\dotnet'
    • .NET Core SDK 3.0.100-preview4-010487
    • .NET Core Runtime 3.0.0-preview3-27420-6
    • ASP.NET Core Runtime 3.0.0-preview3-19120-02
    • .NET Core Windows Desktop Runtime 3.0.0-preview4-27422-21

When I make an Empty ASP.NET Core application and build the deps file is 105KB which is massive for having 0 packages. Now if you look at the contents of the file https://gist.github.com/davidfowl/aa387f2cc5f322efe90a9d3777f82ec7. You'll notice compilation options which doesn't make sense unless PreserveCompilationContext or the equivalent hasn't been fixed.

@davidfowl
Copy link
Member Author

Publish though, does not have a refs folder so that's something, but we're still preserving too much in the deps file.

image

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

No branches or pull requests

4 participants