0

So essentially, I installed a NuGet Package in C# ASP.Net (Day Pilot Scheduler), purely for testing purposes.

Now though, after removing it completely from my Website, I am continually getting the same errors, with assembly references etc.. (There is literally nothing wrong with them as I haven't changed ANYTHING regarding them.

Account account = new Account();
                        Job job = new Job();
                        int jb = (from j in context.Job
                                   where j.jobType == "Customer"
                                   select j.jobId).Single();
                        account.username = registerUsernameTxtbox.Text.ToString();
                        account.password = registerPasswordTxtbox.Text.ToString();
                        account.Job = jb;
                        context.Account.Add(account);
                        context.SaveChanges();

The code that is getting the errors on it is appearing on, is anything that references the class 'Account'. (so it appears on 'Account', 'username', 'password' and 'Job'

context also appears with an error, which also baffles me because I created an instance and the instance is fine. Here is an image of the issues showing the errors too.

https://i.stack.imgur.com/e9pIB.pngErrors

With error '7'. I have attempted to delete the folder it states, and it appears again after reopening the website.

I have also removed everything regarding DayPilotScheduler too but still failed on removing these errors.

Does anyone have any idea for this? I have googled it but failed to find any information regarding this.

Account Object

Brian Elliott
  • 51
  • 1
  • 13
  • Can you show a definition of the **Account** object? – Dylan Corriveau Apr 16 '15 at 16:11
  • Updated original post - http://i.imgur.com/Yoz91CF.png – Brian Elliott Apr 16 '15 at 16:15
  • I feel for you, that seems frustrating! Have you tried looking for other definitions of `Account`? Sometimes NuGet will remove the package reference but could have left some assembly references behind... try to hunt down all the definitions of Account that Visual Studio is recognizing (use F12?).. – brazilianldsjaguar Apr 16 '15 at 16:40
  • Thank you brazilianldsjaguar for your reply. I have searched through every 'Account' that exists in the Entire solution and every single one that is there, should be there. I genuinely thought it was something that I wasn't properly picking up on, but maybe it isn't totally my fault! – Brian Elliott Apr 16 '15 at 17:05
  • FWIW The DayPilot NuGet package only includes a single file, the DayPilot.dll assembly. It makes no other changes to the project. You might want to check the namespaces you are using - error #7 suggests there are two Account classes. – Dan Apr 16 '15 at 18:12
  • 1
    Hi, Thanks Dan. This sounds so stupid, but this was due to having a "table" called 'Account' in one Class, and a webform called Account it seems. It removed the initial errors, and left me with a few more (ones that I think I should be able to fix.). Thanks Dan. – Brian Elliott Apr 16 '15 at 18:19
  • @BrianElliott If that was it, you should write it as an answer, and mark it correct. That way, if anyone else has this issue, they know what works – Dylan Corriveau Apr 21 '15 at 18:55

1 Answers1

0

this was due to having a "table" called 'Account' in one Class, and a webform called Account it seems. It removed the initial errors, and left me with a few more (ones that I think I should be able to fix.).

Brian Elliott
  • 51
  • 1
  • 13