Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

[Feature] .Net Framework support #25

Open
KuraiAndras opened this issue Apr 6, 2020 · 8 comments
Open

[Feature] .Net Framework support #25

KuraiAndras opened this issue Apr 6, 2020 · 8 comments
Assignees

Comments

@KuraiAndras
Copy link

Can you add an options to use this action with msbuild and nuget.exe to publish framework packages? Some projects ( for example Uwp) need msbuild.

@brandedoutcast
Copy link
Owner

I want to keep it as dotnet-core only as .NET 5 will hopefully make it possible to do everything with dotnet-cli but I understand the need here & let me see what can be done

@KuraiAndras
Copy link
Author

I tought abount creating a fork of this repo to run on windows and use MSBuild and nuget.exe, but i'm not too familiar about setting up reusable actions.

Changing the required host to windows. and substituting dotnet with MsBuild.exe and nuget.exe in index.js should do the trick.

Would you consider creating a fork of this with these changes?

@brandedoutcast
Copy link
Owner

Nah windows / linux is decided by your pipeline this action has nothing to do with it

A simpler approach would be to create a flag that can be set to use MSBuild instead of the default dotnet-core

@brandedoutcast brandedoutcast self-assigned this Apr 16, 2020
@AraHaan
Copy link
Contributor

AraHaan commented Apr 21, 2020

Actually there is a way to build the net framework targets on linux and mac as well, so this should not be an issue all you need is to add this line to your sdk style csproj:

<PackageReference Condition="!$(TargetFramework.StartsWith('netcoreapp')) AND !$(TargetFramework.StartsWith('netstandard'))" Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
  <PrivateAssets>All</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

In my csproj I even inlined it all to 1 xml line too: https://github.com/Elskom/zlib.managed/blob/master/zlib.managed.csproj#L70

This is because I have dependabot manage the updates to the nuget packages for me.

@KuraiAndras
Copy link
Author

@AraHaan I have tried this with a UWP project but it did not work. I tried this with both dotnet build and dotnet msbuild but it fails with

error MSB4019: The imported project "C:\Program Files\dotnet\sdk\3.1.201\Microsoft\WindowsXaml\v16.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found.

I suppose UWP is only supported on windows. The nuget you provided only contains .Net Framework assemblies, and thus it cannot have all the necessary targets for UWP.

@AraHaan
Copy link
Contributor

AraHaan commented Apr 22, 2020

Welp I guess time to file an issue for that package then to request them to provide the targets for UWP.

@sinatahoori
Copy link

How can I get the package built via msbuild.exe ?

@m-sadegh-sh
Copy link

@brandedoutcast Any update on the msbuild support? I can create a PR for this. I just need to get an update before doing that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants