Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

MSB4062 when running fxcop on pre-C#4.0 projects in RC4.2

$
0
0

I've just installed this version of SharpDevelop

SharpDevelop Version : 4.2.0.8774-RC-78ca36ef
.NET Version         : 4.0.30319.261
OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture      : English (United Kingdom) (en-GB)
Running under WOW6432, processor architecture: x86-64
Working Set Memory   : 245548kb
GC Heap Memory       : 120372kb

On attempting to build a C#2.0 / .net 2.0 project, I  get the following error:

Error MSB4062: The "ICSharpCode.Build.Tasks.FxCop" task could not be loaded from the assembly C:\Program Files (x86)\SharpDevelop\4.2\bin\ICSharpCode.Build.Tasks.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\SharpDevelop\4.2\bin\ICSharpCode.Build.Tasks.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.

If I use the project upgrade to set the compiler version to C#4.0 then this error goes away but instead I get

Error MSB3454: Tracker.exe is required to correctly incrementally generate resources in some circumstances, such as when building on a 64-bit OS using 32-bit MSBuild. This build requires Tracker.exe, but it could not be found.  The task is looking for Tracker.exe beneath the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A.  To solve the problem, either: 1) Install the Microsoft Windows SDK v7.0A or later. 2) Install Microsoft Visual Studio 2010. 3) Manually set the above registry key to the correct location. Alternatively, you can turn off incremental resource generation by setting the "TrackFileAccess" property to "false".

If I also set the .net framework version to 4.0 then this error also goes away, but then I'm forcing any users of my application to install .net 4.0.

This project builds quite happily as C# 2.0 and .net 2.0 in this version of SharpDevelop:

SharpDevelop Version : 4.1.0.8000-736b5b66
.NET Version         : 4.0.30319.261
OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture      : English (United Kingdom) (en-GB)
Running under WOW6432, processor architecture: x86-64
Working Set Memory   : 93392kb
GC Heap Memory       : 6990kb

... so I guess this is a bug which has crept into 4.2?

Simon.


Viewing all articles
Browse latest Browse all 1764

Trending Articles