Our team recently migrated from Visual Studio 2008 / .NET3.5 to Visual Studio 2010 / .NET4.0. Now VS2010 gives a strange error message. It is played using the following program:
using System;
namespace Some.Main
{
}
namespace SomeLib
{
interface Some
{
}
}
namespace ConsoleApplication1
{
using Some.Main;
using SomeLib;
class Program
{
static void Main(string[] args)
{
Console.Write("Press enter to continue");
Console.ReadLine();
}
}
}
In VS2008, this worked fine, but in VS2010 I received the following error message:
Type name "Main" does not exist in type "SomeLib.Some"
Interestingly, if I click "Build Solution", the program will be built just fine, and I can even execute it without any problems. This is just Visual Studio, which seems to have problems with this code.
Unfortunately, I am working on an old deprecated application, and I cannot (easily) change the names of these namespaces.
, , , .