-
-
Notifications
You must be signed in to change notification settings - Fork 414
Add support for .NET Standard #308
Add support for .NET Standard #308
Conversation
Hey thanks for your contribution! It's something we were thinking of and that we would have implemented in the next few weeks. I will have a look at it. You are welcome to join the gitter discussion if you like :) |
@@ -1,7 +1,7 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
|
|||
<PropertyGroup> | |||
<TargetFrameworks>net20;net35;net40;net45;netstandard2.0</TargetFrameworks> | |||
<TargetFrameworks>net20;net35;net40;net45;netstandard2.0;netstandard1.3</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to keep both netstandard2.0 and netstandard1.3 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to do so; some code is missing in netstandard1.3 (like Encoding.Default
) which is present in netstandard2.0
. So the netstandard1.3 & 2.0 builds are not exactly the same.
Which brings me to another question - why do target .NET 2.0, 3.5, 4.0 and 4.5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backward compatibility I guess. Not sure if the original developer knows himself if this is still needed...
appveyor.yml
Outdated
- ps: nuget pack C:\projects\vlc-dotnet-master\nuget\Vlc.DotNet.Wpf.nuspec -version $env:APPVEYOR_BUILD_VERSION | ||
- msbuild /t:Restore /Verbosity:Minimal "src\Vlc.DotNet.sln" | ||
- msbuild /t:Build /p:Configuration=Release "src\Vlc.DotNet.sln" | ||
- msbuild /t:Pack /p:Configuration=Release "src\Vlc.DotNet.Core.Interops\Vlc.DotNet.Core.Interops.csproj" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where has the version gone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can provide a VersionSuffix and a VersionPrefix as MSBuild variables. The .NET Core SDK then uses that for assembly and NuGet package version numbers. I've updated the PR to do that.
For the time being, I disabled automatic assembly version information generation because it conflicts with some of the AssemblyInfo files you already have. It's something you may want to consider enabling later.
appveyor.yml
Outdated
- ps: nuget pack C:\projects\vlc-dotnet-master\nuget\Vlc.DotNet.Forms.nuspec -version $env:APPVEYOR_BUILD_VERSION | ||
- ps: nuget pack C:\projects\vlc-dotnet-master\nuget\Vlc.DotNet.Wpf.nuspec -version $env:APPVEYOR_BUILD_VERSION | ||
- msbuild /t:Restore /Verbosity:Minimal "src\Vlc.DotNet.sln" | ||
- msbuild /t:Build /p:Configuration=Release "src\Vlc.DotNet.sln" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't there the /logger option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it back. Not sure if it's really needed these days, though.
Can you rebase? I've fixed the weird UTF-8 conversion as per your private comments on gitter |
- For class libraries, use a single .NET Core project which multi-targets net20, net35, net40, net45 and netstandard2.0 - Update the references in the sample projects (but keep a sample project per target framework) - Update the solution file
Build and package using msbuild, as a workdaround for dotnet/msbuild#1333
Looks better. The only difference between netstandard1.3 and netstandard2.0 are some CAS attributes. |
This PR adds support for .NET Standard to Vlc.DotNet.
The .NET Core SDK and Visual Studio 2017 allow you to:
.csproj
file..csproj
fileThe
.csproj
files for the class libraries/NuGet packages have been updated to use this new project format. As a result, you'll need Visual Studio 2017, Visual Studio Code or the .NET Core CLI and a command-line editor to build the project.The AppVeyor project has been updated accordingly.