[ 
https://issues.apache.org/jira/browse/NPANDAY-419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lars Corneliussen resolved NPANDAY-419.
---------------------------------------

    Resolution: Fixed
      Assignee: Lars Corneliussen

fixed in trunk

> Targeting .NET 3.5 does not work when Compact Framework is not installed
> ------------------------------------------------------------------------
>
>                 Key: NPANDAY-419
>                 URL: https://issues.apache.org/jira/browse/NPANDAY-419
>             Project: NPanday
>          Issue Type: Bug
>          Components: Maven Plugins
>    Affects Versions: 1.2.1
>            Reporter: Lars Corneliussen
>            Assignee: Lars Corneliussen
>              Labels: compile
>             Fix For: 1.3.1-incubating
>
>
> When trying to compile a 3.5 Library/Exe on a system where CF 3.5 is not 
> installed, the following error occurs:
> {code}
> error CS0006: Metadata file 
> 'C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.C
> ompactFramework.Build.Tasks.dll' could not be found
> {code}
> Here is the full build log:
> {code}
> [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] 
> ------------------------------------------------------------------------
> {code}
> A quick look into DefaultCompiler.java, shows why:
> {code:title=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" );
>        }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to