Bug 42268 - CS0246 The type of namespace name 'GeneratedCodeAttribute' could not be found
Summary: CS0246 The type of namespace name 'GeneratedCodeAttribute' could not be found
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-06-30 08:40 UTC by John Nolan
Modified: 2016-07-06 08:46 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description John Nolan 2016-06-30 08:40:11 UTC
Build FAILED.

   at Xamarin.VisualStudio.MsBuild.MsBuildService.RunTarget(IProjectNode projectNode, String msbuildTarget, IProgressReport progress, IDictionary`2 globalProperties, IDictionary`2 properties) in C:\Users\builder\data\lanes\3420\34a92cd0\source\xamarinvs\src\Core\VisualStudio\MsBuild\MsBuildService.cs:line 215
   at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.RevalidateBuildSignature() in C:\Users\builder\data\lanes\3420\34a92cd0\source\xamarinvs\src\Core\VisualStudio.IOS\ProjectSystem\MonoTouchFlavoredProject.cs:line 198


Xamarin.VisualStudio.Shell.Components.ComponentsFlavoredProject Error: 0 : [2016-06-30 09:25:28.3064] An error occured trying to load components: An equivalent project (a project with the same global properties and tools version) is already present in the project collection, with the path "D:\xxx.csproj". To load an equivalent into this project collection, unload this project first.
System.InvalidOperationException: An equivalent project (a project with the same global properties and tools version) is already present in the project collection, with the path "xxx". To load an equivalent into this project collection, unload this project first.
   at Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(String resourceName, Object[] args)
   at Microsoft.Build.Evaluation.ProjectCollection.LoadedProjectCollection.AddProject(Project project)
   at Microsoft.Build.Evaluation.ProjectCollection.OnAfterRenameLoadedProject(String oldFullPathIfAny, Project project)
   at Microsoft.Build.Evaluation.Project.<Initialize>b__152_0(String oldFullPath)
   at Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
   at Xamarin.VisualStudio.Shell.Components.ComponentsManager.LoadComponents() in C:\Users\builder\data\lanes\3420\34a92cd0\source\xamarinvs\src\Core\VisualStudio.Shell\Components\ComponentsManager.cs:line 92
   at Xamarin.VisualStudio.Shell.Components.ComponentsFlavoredProject.<LoadComponentsAsync>b__13_0() in C:\Users\builder\data\lanes\3420\34a92cd0\source\xamarinvs\src\Core\VisualStudio.Shell\Components\ComponentsFlavoredProject.cs:line 66


Project name and file system location omitted.
Comment 1 Alex Soto [MSFT] 2016-06-30 13:47:00 UTC
Please include a small test (if possible) also all version informations of yours.
Comment 2 John Nolan 2016-07-06 08:46:23 UTC
Deleting the Cache on the MAC build host resolves this issue. It seems that Xamarin is unable to delete/replace Caches\Xamarin\mtbs\builds\xxx\ where xxx is the project name. Deleting the contents of the obj folder enabled me to build again.