[Mono-list] Monodevelop Build fails where Add Reference to Project
Alberto León
leontiscar at gmail.com
Thu Jan 24 16:08:21 UTC 2013
I understanded you.
But this behaviour disapeared after used xbuild from console!
After this, all the builds without put in csproj any outputpath, with the
default configuration runned!
I spoke about this in monodevelop list
2013/1/24 Alan <alan.mcgovern at gmail.com>
> This is 'correct' behaviour. The csproj has a build configuration for
> Debug|AnyCPU and Release|AnyCPU. If you were to build this project with any
> configuration other than this, the build will fail. to fix this you either
> need to create a sane build configuration for your chosen setup (for
> example Debug|x86) or set up correct configuration mappings so that when
> you build your sln with Debug|x86 you build valid configurations for all
> your dependent csproj files.
>
> Both MonoDevelop and Visual Studio can generate new build configurations
> for combinations which do not exist when you are editing the build
> configuration inside the IDE.
>
> Alan
>
>
> On 18 January 2013 23:07, Alberto León <leontiscar at gmail.com> wrote:
>
>> Thanks Alan. This solved my problem.
>>
>> I surprised because one person expects that an IDE should do these things
>> automatically.
>>
>> Is a bug in MonoDevelop or is a bug only in Linux Mint packages?
>>
>> I'm very curious.
>>
>> I created a new project example, pepepepe.csproj
>>
>> The first PropertyGroup doesn't contains Outputpath property. This isn't
>> a problem, if you build this project separately.
>>
>> But if you referenced this project, the master project looks for the
>> first PropertyGroup, and not for the others that have a OutputPropertyPath.
>>
>> As you said, if you Add OutPutPropertyPath the master project builds
>> correctly.
>>
>> This is the example of the csproj
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="
>> http://schemas.microsoft.com/developer/msbuild/2003">
>> <PropertyGroup>
>> <Configuration Condition=" '$(Configuration)' == ''
>> ">Debug</Configuration>
>> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
>> <ProductVersion>10.0.0</ProductVersion>
>> <SchemaVersion>2.0</SchemaVersion>
>> <ProjectGuid>{83DE5B80-5C64-4272-B8C2-3857B2535C7B}</ProjectGuid>
>> <OutputType>Library</OutputType>
>> <RootNamespace>pepepe</RootNamespace>
>> <AssemblyName>pepepe</AssemblyName>
>> </PropertyGroup>
>> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
>> 'Debug|AnyCPU' ">
>> <DebugSymbols>true</DebugSymbols>
>> <DebugType>full</DebugType>
>> <Optimize>false</Optimize>
>> <OutputPath>bin\Debug</OutputPath>
>> <DefineConstants>DEBUG;</DefineConstants>
>> <ErrorReport>prompt</ErrorReport>
>> <WarningLevel>4</WarningLevel>
>> <ConsolePause>false</ConsolePause>
>> </PropertyGroup>
>> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
>> 'Release|AnyCPU' ">
>> <DebugType>none</DebugType>
>> <Optimize>false</Optimize>
>> <OutputPath>bin\Release</OutputPath>
>> <ErrorReport>prompt</ErrorReport>
>> <WarningLevel>4</WarningLevel>
>> <ConsolePause>false</ConsolePause>
>> </PropertyGroup>
>> <ItemGroup>
>> <Reference Include="System" />
>> </ItemGroup>
>> <ItemGroup>
>> <Compile Include="MyClass.cs" />
>> <Compile Include="AssemblyInfo.cs" />
>> </ItemGroup>
>> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
>> </Project>
>>
>>
>> 2013/1/18 Alan <alan.mcgovern at gmail.com>
>>
>>> Open the csproj properties in Visual Studio or MonoDevelop and set a
>>> sane value for the OutputPath property. That will cause the csproj to be
>>> rewritten and it will then contain this value. The build is failing because
>>> your csproj does not specify where the compiled assemblies should be put
>>> when building Debug|x86.
>>>
>>> Alan
>>>
>>> On 18 January 2013 13:03, Alberto León <leontiscar at gmail.com> wrote:
>>>
>>>> I tried compile projects separately, and all builds without problems.
>>>>
>>>> But when I reference a project, and do build, MonoDevelop shows an
>>>> error 'OutputPath' property is not set for this project
>>>>
>>>> I'm on Linux Mint Maya
>>>> The problem appears with official packages of Mono and Monodevelop, and
>>>> in a Parallel Environment with Mono 3.0.3 and MonoDevelop 3.0.4
>>>>
>>>> Construyendo: hola (Debug)
>>>>
>>>> Realizando compilación principal...
>>>>
>>>> Build started 17/01/2013 23:17:01.
>>>> __________________________________________________
>>>> Project "/home/alberto/MonoSimpleInstall/hola/hola.csproj" (Build
>>>> target(s)):
>>>> Target PrepareForBuild:
>>>> Configuration: Debug Platform: AnyCPU
>>>> Target GenerateSatelliteAssemblies:
>>>> No input files were specified for target GenerateSatelliteAssemblies,
>>>> skipping.
>>>> Target CoreCompile:
>>>> Tool /usr/bin/gmcs execution started with arguments: /noconfig
>>>> /debug:full /debug+ /optimize- /out:obj/Debug/hola.dll MyClass.cs
>>>> AssemblyInfo.cs /target:library /define:DEBUG
>>>> /reference:/usr/lib/mono/2.0/System.dll /warn:4
>>>> Target DeployOutputFiles:
>>>> Copying file from
>>>> '/home/alberto/MonoSimpleInstall/hola/obj/Debug/hola.dll.mdb' to
>>>> '/home/alberto/MonoSimpleInstall/hola/bin/Debug/hola.dll.mdb'
>>>> Copying file from
>>>> '/home/alberto/MonoSimpleInstall/hola/obj/Debug/hola.dll' to
>>>> '/home/alberto/MonoSimpleInstall/hola/bin/Debug/hola.dll'
>>>> Done building project
>>>> "/home/alberto/MonoSimpleInstall/hola/hola.csproj".
>>>>
>>>> Build succeeded.
>>>> 0 Warning(s)
>>>> 0 Error(s)
>>>>
>>>> Time Elapsed 00:00:00.6061730
>>>> Construcción finalizada -- 0 errores, 0 advertencias
>>>>
>>>> Construyendo: MonoSimpleInstallConsole (Debug|x86)
>>>>
>>>> Realizando compilación principal...
>>>>
>>>> Build started 17/01/2013 23:17:02.
>>>> __________________________________________________
>>>> Project
>>>> "/home/alberto/MonoSimpleInstall/MonoSimpleInstallConsole/MonoSimpleInstallConsole.csproj"
>>>> (Build target(s)):
>>>> Target PrepareForBuild:
>>>> Configuration: Debug Platform: x86
>>>> Target ResolveProjectReferences:
>>>> Project "/home/alberto/MonoSimpleInstall/hola/hola.csproj"
>>>> (GetTargetPath target(s)):
>>>> Target _ValidateEssentialProperties:
>>>> /usr/lib/mono/4.0/Microsoft.Common.targets: error : 'OutputPath'
>>>> property is not set for this project. Usually this is caused by invalid
>>>> Configuration/Platform combination. Original values: Configuration: Debug
>>>> Platform: x86.
>>>> Task "Error" execution -- FAILED
>>>> Done building target "_ValidateEssentialProperties" in project
>>>> "/home/alberto/MonoSimpleInstall/hola/hola.csproj".-- FAILED
>>>> Done building project
>>>> "/home/alberto/MonoSimpleInstall/hola/hola.csproj".-- FAILED
>>>> Task "MSBuild" execution -- FAILED
>>>> Done building target "ResolveProjectReferences" in project
>>>> "/home/alberto/MonoSimpleInstall/MonoSimpleInstallConsole/MonoSimpleInstallConsole.csproj".--
>>>> FAILED
>>>> Done building project
>>>> "/home/alberto/MonoSimpleInstall/MonoSimpleInstallConsole/MonoSimpleInstallConsole.csproj".--
>>>> FAILED
>>>>
>>>> Build FAILED.
>>>> Errors:
>>>>
>>>> /home/alberto/MonoSimpleInstall/MonoSimpleInstallConsole/MonoSimpleInstallConsole.csproj
>>>> (Build) ->
>>>> /usr/lib/mono/4.0/Microsoft.Common.targets (ResolveProjectReferences
>>>> target) ->
>>>> /home/alberto/MonoSimpleInstall/hola/hola.csproj (GetTargetPath) ->
>>>> /usr/lib/mono/4.0/Microsoft.Common.targets
>>>> (_ValidateEssentialProperties target) ->
>>>>
>>>> /usr/lib/mono/4.0/Microsoft.Common.targets: error : 'OutputPath'
>>>> property is not set for this project. Usually this is caused by invalid
>>>> Configuration/Platform combination. Original values: Configuration: Debug
>>>> Platform: x86.
>>>>
>>>> 0 Warning(s)
>>>> 1 Error(s)
>>>>
>>>> Time Elapsed 00:00:00.1621860
>>>> Construcción finalizada -- 1 error, 0 advertencias
>>>>
>>>> ---------------------- Hecho ---------------------
>>>>
>>>> Construcción: 1 error, 0 advertencias
>>>>
>>>> --
>>>>
>>>> http://stackoverflow.com/users/690958/alberto-leon
>>>>
>>>> _______________________________________________
>>>> Mono-list maillist - Mono-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>>
>>>>
>>>
>>
>>
>> --
>>
>> http://stackoverflow.com/users/690958/alberto-leon
>>
>
>
--
http://stackoverflow.com/users/690958/alberto-leon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130124/a821394a/attachment.html>
More information about the Mono-list
mailing list