Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2.1
Description
When trying to compile a 3.5 Library/Exe on a system where CF 3.5 is not installed, the following error occurs:
error CS0006: Metadata file 'C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.C ompactFramework.Build.Tasks.dll' could not be found
Here is the full build log:
[INFO] [compile:compile {execution: default-compile}] [INFO] NPANDAY-066-013: Found Vendor = Vendor = MICROSOFT, Vendor Version = 3.5, Framework Version = 3.5, Executable Paths = [C:\Windows\Microsoft.NET\Framework 64\v3.5, C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin] [INFO] NPANDAY-068-003: Compiling Artifact: Vendor = MICROSOFT, Language = MICRO SOFT, Assembly Name = C:\Users\MikeBild\Desktop\Teil1\hello-npanday-vs\HelloNPan day\HelloNPanday.Logic\target\HelloNPanday.Logic.dll [INFO] NPANDAY-068-005: Found executable path for csc: C:\Windows\Microsoft.NET\ Framework64\v3.5 error CS0006: Metadata file 'C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.C ompactFramework.Build.Tasks.dll' could not be found [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] NPANDAY-900-006: Unable to Compile: Language = C_SHARP, Vendor = null, Ar tifactType = dotnet-library, Source Directory = C:\Users\MikeBild\Desktop\Teil1\ hello-npanday-vs\HelloNPanday\HelloNPanday.Logic Embedded error: NPANDAY-040-001: Could not execute: Command = cmd.exe /X /C "cs c @C:\Users\MikeBild\Desktop\Teil1\hello-npanday-vs\HelloNPanday\HelloNPanday.Lo gic\target\27191835\responsefile.rsp", Result = 1 [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13 seconds [INFO] Finished at: Wed Apr 27 19:18:35 CEST 2011 [INFO] Final Memory: 29M/602M [INFO] ------------------------------------------------------------------------
A quick look into DefaultCompiler.java, shows why:
DefaultCompiler.java
if ( compilerContext.getCompilerRequirement().getVendor().equals( Vendor.MICROSOFT ) && compilerContext.getCompilerRequirement().getFrameworkVersion().equals( "3.5" ) ) { String wcfRef = "/reference:" + System.getenv( "SystemRoot" ) + "\\Microsoft.NET\\Framework\\v3.5\\"; //TODO: This is a hard-coded path: Don't have a registry value either. commands.add( wcfRef + "Microsoft.Build.Tasks.v3.5.dll" ); commands.add( wcfRef + "Microsoft.CompactFramework.Build.Tasks.dll" ); commands.add( wcfRef + "Microsoft.Data.Entity.Build.Tasks.dll" ); commands.add( wcfRef + "Microsoft.VisualC.STLCLR.dll" ); }