Microsoft.Common.targets: error MSB3577: Two output file names resolved to the same output path
Platform: Visual Studio 2010
How do I fix this error?
8>Target "PrepareResourceNames: (TargetId:473)" in file "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" from project "<the project path>" (target "PrepareResources" depends on it): 8>Done building target "PrepareResourceNames" in project "theProject.csproj".: (TargetId:473) 8>Target "ResolveAssemblyReferences" skipped. Previously built successfully. 8>Target "SplitResourcesByCulture" skipped. Previously built successfully. 8>Target "BeforeResGen: (TargetId:474)" in file "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" from project "<the project path>" (target "ResGen" depends on it): 8>Done building target "BeforeResGen" in project "theProject.csproj".: (TargetId:474) 8>Target "CoreResGen: (TargetId:475)" in file "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" from project "<the project path>" (target "ResGen" depends on it): 8>Task "GenerateResource" (TaskId:295) 8> Launching task "GenerateResource" from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" in an external task host with a runtime of "CLR4" and a process architecture of "x64". (TaskId:295) 8>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2318,5): error MSB3577: Two output file names resolved to the same output path: "obj\x64\Debug\theProject.FormImageMASSter.resources" 8>Done executing task "GenerateResource" -- FAILED. (TaskId:295) 8>Done building target "CoreResGen" in project "theProject.csproj" -- FAILED.: (TargetId:475)
The referenced section in Microsoft.Common.targets is:
<!-- 4.0 task has some new parameters that we want to make use of if we're targeting 4.0 --> <GenerateResource Sources="@(EmbeddedResource)" UseSourcePath="$(UseSourcePath)" References="@(ReferencePath)" AdditionalInputs="$(MSBuildAllProjects)" NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)" StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.Cache" StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)" StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)" StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)" StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)" StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)" PublicClass="%(EmbeddedResource.PublicClass)" OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')" Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2'" SdkToolsPath="$(ResgenToolPath)" ExecuteAsTool="$(ResGenExecuteAsTool)" EnvironmentVariables="$(ResGenEnvironment)" MSBuildRuntime="$(GenerateResourceMSBuildRuntime)" MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)"> <Output TaskParameter="FilesWritten" ItemName="FileWrites"/> <Output TaskParameter="StronglyTypedFileName" ItemName="Compile"/> <!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into --> <Output TaskParameter="Sources" ItemName="_Temporary" /> </GenerateResource>