Reputation: 210100
I'm trying to experiment with Microsoft.Web.Administration on my Windows 7 x64 box, using Visual Studio 2010. When I add the DLL to references in my C# project, I can see its namespaces and classes pop up in Intellisense.
But as soon as I build, I get "The type or namespace name 'Web' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)", and I get build errors in the code I've written, as if the DLLs aren't even there.
There are two sets of IIS7 DLLs that I can see, in:
But both sets seem to do the same thing: Apparently initially work, then fail on build.
Does anyone know what I need to do to get this working?
Upvotes: 3
Views: 10302
Reputation: 119806
If this is a .NET 3.5 or .NET 4.0 project, open the project properties. On the Application tab it will have probably defaulted to either of:
Change this to .NET Framework 3.5 or .NET Framework 4. Your project should then build just fine.
As the compiler error points out, Microsoft.Web.Administration
has a dependency on System.Web
which isn't referenced in the 3.5/4.0 client profiles.
Upvotes: 7