Languages

Menu
Sites
Language
A bait-and-switch project fails to build

I am trying to create a bait-and-switch project with both the library and the app in the same solution.

This is a common way to create plugins or other shared APIs.

In my solution I have 4 projects:

  1. The CORE LOGIC project   (netstandard2.0 - MyApp.dll)
  2. The TIZEN APP project for Tizen OS   (tizen40 - MyApp.Tizen.dll)
  3. The REFERENCE LIBRARY with a reference API   (netstandard2.0 - Library.dll)
  4. The TIZEN LIBRARY for Tizen OS   (tizen40 - Library.dll)

The project references are set up as such:

  • The TIZEN APP references
    • The TIZEN LIBRARY
    • The CORE LOGIC references
      • The REFERENCE LIBRARY

As you can see, the Tizen app project wants the Tizen implementation library, but the core logic project wants the reference library. In other project types, the Tizen library has the same name as the reference library, but the Tizen library is preffered because the it was specifically referenced and the reference library is only added via transititive references.

I have created a sample that shows the error here: github.com/mattleibow/TizenBuildIssue

If you build this, this is the error message:

1>------ Build started: Project: TheClassLibrary, Configuration: Debug Any CPU ------
2>------ Build started: Project: TheClassLibrary.Tizen, Configuration: Debug Any CPU ------
2>TheClassLibrary.Tizen -> C:\Projects\Testing\CrossTemplate1\TheClassLibrary.Tizen\bin\Debug\tizen40\TheClassLibrary.dll
2>TizenTpkFiles :
1>TheClassLibrary -> C:\Projects\Testing\CrossTemplate1\TheClassLibrary\bin\Debug\netstandard2.0\TheClassLibrary.dll
3>------ Build started: Project: CrossTemplate1, Configuration: Debug Any CPU ------
3>CrossTemplate1 -> C:\Projects\Testing\CrossTemplate1\CrossTemplate1\bin\Debug\netstandard2.0\CrossTemplate1.dll
4>------ Build started: Project: CrossTemplate1.Tizen.Mobile, Configuration: Debug Any CPU ------
4>C:\Program Files\dotnet\sdk\2.1.200\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(114,5): error : Cannot find project info for 'C:\Projects\Testing\CrossTemplate1\TheClassLibrary\TheClassLibrary.csproj'. This can indicate a missing project reference.
4>Done building project "CrossTemplate1.Tizen.Mobile.csproj" -- FAILED.
========== Build: 3 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

A more complete log can be found here: gist.github.com/mattleibow/6a04819efbb9218a3d9a3fa86b2b55ed

 

sadly, links aren't allowed, so just copy-paste the bold urls - at least for me

Edited by: Matthew Leibowitz on 09 May, 2018

Responses

1 Replies
Armaan-Ul- Islam