Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio 2013, Error Code MSB4175

I recently installed visual studios version 2013 update 4 on Windows 7, 64 bit system and tried building a project. In the process I am getting following error -

FilesError 1 error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Build.Tasks.v12.0.dll". Could not find file 'C:\Users\pratyush\AppData\Local\Temp\wuknqfms.dll'.

Interestingly the dll file in AppData\local\Temp is changing each time the project is rebuild. It seems to be a random 8 character string.

For instance If I rebuild the project, the file wuknqfms.dll, as in the error message, changes to - fjcmnzgj.dll.

On building again it changes to imypid1e.dll. And so on.

More interestingly, older version of Visual Studios such as 2012 and 2010 are working just fine.

I tried troubleblasting this error in following ways - 1. reinstall Visual Studios 2. repair Visual Studios 3. install latest Version of .net 4. install current msbuild tool 5. update any updatable package as shown in nuget 6. Google the issue and look in forums

If you have some lead or suggestion, kindly share.

like image 376
pratyush Avatar asked Nov 10 '22 10:11

pratyush


1 Answers

In your csproj, in the tag <Project>, change the ToolsVersion from 4.0 to 12.0

Source: https://msdn.microsoft.com/en-us/library/hh873168.aspx

edit: <Project> considered as html tag

like image 149
Calimero100582 Avatar answered Nov 15 '22 05:11

Calimero100582