-
Notifications
You must be signed in to change notification settings - Fork 1.1k
dotnet run fails with System.IO.FileNotFoundException if using local class library #7814
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
Comments
Is it possible for you to reference the library you depend on with a ProjectReference instead of a direct reference. That will work with the 1.0 version of the tools. Also, we have added support for direct references in 2.0. So, if you need that, you can try with the 2.0 version of the tooling, but keep in mind that that is an early version preview. |
Project reference or packagereference which means DotNet pack to create a nuget package until 2.0 is out |
I am using the 2.0 version of the tools but this still does not work. I am unable to add a project reference as I don't own the source code for the dll that is being referenced. dotnet --info Product Information: Runtime Environment: Microsoft .NET Core Shared Framework Host Version : 2.0.0 |
@livarcocc , why was this issue closed without resolution? This is an issue even on |
Can you provide a small repro repo? Like on github that we can try running ourselves? Makes debugging these things that much easier. |
@livarcocc we're not able to repro this anymore after wiping out the
For now we're moving on. Not sure what happened when we cleared out the older bin folder :( |
The failed scenario is not supposed to work. You can execute the contents of your build folder like that. You can do that with the contents of your publish folder. |
@livarcocc I'm confused. After wiping the |
Executing When ready to move your app into production, you should publish your app and xcopy the contents of the publish folder as a way to distribute it. See https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish?tabs=netcore2x. Hope this helps. |
Steps to reproduce
dotnet new console -n MyConsole
dotnet new classlib -n MyClass
4.Use MyClass in MyConsole
dotnet run
Expected behavior
Application executes
Actual behavior
Application crashes with:
Environment data
dotnet --info
output:The text was updated successfully, but these errors were encountered: