1

I have a friend who has made some code in visual studio. But when I run his code (after getting it with git), I get Error Code CS0433. The weird thing is another guy on our team can get the exact same code and run it just fine on his computer. Here is a screen shot of the errors:

CLICK HERE FOR A BIGGER PICTURE

enter image description here

What is even more weird, another friend working on a different branch also gets Error CS0433 when running his code. But I can get it and run it just fine on my computer.

I have tried a couple of things to no avail.

  • Rebuild the solution
  • Clean solution
  • Manually deleted bin and obj folders, then do a clean/rebuild

I looked around the web for a solution. I found some people with similar problems, but theirs are in ASP.NET and not .NET. See here and here.

I have also taken a look at the documentation at MSDN on error CS0433. But I'm a beginner find MSDN's explanations very cryptic...

Is there anyone who has an idea as to what is causing this problem and/or a solution on how I can fix it?

If you need additional information feel free to write a comment. I will supply it as fast as I can.

Community
  • 1
  • 1
MartinJH
  • 2,590
  • 5
  • 36
  • 49
  • I have solved these kinds of problems in the past by opening and editing the csproj file. Look for duplications and errors in the file. Additionally remove all the assembly redirects in app.config and try rebuild again. – Jim Dec 11 '15 at 09:12
  • Okay. Have any idea where to look in csproj? It's quite long. I also have an csproj.user. Should I ignore this file? – MartinJH Dec 11 '15 at 09:19
  • you have references to dotnetcore50, and system.dll. This is causing (I think) most of the problems. Try removing all the dotnetcore50 references. Start with vanilla .NET and try and migrate to the core libraries slowly. This [http://blog.marcgravell.com/2015/11/the-road-to-dnx-part-1.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+CodeCodeAndMoreCode+%28Code%2C+code+and+more+code.%29] might help. – Jim Dec 11 '15 at 09:24
  • Ok, on it. Will report back soon. – MartinJH Dec 11 '15 at 09:32
  • Hey Jim, it was indeed the csproj that was the problem. When I deleted `` with `` [per instructions from this MSDN guide](https://msdn.microsoft.com/en-us/library/cc668079.aspx), it worked. It was also the same problem on my friends computer. If you add this as an answer I'll give you the check. Otherwise I'll add it myself a bit later today. – MartinJH Dec 11 '15 at 10:11
  • Have added the answer will perhaps edit it later to be a little more comprehensive... – Jim Dec 11 '15 at 10:46

1 Answers1

3

You have references to dotnetcore50, and system.dll. This is causing (I think) most of the problems.

Try removing all the dotnetcore50 references. Start with vanilla .NET and try and migrate to the core libraries slowly. This [blog.marcgravell.com/2015/11/… might help.

Jim
  • 14,952
  • 15
  • 80
  • 167