Open hughesjs opened 2 years ago
I've tried adding a zip to this but for some reason Github won't let me upload it, if it's vital you get it as a zip let me know and I'll upload it somewhere you can grab it!
Thanks, the link to your GitHub repo is perfect. Starting to look at it now.
So after checking out your repo I was able to successfully build your solution. (I checked out the user-validator
branch, of course)
I then created an empty implementation of IUserRepository
and added the following lines to your UnitTest1
:
[Fact]
public void Test1()
{
var userService = new UserService(new UserRepository());
userService.CreateUser(null, null, null);
}
I then debugged the test after putting a breakpoint inside the Invoke
method in ValidatedMethodAttribute
and the breakpoint was successfully hit. So it all seems to be working for me.
Do you think you could try a clean checkout (into a new folder) like I just did? I wonder if you have some cruft hanging around your obj
folder that is somehow getting in the way of a successful build.
Huh, strange, I'll give it a try after my dinner!
Out of interest, are you building on Windows/Linux/MacOS? The C:/ drive showing up in the error message is making me wonder if this is some platform dependency issue
Yup, I get the same issue on a clean build... Could you try building it in either WSL or a linux docker container? That would pretty much confirm the issue. I've not got anything running Windows to test on I'm afraid
Oh, interesting. I definitely haven't tried it in that scenario. And yeah, I'll give that a whirl, though might not be able to get back to you until tomorrow. Thanks for working with me on this, as I'd like it to work for everyone. :)
No worries mate, let me know if there's anything I can do to help!
Hey my dude, wondering if you've had a chance to look at this or if there's anything I can do to help? Of course, no worries if not, I know how busy life gets!
Hey, sorry, the 4th of July festivities took up way more of my time than I was anticipating. :) But I'm planning to look at it tomorrow. Hopefully it's reproducible on a Mac, as Linux is a bit tricker for me to test on, though I can if it comes to it.
Ahh yes of course... I forgot the colonies tend to get quite rowdy about this time of year! Nah, I hope you had a good break mate!
As for testing on Linux (if Mac doesn't reproduce the issue), WSL2 is very easy to set up and should hopefully make testing it easy for you! Happy to help with that if your'e not familiar!
Love it! And thanks! I have WSL installed, so can definitely go that route. Made some headway today just getting set up, but hopefully more time tomorrow.
Thanks for all of your help on this one mate, there's no rush, this isn't for production code or anything, just a useful tool to have in my belt
Hey, I submitted a PR relevant to this issue :) You can reproduce the "System.Type was somehow not found. Aborting." issue by using "dotnet build" from Powershell.
@kswoll - Any chance you've got the time to take a look at #20 ?
The details of this issue are here. However, I've replicated the relevant section below for posterity.
So far, I've got this attribute:
However, when I execute the build, something weird is going on with Fody but I can't quite work out what this issue is..?
As requested on our SO chat, here's the project I'm having issues with:
https://github.com/hughesjs/warm-up-exercises/tree/user-validator/05-user-validator/cs