-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
dll as a refrence , Copy local to false, does not have entry in deps.json #2162
Comments
This is "by design". It may be possible to add some new metadata (e.g. CC. @eerhardt, @livarcocc |
@steveharter - here is another case where the right assembly is sitting in the 'bin' directory where the executable is running out of, but the runtime refuses to load it because it isn't in the .deps.json file. You and I have discussed before potentially allowing for this scenario, where an assembly can still be loaded even though it wasn't in the .deps.json file. What do you think here? |
Pending security review, yes IMO we should automatically support every local assembly by default. |
Note we will automatically pull in assemblies if there is no deps.json file, so I think by also pulling in local assemblies when we have a deps already makes us more consistent and provides a path to have a minimal deps.json file. |
I am having a similar issue but I am marking both CopyLocal and Private to true. The referenced library does get copied to bin folder, but for the CLR to load it I have to resort to manually hacking the deps.json file. Can these be added automatically if CopyLocal is marked to true or is there some piece of metadata that I can set to force this? |
@borgdylan - if you are using a |
I am using a custom compiler so my project file has a different extension but is in the same format. Also I am using the SDK used by the mono fork of MSBuild, not the actual .NET Core SDK. |
I discovered that the dll is included in the deps.json for the directly referencing project, and not in the project for the console app that uses the other library as a project reference. |
@eerhardt Where should I send the files? |
If they are not too large, you can attach them in GitHub. Or using dropbox or a similar service. However, reading
It sounds like you will need to add the .dll as a |
https://1drv.ms/u/s!AiEyErw26P-fiUiUiGLyh-mY4Uwh That is is a zip file with the binlog file as well as two projects, one references teh dll directly and thr other references the latter among other projects. If you need to look at other files, I will be happy to send them. |
Weird thing, when referencing in the console project MSBuild is not passing it in to the compiler when building said project. My custom language happens to take references as code (generated using an MSBuild task) and the reference for the particular dll is in the projects thata ctually need it but not in the console app (completely ignoring the fact the dll is still refernced) |
Disregard the last comment, it was my mistake. The console app uses netcoreapp2.0, but the class libraries netstandard2.0. I had copied the reference verbatim without changing the condition on the references. |
After that change, I managed to run without modification of deps.json using both the shared framework (dotnet command) as well as from a self-contained published directory. Thanks for all your help @eerhardt, your idea made it work! That's another compiler runnign on .NET Core. |
@livarcocc is there a commit to address this issue , if not how is it fixed / closed ? |
@eerhardt is this issue fixed? |
@ankgupta067 based on #1609 this PR was merged on April 10th: #2090 |
create a .net standard dll , name it as Paas dll, and change the output path ..\Output\
add a class logger like below-
Now create another .net core console project in solution and add dll as a refrence ( not project refrence) for pass.dll and make copy local to false.
Also change output directory of console app to ..\Output\
add below code in console app -
Build and run .net core app, but now application goes in break mode with below error
On further investigation i see that refrence to .net standard dll in deps.json is missing and it is according to the code here
Is it by design or this is a bug , if by design how to fix this?
The text was updated successfully, but these errors were encountered: