Error during Team Build: The type or namespace nam

2019-09-01 00:52发布

问题:

New problem with VS2005 Team Build:

Building locally a solution of a mobile client for a platform of the company, everything goes pretty neat and compilation occurs without major hiccups, but using the very same solution on a Team Build gives me the following problem:

Solution: TB Client.sln, Project: Client.PocketPC.UIAPI.csproj, Compilation errors and warnings
EnumBackgroundImages.cs(10,6): error CS0246: The type or namespace name 'Serializable' could not be found (are you missing a using directive or an assembly reference?)

I have the [Serializable] attribute on other projects and no problems with it, having exactly the same assembly references and using directives, and they all compile on my local machine and the build machine, all references are ok on the build machine and such.
I have no more ideas of what to try.

回答1:

I don't know why it would work on your machine and not on the build server, but your problem is that SerializableAttribute is not included in the compact framework.



回答2:

If they compile on the build machine, then perhaps you forgot to do a merge to your production branch?



回答3:

The problem was that .NET Compact Framework wasn't installed on the build machine, and it solves this issue about the serialization.