Skip to content

*.runtimeconfig.json not copied to out put dir when project referenced #11207

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

Closed
kirsan31 opened this issue Apr 7, 2020 · 3 comments
Closed

Comments

@kirsan31
Copy link

kirsan31 commented Apr 7, 2020

Visual Studio Version: 16.5.2

Summary:
When reference one .net core exe project (for example WinForm) from other, after build, files: dll, exe , pdb and App.config (if present) are copied to out put directory of main project, but *.runtimeconfig.json is not copied. So, running this exe lead to very confusing error:
Snipaste_2020-04-07_18-23-08

Steps to Reproduce:

  1. Create solution with WinForm core project.

  2. Add to solution 2-d WinForm core project.

  3. Reference one from another.

  4. Try run (Process.Start) referenced exe from main project.

Snipaste_2020-04-07_18-19-18

Minimal repro:
Reftest.zip

Expected Behavior: All necessary files from referenced project must be copied.

Actual Behavior: *.runtimeconfig.json not copied.

User Impact: you can not run referenced exe file from main project.

@kirsan31 kirsan31 changed the title *.runtimeconfig.json not copied to out put dir when referenced *.runtimeconfig.json not copied to out put dir when project referenced Apr 7, 2020
@davkean davkean transferred this issue from dotnet/project-system Apr 9, 2020
@urosjovanovic
Copy link

Any updates on this issue?
Is there a workaround at least?

It also happens when you add a project reference to a net core console app from asp.net core service, *runtimeconfig.json for the console app is not copied to the output of asp.net core app which leads to this error:

A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.

When trying to run the console app.

@kirsan31
Copy link
Author

This is not minor issue, this is regression from .net framework.
cc @dsplaisted sorry for cc you, I selected most active committer 😕

@dsplaisted
Copy link
Member

This is the same as #1675. You can find a workaround in that issue.

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

3 participants