Skip to content
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

System.ComponentModel.TypeConverter 4.0.1 was not found #310

Closed
StefanKert opened this issue Aug 7, 2017 · 20 comments
Closed

System.ComponentModel.TypeConverter 4.0.1 was not found #310

StefanKert opened this issue Aug 7, 2017 · 20 comments

Comments

@StefanKert
Copy link
Contributor

Currently if NSubstitue is used with .NetCore projects the following warning is generated when calling dotnet restore

warning NU1603: Castle.Core 4.0.0 depends on System.ComponentModel.TypeConverter (>= 4.0.1) but System.ComponentModel.TypeConverter 4.0.1 was not found. An approximate best match of System.ComponentModel.TypeConverter 4.1.0 was resolved.

This results in a warning for each referenced package that uses these assemblies:

image

This error is already fixed in castleproject/Core#239 so a upgrade to Version 4.1 (or 4.1.1) would probably fix this warning. I´ve taken a look on the changes that are needed for moving to Version 4.1.
The biggest change IMHO is that we need to remove the ImplictVersioning on NetStandard1.3.
I will submit a PR for this so that you get the idea.

@alexandrnikitin
Copy link
Member

Closed by #311

@jfren484
Copy link

jfren484 commented Aug 16, 2017

@alexandrnikitin When will this change make it out to NuGet?

@dtchepak
Copy link
Member

Hi @jfren484,
I need to finish updating the build after the move to latest csproj format before we can make a release. I don't have an ETA at the moment. Is this issue blocking you?

@jfren484
Copy link

I don't think so. It appears to only be creating a large number of warnings in our build. It's just one thing I ran into after upgrading to Core 2.0 RTM, and I'm trying to get it back to a working, clean build.

@StefanKert
Copy link
Contributor Author

StefanKert commented Aug 19, 2017

@dtchepak so basically to fix the build we should upgrade the dotnet Lib in .travis.yml to dotnet 2.0, or am I missing out something? I don´t know what you mean by latest csproj format, because to me it looks like the projects are already migrated to the new csproj?

matrix:
include:
- dotnet: 1.0.3
mono: none
dist: trusty

If useful, I can fill a PR for this.

@dtchepak
Copy link
Member

@StefanKert It's not an issue with your PR at all. The current build passes locally and on appveyor, it's just I haven't ported over everything from the old build. I need to check the versioning and NuGet packaging is correct, and port over the documentation tests ("CodeFromDocumentation" and "TestExamples" tasks). (We're dropping the current unit tests. Any particularly useful ones we can bring over as required.)

Normally this would be easy for me to push out a new build, but we've just transitioned to the new csproj format and haven't got all the bits done yet. Sorry!

@StefanKert
Copy link
Contributor Author

@dtchepak gotcha! Thanks for the response. No need to apologize. You´re really doing a great job!! Thanks for that. Just wanted you to know, if I can help you with the Migration or docs or anything to get it up and running please let me know! Always glad to give something back for the time you´re saving us with your tools :). So if I can add something to help you please let me know.

@grokky1
Copy link

grokky1 commented Aug 19, 2017

@StefanKert I also get this problem after upgrading to netcoreapp2.0.

When I try to update to the nuget packages, I get this error. How did you get around it?

@StefanKert
Copy link
Contributor Author

@grokky1 For me this results in a warning not an error. Since the PR that got merged is not published to NuGet I guess we need to wait until this NuGet package gets released.

@grokky1
Copy link

grokky1 commented Aug 19, 2017

@StefanKert Yes you are right, I did a clean and then rebuild, and now it is only a warning for me too.

@RaphHaddad
Copy link

RaphHaddad commented Aug 21, 2017

This may seem obvious - but for those who've come here after googling and are blocked from development:

the solution before this PR is released is to install/update the NuGet package 'Castle.Core' then install 'NSubstitute'

@jfren484
Copy link

jfren484 commented Aug 21, 2017 via email

@robertcoltheart
Copy link

robertcoltheart commented Oct 3, 2017

Can we get this released to nuget? It's been a while...

Paging @dtchepak @alexandrnikitin @AnthonyEgerton

dtchepak added a commit to dtchepak/NSubstitute that referenced this issue Oct 4, 2017
Attempts to replicate the fix for nsubstitute#310 on the 2.x codebase.
@dtchepak
Copy link
Member

dtchepak commented Oct 4, 2017

Can someone more familiar with .net core projects let me know if #318 will solve this? In particular I'm not sure how removing the implicit versioning bit works for project.json projects.

I can release that branch fairly quickly while I continue to struggle with the netstandard-only build.

@StefanKert
Copy link
Contributor Author

StefanKert commented Oct 4, 2017

@dtchepak Don´t know if #318 really has to do with this issue. In fact upgrading to 4.2.0 of course fixes this issue since should have the correct dependencies. I will comment the issues that I think are in this PR in #318 directly since this is not the right place to discuss them.

@dtchepak
Copy link
Member

dtchepak commented Oct 4, 2017

@StefanKert Thanks Stefan. #318 was my attempt to port your change to the currently released codebase (so I it doesn't have to be blocked by redoing the build). You initial comment mentioned "upgrade to Version 4.1 (or 4.1.1) would probably fix this warning" so that's what I did. Sorry if I have misunderstood the issue -- I haven't done much with .net core so I have probably got it all wrong 😆 .

@StefanKert
Copy link
Contributor Author

@dtchepak no worries. The thing is that .net core doesn´t work that well with old csproj. So our only chance is to get this thing up and running pretty fast. I really like to point out that I could offer help on getting this thing out, just let me know what I can do! Ping me here or on Twitter @StefanKert

@robertcoltheart
Copy link

I'm also available to help. I've done quite a bit of this over at Chinchilla and Machine.Specifications repos.

@dtchepak
Copy link
Member

dtchepak commented Oct 4, 2017

Thanks @robertcoltheart and @StefanKert. Let me have another go at the build (after a false start yesterday, trying to port the unit tests which ended up an exercise in futility :) ) and I'll let you know where I need help.

As mentioned here, I'd love to get advice on how to do assembly versioning properly. Previously we were updating assemblyinfo based on a git tag.

@dtchepak
Copy link
Member

dtchepak commented Oct 6, 2017

NSubstitute 3.0 release, which includes this change. Sorry for the delay.

smatsson added a commit to tusdotnet/tusdotnet that referenced this issue Oct 14, 2017
This is an issue with NSubstitute where Castle.Core is referenced
with the wrong version. The issue has been fixed in a newer version of
NSubstitute. Problem is that we cannot update to it as it no longer supports
.NET 4.5.2. Source: nsubstitute/NSubstitute#310
Lanoli pushed a commit to Lanoli/delegation_aspnetcore that referenced this issue Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants