Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(3243,9): error MSB4094

After open my VS Ultimate 2012 C# solution in VS Ultimate 2013 12.0.21005.1REL I get the following warning:

Warning 1 Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. EnergyMS

I follow the Microsoft link instructions. Then I edited the csproj file, adding the following line:

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

When I build the solution again, I get the following error:

Error List "app.config;obj\x86\Debug\EnergyMS.csproj.EnergyMS.exe.config" is an invalid value for the "ConfigFile" parameter of the "GenerateApplicationManifest" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". EnergyMS

Output Window:

C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(3243,9): error MSB4094: "app.config;obj\x86\Debug\EnergyMS.csproj.EnergyMS.exe.config" is an invalid value for the "ConfigFile" parameter of the "GenerateApplicationManifest" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem".

I've seen similar threads in forum, but I don't understand the problem.

Can anyone help me understand the problem?

Thank you.

like image 848
Lder Avatar asked Apr 06 '14 20:04

Lder


5 Answers

I found that if I turn off "Enable ClickOnce security settings" in the executable project's properties, that the error went away. What I have to find out next is what it is going to take to turn this option back on so that I can click once deploy my WPF app.

like image 105
user598946 Avatar answered Sep 27 '22 20:09

user598946


I've had "...is an invalid value for the "ConfigFile" parameter of the "GenerateApplicationManifest" task".

I solved editing the .csproj file from my project and including below <PropertyGroup>:

<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>

And all working fine now.

like image 25
Tiago Gouvêa Avatar answered Sep 27 '22 19:09

Tiago Gouvêa


Had a similar message and after doing a Internet search I found "Found conflicts between different versions of the same dependent assemblies"

Shows how to identify the offending assembly easily.

This evening I compiled a project I was playing around and was given the following warning.

Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.

Considering there are about 50 references across the projects I have in this solution, that isn’t particularly helpful. Rather than fishing through the solution trying to identify the offenders manually there is an easy way to get the compiler to spit out more information.

  1. In Visual Studio 2013 go to Tools > Options.
  2. Select Project and Solutions > Build and Run.
  3. Find the drop down MSBuild project build output verbosity. Here you can configure MSBuild to give you more information. By default it will be set to ‘Minimal’. Change this to ‘Detailed’.
  4. Rebuild and view the Output window. Copy everything into notepad and search for the warning which should tell you which assemblies you need to look at.

I found I needed to upgrade a few Prism assemblies in another project:

Found related file "....\bin\Debug\Microsoft.Practices.Prism.Mvvm.xml". This reference is not "CopyLocal" because it conflicted with another reference with the same name and lost the conflict. The ImageRuntimeVersion for this reference is "v4.0.30319".

like image 29
VcDeveloper Avatar answered Sep 27 '22 19:09

VcDeveloper


To all Xamarin-users:
I also had he error-message:

Error List "app.config;obj\x86\Debug\EnergyMS.csproj.EnergyMS.exe.config" is an invalid value for the "ConfigFile" parameter of the "GenerateApplicationManifest" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". EnergyMS

and I work with VS and Xamarin.Forms. I have tried to prepare my iOS app for ship to the store and abruptly had the problem (only with the iOS-project, Android an WP still have worked). I never have changed the settings on the security tab (I think, the settings were changed "in the background" by my steps to prepare the app for shipping). However, unchecking the checkbox "Activat ClickOnce security settings" on the security tab to my iOS project also have solved my problem. I then have searched the internet for any peace (word) of the error-message and found this message. As this posting don't have any Xamarin-tag, I also post here...

like image 36
FredyWenger Avatar answered Sep 27 '22 19:09

FredyWenger


I tried to add this as a comment but I didn't have enough reputation to do. The solution, as well known by now, is to disable the ClickOnce security feature for the project in VS. I want to add something to this as in the reason behind this setting. What happened in my project was that the solution was built using MSBuild and with the ClickOnce security feature turned ON. It was successfully built initially but my teammate noticed a cert that was generated. He thought it was a redundant once and deleted it. Since then, the project builds started failing from MSBuild. So I guess if you keep the cert as it is and build the project with ClickOnce feature enabled, you should not see the issue.

like image 33
karun_r Avatar answered Sep 27 '22 21:09

karun_r