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

dotnet publish does not copy refs folder #2243

Closed
guylando opened this issue May 14, 2018 · 2 comments
Closed

dotnet publish does not copy refs folder #2243

guylando opened this issue May 14, 2018 · 2 comments
Milestone

Comments

@guylando
Copy link

guylando commented May 14, 2018

I run dotnet publish -f net461 -c Release -r win7-x64 -o bin\Release\PublishOutput
I have .NET Command Line Tools (2.1.300-rc1-008673)
The Release build has refs folder.
The PublishOutput doesnt get the refs folder copied in it.
Publishing without refs folder to the server resulting in runtime error of missing assemblies such as:
System.InvalidOperationException: Cannot find reference assembly 'Microsoft.Win32.Primitives.dll' file for package Microsoft.Win32.Primitives.Reference

Other projects in same solution publish with refs folder using same command.
Few days ago doing last publish DID publish with refs folder.

Any idea what is prevents refs folder from being copied to PublishOutput during publish?

Copying previously generated refs folder manually makes things work.
Whats going on?

@eerhardt
Copy link
Member

@pranavkm - did we disable the refs folder on publish by default in ASP.NET for 2.1?

@pranavkm
Copy link
Contributor

did we disable the refs folder on publish by default in ASP.NET for 2.1?

Yup. See the description for CopyRefAssembliesToPublishDirectory here - https://docs.microsoft.com/en-us/aspnet/core/mvc/razor-pages/sdk?view=aspnetcore-2.1#properties. In the most common case, Razor compilation is the only thing that performs runtime compilation and we enable build and publish-time compilation of Razor views by default as of 2.1.

@nguerrera nguerrera added this to the Discussion milestone May 30, 2018
@guylando guylando closed this as completed Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants