-
Notifications
You must be signed in to change notification settings - Fork 31
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
Not compatible with .net standard #56
Comments
So, are you saying you were able to fix the problem? Could you tell me a little more details about your code and which version of .NET you are using? |
Sure. I have a .csproj targeting netstandard2.0. I am not able to use NACHA.NetStandard because it is targetting netcoreapp2.1. If NACHA.NetStandard was targetting netstandard2.0, then it would be compatible with .net45, netstandard2.0, and all net core frameworks. I thought that might have been your goal with this version, but i could be wrong. So i was just throwing it out there that this is currently not compatible with netstandard2.0 projects. |
hmmm, do you know if its compatible with anything like .NET6, .NET 7 or .NET 8? Based on what you said, it sounds like its only meant to work with those older deprecated frameworks...and not the new .NET stuff?? Thanks for responding so quickly. |
Yes it is. This was what my work around was. Since the .csproj I was using it in was netstandard2.0, I had to create a new project in net6.0 and install NACHA.NetStandard there in order to keep my other project in netstandard2.0 for nuget packaging reasons. |
Pasted simple project i just created targeting netstandard2.0 on how to reproduce. |
I was bummed when my brand new .NET 8 project blew up when trying to use this ChoETL.Nacha nuget package in visual studio 2022. The C# code came from a .net 4.6.1 (4.6.2?) project that has worked fine for a while now. And after making the syntax changes to the .NET8 code, I tried to debug it and it blew up. Dang, it sounds like it might not be a lost cause. I am so glad you are posting some stuff here. thank you!!! |
I believe if you just make the following change to your .csproj
everything should be fine. Would you mind trying it? |
Oh wait a sec....the csproj file is set to Because I wanted to move the old code into .NET8 while still using this choETL.NACHA. So when I changed target framework like this Then the compiler blows up, since there are .NET8 syntax/code changes made to some parts of the code (just like loops, declarations stuff like that, but the NACHA code didnt get changed yet). So I am wondering if I can use this and still get this ChoETL.Nacha to work with: |
i meant the ChoETL.NACHA.NETStandard.csproj should be netstandard2.0. that will fix problems with all projects referencing it. |
so are you talking about downloading the code (including the ChoETL.NACHA.NETStandard.csproj ) from github (not the nuget package that I am referencing now) and changing that target framework in that downloaded github code to be like this |
correct, the netcoreapp2.1 is why it is currently not working. |
OK, I see. Normally I dont download and use directly from github, since visual studio has some nuget packages available for the ChoETL stuff. But in this case, I see there is the sln file in github, and the files and folders etc. So I will give that a shot, download all of it, then (make the change) and recompile it in Visual studio. Thanks! |
Yeah, sorry, i thought you were the code owner trying to fix this issue. This package works for me in .net 6. What breaks in .net 8? |
ahh, nope not owner. Just a new user and it sounded like you were having maybe similar problem, so i thought I should at least ask. I am thinking if its working for your .NET 6, then it should hopefully work for me too in .NET8. That would be very good! I posted an issue here. Basically it dies as soon as it tries to execute this in the for loop |
try this:
|
thanks. Will give it a try and let you know. :-) |
Did that end up working? I believe it should have, cause it bypasses the GetEncoding call that was causing your error. |
Thanks again!.....So, been testing it, seems to have worked. Need to do more testing tomorrow though. I am wondering why GetEncoding was blowing up. Did you encounter issues with it blowing up in your .NET 6 app? |
ChoETL.NACHA/ChoETL.NACHA.Core/ChoETL.NACHA.NETStandard.csproj
Line 5 in a48e7d3
This is targetting .net core, not .net standard. The moment you try to instantiate NachaWriter in a .netstandard library, it errors with System.Runtime incompatibility.
Took days to figure this out, because the name of the project is literally ChoETL.NACHA.NetStandard. Should be NetCore.
The text was updated successfully, but these errors were encountered: