Code Monkey home page Code Monkey logo

Comments (25)

xivk avatar xivk commented on June 18, 2024

Hmm... not sure how to fix this...

from nettopologysuite.

jaundice avatar jaundice commented on June 18, 2024

I am no expert on msbuild, but could the actual code content be extracted to a .targets file and referenced within two or more projects (each configured for the appropriate framework) which each have their own .packages file with appropriate targets? (http://msdn.microsoft.com/en-GB/library/92x05xfs.aspx) Then TC can be configured with multiple build steps to build each project before packaging at the end?

Cheers jd

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

We have to break the BuildRelease target into several, one for each framework we want to compile for.
Have a look at https://github.com/FObermaier/SbnSharp/blob/master/SharpSbn.targets
Felix

John Diss [email protected] hat am 28. August 2014 um 11:03 geschrieben:
I am no expert on msbuild, but could the actual code content be extracted to a .targets file and referenced within two or more projects (each configured for the appropriate framework) which each have their own .packages file? (http://msdn.microsoft.com/en-GB/library/92x05xfs.aspx) Then TC can be configured with multiple build steps to build each project before packaging at the end?
Cheers jd
From: Ben Abelshausen [mailto:[email protected]]
Sent: 28 August 2014 09:55
To: NetTopologySuite/NetTopologySuite
Subject: Re: [NetTopologySuite] NTS 2.0+3.5 builds broken (#1)
Hmm... not sure how to fix this...

Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-53689748.
—Reply to this email directly or view it on GitHub.

 

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

We have to break the BuildRelease target into several, one for each framework we want to compile for.

I'm not sure this should be enough. Actually the problem is related to packages.config inside NetTopologySuite project, so I fear we need to create different projects, only to manage different packages.config files.
Hope a better solutions exists out there...

from nettopologysuite.

jaundice avatar jaundice commented on June 18, 2024

dirty, but a prebuild step before each framework compile could clean the build and regex/replace the target in the packages file using variables defined by the project config? Multiple projects and targets feels cleaner though

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

prebuild step before each framework

a prebuild step should work, although isn't as simple as I wish

multiple projects and targets feels cleaner though

I agree with targets: having different project files means that we should handle adding/removing of files when someone make a change.

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

No, you don't need to do that.
Just change the reference to GeoAPI like this

    <Reference Include="GeoAPI">
      <HintPath>$(SolutionDir)packages\GeoAPI.1.7.2\lib\$(geoApi)\GeoAPI.dll</HintPath>
    </Reference>

All you need to do then is define $(geoApi) in the main property group (if not already defined elsewhere)
:

<geoApi Condition=" '$(geoApi)' == '' ">net40</geoApi>

For the build script that is done in the individual targets.

Sorry if I havn't made myself clear enough.

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

Sorry if I havn't made myself clear enough.

ok thanks fot the hint.
so I should edit all projects that references geoapi in this way, right?

hope to try as soon as possible

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

ok @FObermaier looks something like this looks ok
in targets file

<Target Name="BuildRelease20">
    <PropertyGroup>
        <fwVersion>net20</fwVersion>
    </PropertyGroup>
    <MSBuild Projects="$(SolutionFile)" 
         Targets="PowerCollections;NetTopologySuite;..." 
         Properties="fwVersion=$(fwVersion);Configuration=Release;..." 
         RunEachTargetSeparately="true" 
         ContinueOnError="true" 
         />     
</Target>  

in csproj files

<fwVersion Condition=" '$(fwVersion)' == '' ">net40-client</fwVersion>  
...
<Reference Include="GeoAPI">
  <HintPath>..\packages\GeoAPI.1.7.3\lib\$(fwVersion)\GeoAPI.dll</HintPath>
</Reference>

now I need only some time to work on it :)

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

I think that should do.

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

ok I'm in, looks things are working :)

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

@FObermaier I've added DependsOn to teamcity.targets because I need to clean before each build

<Target Name="BuildRelease20" DependsOnTargets="CleanRelease">

you've seen some issues related to this?

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

Adding DependsOnTargets="CleanRelease" will cause every build output be removed when the next build step starts. I'd say this is not what we want. Instead we can delete the intermediate output for the target before executing the msbuild step:

<Target Name="BuildRelease20">
<PropertyGroup>
<fwVersion>net20</fwVersion>
</PropertyGroup>
<RemoveDir Directories="$(MSBuildProjectDirectory)\obj\v2.0" ContinueOnError="true"/>
<MSBuild Projects="$(SolutionFile)"
Targets="PowerCollections;NetTopologySuite;NetTopologySuite_IO\NetTopologySuite_IO_GeoJSON;NetTopologySuite_IO\NetTopologySuite_IO_ShapeFile;NetTopologySuite_IO\NetTopologySuite_IO_GDB;NetTopologySuite_IO\NetTopologySuite_IO_GeoTools;NetTopologySuite_IO\NetTopologySuite_IO_MsSqlSpatial;NetTopologySuite_IO\NetTopologySuite_IO_PostGis;NetTopologySuite_IO\NetTopologySuite_IO_SpatiaLite;NetTopologySuite_IO\NetTopologySuite_IO_SqlServer2008"
Properties="fwVersion=$(fwVersion);Configuration=Release;TargetFrameworkVersion=v2.0;TargetFrameworkProfile=;DefineConstants=TRACE;NET20;BaseIntermediateOutputPath=$(MSBuildProjectDirectory)\obj\v2.0\;"
RunEachTargetSeparately="true"
ContinueOnError="true"
/>
</Target>

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

@FObermaier can you briefly take a look at my changes? hope all is ok now.
I actually still see with UnitTestsPCL: but I wanna move this to another issue.

from nettopologysuite.

xivk avatar xivk commented on June 18, 2024

Looking good... have been too busy to have look srry...

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

@DGuidi that is what I was going to do... you beat me to it.
Looking at the output of v4.5, it seems to be a fake net40. we need to investigate the build log to see what happens.

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

@xivk @FObermaier no need to apologize: we try to do our best with the time we have high five

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

@FObermaier checking the msbuild output messages, I see a warning when building for 4.5; it's related to the fact that I haven't the 4.5 framework in my PC, so I simply ignored the warning and considered the build valid.

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

For Net45 we need to undefine TargetFrameworkProfile, so the task should look like this:

<Target Name="BuildRelease45">
    <PropertyGroup>
        <fwVersion>net45</fwVersion>
    </PropertyGroup>
    <RemoveDir Directories="$(MSBuildProjectDirectory)\obj\v4.5" ContinueOnError="true"/>
    <MSBuild Projects="$(SolutionFile)" 
         Targets="PowerCollections;NetTopologySuite;NetTopologySuite_IO\NetTopologySuite_IO_GeoJSON;NetTopologySuite_IO\NetTopologySuite_IO_ShapeFile;NetTopologySuite_IO\NetTopologySuite_IO_ShapeFile_Extended;NetTopologySuite_IO\NetTopologySuite_IO_GDB;NetTopologySuite_IO\NetTopologySuite_IO_GeoTools;NetTopologySuite_IO\NetTopologySuite_IO_MsSqlSpatial;NetTopologySuite_IO\NetTopologySuite_IO_PostGis;NetTopologySuite_IO\NetTopologySuite_IO_SpatiaLite;NetTopologySuite_IO\NetTopologySuite_IO_SqlServer2008" 
         Properties="fwVersion=$(fwVersion);Configuration=Release;TargetFrameworkVersion=v4.5;TargetFrameworkProfile=;DefineConstants=TRACE;NET20;NET35;NET40;BaseIntermediateOutputPath=$(MSBuildProjectDirectory)\obj\v4.5\" 
         RunEachTargetSeparately="true" 
         ContinueOnError="true" 
         />
</Target>

EDIT: Unfortunately this applies to GeoAPI and ProjNet as well :(

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

@FObermaier using <fwVersion>net45</fwVersion> means that geoapi dll isn't found inside packages folder so I think we should use

<Target Name="BuildRelease45">
    <PropertyGroup>
        <fwVersion>net45-client</fwVersion>
    </PropertyGroup>
    <RemoveDir Directories="$(MSBuildProjectDirectory)\obj\v4.5" ContinueOnError="true"/>
    <MSBuild Projects="$(SolutionFile)" 
         Targets="PowerCollections;NetTopologySuite;NetTopologySuite_IO\NetTopologySuite_IO_GeoJSON;NetTopologySuite_IO\NetTopologySuite_IO_ShapeFile;NetTopologySuite_IO\NetTopologySuite_IO_ShapeFile_Extended;NetTopologySuite_IO\NetTopologySuite_IO_GDB;NetTopologySuite_IO\NetTopologySuite_IO_GeoTools;NetTopologySuite_IO\NetTopologySuite_IO_MsSqlSpatial;NetTopologySuite_IO\NetTopologySuite_IO_PostGis;NetTopologySuite_IO\NetTopologySuite_IO_SpatiaLite;NetTopologySuite_IO\NetTopologySuite_IO_SqlServer2008" 
         Properties="Configuration=Release;TargetFrameworkVersion=v4.5;TargetFrameworkProfile=;DefineConstants=TRACE;NET20;NET35;NET40;BaseIntermediateOutputPath=$(MSBuildProjectDirectory)\obj\v4.5\" 
         RunEachTargetSeparately="true" 
         ContinueOnError="true" 
         />
</Target>

or I'm wrong?

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

We need to change all the nuspec files :(

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

@FObermaier now it's clear to me also the lack of -client in fwVersion property, as you've posted :(

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

When we have fixed the Nuget packages we need to fix the fwVersion property, too

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

exactly, now I think I have clear the whole picture... :) confused

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

Can we close this issue?

from nettopologysuite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.