Replies: 16 comments
|
As I have already described before, you need to properly publish things with .NET Core. You can't just use an arbitrary |
|
@filmor partially related to that issue, but shouldn't |
|
I'll continue to try as you instruct, and I appreciate your forbearance, as all these .NET concepts that are familiar to you are near-gibberish to me at this point. |
|
So I've gone back and asked some more experienced .NET coworkers, and we're still kind of confused here. First off, it's not exactly clear what is meant by "publish it somewhere". When I right click the existing solution > "publish to folder" I get a build that does not contain any I am not exactly sure how to create a new project that works as you describe so here is what I tried: I did create a new console application, and added the package reference. When I build, I get a DLL and the {
"runtimeOptions": {
"tfm": "netcoreapp3.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "3.0.0"
}
}
}I then tried loading both the DLL and config file into the image and updating the |
|
@filmor I am facing similar issue. Could you please help in fixing this? |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
@ssharmamt This is not a support forum, please behave yourself. Your code is definitely wrong in that it first imports |
|
I'm facing the same issue on the master. I've build a very simple .NET project, DynMetaObjectTest.csproj: with the following class, TestMeSimple.cs The python script it's pretty straight forward, TestMe.py: Output
Note that the same code runs on pythonnet 2.5.2 :
I tried to build the DLL against netstandard2.1, net45, net48 without changes in the master's behavior. The zipped DLL (netstandard2.0) can be found here: |
|
|
|
@filmor somehow my whole repo "was broken" on my "other machine". |
|
I am encountering this issue as well, and am curious as to the current support for .Net Core 5. I don't see any mention of it and this is the only applicable issue that references Core 5 in any way that I have found. We have a in-house .Net library for communicating with a number of servers via their api interfaces, and I had been working to migrate this library from .Net Framework 4.8 to .Net Core 5 so I actually have a copy of it in each format for testing. When I import the Framework version of the library, there are no errors. I am able to add the reference, import the namespace, and call the functions. The results aren't exactly what I expect, but its workable (One function returns a string, but when I print it in python its a tuple containing the string and an object type of the parent object it came from). When I use the Core 5.0 version of the library I am able to add the reference, but when I attempt to import the namespace I get a ModuleNotFoundError. Assuming support for .Net Core 5.0 isn't currently supported, is there a timeline when it should be? |
|
@TCVZ .NET 5 is supported If you believe there's a bug, you need to provide clear reproducible steps as in the example above: #1554 (comment) |
|
I'm not sure what all I can provide that hasn't already been provided. I can't provide my dll files for security reasons, but the structures between the two are nearly identical, the only difference is the target framework. Both work without error when being referenced in .Net applications. Basically the files are named Test.dll and contain a single root namespace of Test. Within Test are a few classes, along with a handful of nested namespaces. In Python I am simply performing the following: When pointing to the folder containing the Framework version of the code executes without error. When using the 5 dll though I get "ModuleNotFoundError: No module named 'Test'" on the import statement, but AddReference doesn't complain. I have also tried "from Test import Thing" and get the same result. We have a second library that I was also migrating to .Net 5, and see the same results. Is there a way to see what namespaces it thinks a dll has to see if something is getting named in a weird way? |
|
I don't have one... runtimeConfigPath is not referenced anywhere in the documentation that I can find. In both the readme and extended documentation this code block is provided as all that is needed to load the dll library: I was in a rush to get out the door earlier and missed that the thread OP is using 3.0dev. I installed via PIP this morning and have 2.5.2 if that affects the support for .Net 5. |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Details
Describe what you were trying to get done.
Import a Namespace from a Custom (though not written by me) Assembly.
I have confirmed that the namespace I try to import is correct, exists in the DLL, etc.
What commands did you run to trigger this issue? If you can provide a
I invoke the python script with
python3 demo.pyI understand that without the DLL you cannot reproduce this issue. I am not able to provide the DLL as it is proprietary, and further, I am not the author or maintainer. I am able to investigate further, and can build the DLL from source, so what would be helpful to me is some kind of guidance on how to proceed with debugging. I am an experienced python developer, but not deeply versed in .NET/C#.
the guidance for using Fuslogvw.exe is not exactly helpful since I don't have any windows machine on which to run an exe.
All reactions