Problem 1: VS 2010 Renaming Project Namespace in the middle of development causes "Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."
Solution: If you have assemblies in GAC, ungac them and it will fix the problem.
Problem 2: Renaming "Feature Folder" in VS 2010 will rename the physical folder name on your local file system. That is great. But it doesn't update the pending changes. So, when you when you check in, it will say some files missing. In some cases, we lost some files.
Solution: Exclude and Re-include the feature folder in VS2010. It will update the pending changes.
Problem 3: VS 2010 does package/create wsp upon building your SharePoint Solution. If you forget to fire a package command before deploying, you will be deploying the old version of the package. Meaning your changes are not included in the deployment. This happens to a few people wasting time wondering why the changes is not deployed. What I did in the past (2 weeks ago) was include a AfterBuild target to trigger CreatePackage target in our csproj file. It works very well when you are using the VS 2010 to build.
Solution : After a close examination on the Microsoft.VisualStudio.SharePoint.targets which a MSbuild file for SharePoint solution (It is responsible for packaging and deploying wsp file), I found that there is a property called IsPackaging that you can add to your project file to force build to package instead of doing above.
Problem 4: When TFS building and Packaging solution with multiple packages, only the last package is created. What happened was that the start step in the packaging process is to clean up the old wsp file. It should delete only the wsp that the project created. But instead it delete every wsp created by the solution. Therefore, only wsp create by the last project in the solution is left.
Solution: I haven't found a supported solution yet. Only do this on build machine that you don't do active development.
On the build machine, make the following changes in the CleanPackage target in the Microsoft.VisualStudio.SharePoint.targets located in
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\SharePointTools
<PackagesToDelete Include="$(BasePackagePath)*.$(PackageExtension)" />
<PackagesToDelete Include="$(BasePackagePath)$(AssemblyName).$(PackageExtension)" />
This isn't an issue when developer building locally since each project output folder is different. But in TFS build, all output files go to the same Binaries folder and that is why all previously created wsp files are deleted.
Note: The above change assume your solution package file is the same as your AssemblyName. That is our standard. I haven't found a way get the package name from within Microsoft.VisualStudio.SharePoint.targets
Problem 5: A solution suddenly fails to build with the following error
*****.csproj.metaproj : error MSB4025: The project file could not be loaded. Could not find file '*****\*****.csproj.metaproj
Microsoft acknowledged the issue but the workaround provided does not apply to us.
Solution: The error goes away after I created a new solution file and re-add all the projects to the new solution. I am still wondering why.
Problem 6 : You get the following compilation error in VS 2010 if you add Microsoft.Office.Server.dll or Microsoft.Office.Server.UserProfiles.dll to your project. You can fix that by adding System.Web.DataVisualization.dll from C:\Program Files (x86)\Microsoft Chart Controls\Assemblies and that now can compile without error. But suddenly the following error keep failing the build even if we have added a reference to System.Web.DataVisualization.dll.
(ResolveAssemblyReferences target) ->
warning MSB3267: The primary reference "System.Web.DataVisualization", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5". To resolve this problem, either remove the reference "System.Web.DataVisualization" or retarget your application to a framework version which contains "System.Web.DataVisualization"
(WorkflowCompilation target) ->
C:\Windows\Microsoft.NET\Framework\v4.0.21006\Workflow.Targets(121,5): error : The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Solution: To fix that I have to make a copy of System.Web.DataVisualization.dll and put it in a library folder under your solution folder and reference this dll from your project.
That is it so far. Hope it helps your project.