Skip to content
New issue

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

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

Already on GitHub? # to your account

Net6 support #298

Closed
abegau opened this issue Jan 5, 2022 · 4 comments
Closed

Net6 support #298

abegau opened this issue Jan 5, 2022 · 4 comments

Comments

@abegau
Copy link

abegau commented Jan 5, 2022

Hi Michael,

it seems that running the xscgen tool on Net6 SDK is not supported yet because it is not included in the TargetFramework list.
I checked out the code and added net6.0 to the TargetFramework list locally which could directly be compiled.

Is it planned to release a net6.0 based version in the near future?

Thank you!
André

@mganss
Copy link
Owner

mganss commented Jan 5, 2022

The current version should run on net6.0. Do you get any error messages?

@abegau
Copy link
Author

abegau commented Jan 6, 2022

I get the following error with 2.0.630 on an 6.0.101-bullseye-slim Docker image:

It was not possible to find any compatible framework version
  The framework 'Microsoft.NETCore.App', version '5.0.0' (x64) was not found.
    - The following frameworks were found:
        6.0.1 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  
  You can resolve the problem by installing the specified framework and/or SDK.
  
  The specified framework can be found at:
    - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=debian.11-x64
/builds/tbP3ytCt/0/Project.csproj(10,3): error MSB3073: The command "xscgen schema.xsd" exited with code 150.

My csproj File looks like this:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
	  <TargetFramework>net6.0</TargetFramework>
  </PropertyGroup>

	<Target Name="PreBuild" BeforeTargets="Build">
		<Exec Command="xscgen Schema.xsd" />
	</Target>
</Project>

@mganss
Copy link
Owner

mganss commented Jan 6, 2022

It seems .NET Core does not automatically roll forward through major version boundaries of the runtime: https://docs.microsoft.com/en-us/dotnet/core/versions/selection#framework-dependent-apps-roll-forward

Specifically this scenario:

❌ 3.0 is specified. No 3.x versions are installed. 5.0.0 is the highest runtime installed. An error message is displayed.

I've added <RollForward>Major</RollForward> to the .csproj so it should work with the latest release (2.0.631).

@abegau
Copy link
Author

abegau commented Jan 6, 2022

Works like a charm, thanks a lot!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants