How can i reference Dependencies of a .NET core project #231
Replies: 8 comments 14 replies
-
You should use compiled dlls instead of relying on inline code, take a look at https://github.com/agracio/electron-edge-js-quick-start for reference. |
Beta Was this translation helpful? Give feedback.
-
I've forked the repo - will update |
Beta Was this translation helpful? Give feedback.
-
In my real application i have pre compile legacy Test Description: Error:
To test that the method works correctly - ive created a the problem comes when calling it from electron. in order to recreate the error - need to setup a local DB. hope it clear and detailed. |
Beta Was this translation helpful? Give feedback.
-
Can you show the full method that calls Fill, the one that you call using edge-js. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately unable to resolve your issue, System.NullReferenceException is thrown by SqlConnection object. Here is a sample code to reproduce: public async Task<object> TestWithSqlDb(dynamic input)
{
SqlConnection connection = new SqlConnection("Connection string to db");
await connection.OpenAsync();
return "";
} No idea what is causing that. |
Beta Was this translation helpful? Give feedback.
-
In general both If you do not require SQL execution through your own dll you can use |
Beta Was this translation helpful? Give feedback.
-
Narrowed it down to be the same issues as This depends on a new |
Beta Was this translation helpful? Give feedback.
-
New |
Beta Was this translation helpful? Give feedback.
-
I have an electron app that needs to use a compiled
.net 6
dll.this library have multiple dependencies.
according to the docs :
NOTE: #r and references: [ 'MyDll.dll' ] references only work when using .NET Framework 4.5 If you are using .NET Core and are using the .NET Core SDK and CLI, you must have a project.json file (specification [here](https://github.com/aspnet/Home/wiki/Project.json-file)) that specifies the dependencies for the application. This list of dependencies must also include the [Edge.js runtime package](https://www.nuget.org/packages/EdgeJs/) and, if you need to be able to dynamically compile your code, the package(s) for the compilers that you plan to use, like [Edge.js.CSharp](https://www.nuget.org/packages/Edge.js.CSharp/).
i understand that
#r and references: [ 'MyDll.dll'
can only be used in.net framwork
.but didnt understand how in
.net core
any help will be great!
thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions