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

Build issues #15

Open
taumuon opened this issue May 3, 2018 · 2 comments
Open

Build issues #15

taumuon opened this issue May 3, 2018 · 2 comments

Comments

@taumuon
Copy link

taumuon commented May 3, 2018

Hi, I cloned the repository and followed the build instructions but ran into some issues. I have dotnet sdk 2.1.4 installed.
On attempting to restore I got an error:
D:\git\mellinoe\vk\src\samples\tutorial\tutorial.csproj : error NU1102: Unable to find package SixLabors.ImageSharp with version (>= 1.0.0-ci0027) [D:\git\mellinoe\vk\src\vk.sln]
I modified the tutorial.csproj to reference SixLabors.ImageSharp version 1.0.0-beta0003, and that had a knock-on effect that I had to reference System.Runtime.CompilerServices.Unsafe version 4.5.0-preview1-26216-02.

After that the restore worked, but then the build failed:

D:\git\mellinoe\vk>dotnet msbuild src\vk\vk.csproj
Microsoft (R) Build Engine version 15.5.180.51428 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

The application to execute does not exist: 'D:\git\mellinoe\vk\bin\Debug\vk.generator\netcoreapp2.0\vk.generator.dll'

D:\git\mellinoe\vk\src\vk\vk.csproj(32,5): error MSB3073: The command "dotnet D:\git\mellinoe\vk\bin/Debug/vk.generator/netcoreapp2.0/vk.generator.dll --out D:\git\mellinoe\vk\src\vk\Generated" exited with code -2147450751.

Thanks,
Gary

@taumuon
Copy link
Author

taumuon commented May 3, 2018

Hi, the project builds OK if I first open the solution and ensure that vk.generator project is build.
The dotnet msbuild commands now work, but I get an error when trying to build the solution in Visual Studio:
9>------ Build started: Project: tutorial, Configuration: Debug Any CPU ------
9>C:\Program Files\dotnet\sdk\2.1.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'D:\git\mellinoe\vk\bin\obj\tutorial\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v1.1/win7-x64'. Ensure that restore has run and that you have included 'netcoreapp1.1' in the TargetFrameworks for your project. You may also need to include 'win7-x64' in your project's RuntimeIdentifiers.
9>Done building project "tutorial.csproj" -- FAILED.

Thanks,
Gary

@mellinoe
Copy link
Owner

mellinoe commented May 3, 2018

It seems like some of the sample projects were broken by an SDK update. Unfortunately, I'm out of town at the moment so I can't immediately fix some of this stuff. It shouldn't be too terribly difficult to work through, though. The samples in here definitely deserve some love, they have gotten pretty stale with old package references (ImageSharp) and things from the early days of .NET Core (all those extra properties in the project files). I've been focused on other graphics-related projects using Vulkan, so these sample projects kind of fell off my radar. I won't be able to get them tested for a couple weeks, most likely.

I took a crack at what the cleanup might look like, without changing too much. I didn't test this, as I only have my MacBook which doesn't support Vulkan. Even if this doesn't work, it might help you get started on something that does. This is a fixed-up tutorial.csproj file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <OutputType>Exe</OutputType>
    <RootNamespace>Vk.Samples</RootNamespace>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>
  <ItemGroup>
    <Content Include="Shaders\shader.frag.spv">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Shaders\shader.vert.spv">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Textures\texture.jpg">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="../../vk/vk.csproj" />
    <ProjectReference Include="..\..\..\ext\veldrid.collections\src\Veldrid.Collections\Veldrid.Collections.csproj" />
    <PackageReference Include="System.CommandLine" Version="0.1.0-e160908-1" />
    <PackageReference Include="OpenTK.NETCore" Version="1.1.2287.6424" />
    <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.4.0" />
    <PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-ci0027" />
  </ItemGroup>
</Project>

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

No branches or pull requests

2 participants