Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for .NET Core, using NuProj and fixing issue #3 #5

Closed
wants to merge 3 commits into from
Closed

Support for .NET Core, using NuProj and fixing issue #3 #5

wants to merge 3 commits into from

Conversation

fubar-coder
Copy link

  • Moved source code to a shared library
  • Created two projects - one for .NET Profile136 (.NET 4.0, SL5) and one for .NET Profile259 (.NET 4.5, .NET Core)
  • Create NuGet package using NuProj
  • Fixes Problem with "NewFolder\" #3
  • Using a GlobalAssemblyInfo.cs (only one place to change the version number)

<Import Project="$(NuProjPath)\NuProj.props" Condition="Exists('$(NuProjPath)\NuProj.props')" />
<PropertyGroup Label="Configuration">
<Id>Minimatch</Id>
<Version>1.2.0</Version>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a hard-coded version?
Can it be linked to the assembly version like a normal .nuspec?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a limitation of NuProj. However, to make it usable from a build server, I can add the following lines to the project file:

  <PropertyGroup>
    <VersionDependsOn>$(VersionDependsOn);GetNuPkgVersion</VersionDependsOn>
  </PropertyGroup>
  <Target Name="GetNuPkgVersion" Condition="'$(NuGetPackageVersion)' != ''">
    <PropertyGroup>
      <Version>$(NuGetPackageVersion)</Version>
    </PropertyGroup>
  </Target>

This would allow one to set NuGetPackageVersion which would override the version in the NuGet project.

However, I found that the version detection of NuGet sometimes doesn't work and prefer setting the version explicitly.

@SLaks
Copy link
Owner

SLaks commented Oct 4, 2015

Why do you need two different projects?

@fubar-coder
Copy link
Author

I need two different projects, because I have two different portable libraries. One for .NET profile 136 and one for .NET profile 259.

EDIT: It seems that I cannot create a PCL that supports both .NET 4.0 and .NET Core, which is why I need to create a new PCL for .NET 4.5 and .NET Core.

@fubar-coder
Copy link
Author

The main reason to use NuProj is that I can simply add project references and it'll automatically create all the necessary lib and dependency entries (with the xmldoc file). It can easily be configured to create a symbol package which will be uploaded to symbolsource.org which is quite convenient when a user of the library runs into problems.

@sphiecoh
Copy link

sphiecoh commented May 9, 2016

Support .net core yet?

@fubar-coder fubar-coder closed this Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with "NewFolder\"
3 participants