Open nickrandolph opened 6 years ago
@jeromelaban tagging you so that you know where to find the failing netstandard example
Right, so you are hitting this issue https://github.com/nventive/Uno.SourceGeneration/issues/2, which is caused by https://github.com/dotnet/roslyn/issues/23114.
The resolution for now is to add xamarinios10
and MonoAndroid80
(or similar) target frameworks to the cross targeted project TipCalc.Core
. This issue only affects projects present in the solution, not projects built outside (or Nuget packages for that matter).
Attempted to change TipCalc.Core to be just a regular netstandard library. TipCalc.Core compiles ok but TipCalc.UI fails to compile (see full error below).
Code is checked into branch https://github.com/nickrandolph/UnoSamples/tree/bugs/netstandardlibraryfail
NU1603: runtime.native.System.IO.Compression 4.3.0 depends on runtime.win10-arm64.runtime.native.System.IO.Compression (>= 4.3.0) but runtime.win10-arm64.runtime.native.System.IO.Compression 4.3.0 was not found. An approximate best match of runtime.win10-arm64.runtime.native.System.IO.Compression 4.3.1 was resolved. 1>------ Rebuild All started: Project: TipCalc.Core, Configuration: Debug Any CPU ------ 1>TipCalc.Core -> c:\XXXXX\UnoSamples\TipCalc\TipCalc.Core\bin\Debug\netstandard1.0\TipCalc.Core.dll 2>------ Rebuild All started: Project: TipCalc.UI, Configuration: Debug Any CPU ------ 2>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\iOS\Xamarin.Messaging.targets(41,3): warning VSX1000: No enough information has been provided to MSBuild in order to establish a connection to a Remote Server. The project 'TipCalc.UI' will continue building offline 2>Done building project "TipCalc.UI.csproj". 2>c:\XXXXX.nuget\packages\uno.sourcegenerationtasks\1.21.0\build\Xamarin.iOS10\Uno.SourceGenerationTasks.targets(94,3): error : System.InvalidOperationException: The project(s) TipCalc.Core did not provide any metadata reference. This may be due to an invalid path, such as $(SolutionDir) being used in the csproj; try using relative paths instead.This may also be related to a missing default configuration directive. Refer to the Uno.SourceGenerator Readme.md file for more details. 2>c:\XXXXX.nuget\packages\uno.sourcegenerationtasks\1.21.0\build\Xamarin.iOS10\Uno.SourceGenerationTasks.targets(94,3): error : at Uno.SourceGeneration.Host.SourceGeneratorHost.d4.MoveNext() in C:\projects\uno-sourcegeneration\src\Uno.SourceGenerationHost.Shared\SourceGeneratorHost.cs:line 303
2>Done building project "TipCalc.UI.csproj" -- FAILED.
2>C:\Program Files\dotnet\sdk\2.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error : Assets file 'c:\XXXXX\UnoSamples\TipCalc\TipCalc.Core\obj\project.assets.json' doesn't have a target for 'UAP,Version=v10.0'. Ensure that restore has run and that you have included 'uap10.0' in the TargetFrameworks for your project.
2>Done building project "TipCalc.Core.csproj" -- FAILED.
2>c:\XXXXX.nuget\packages\uno.sourcegenerationtasks\1.21.0\build\MonoAndroid\Uno.SourceGenerationTasks.targets(94,3): error : System.InvalidOperationException: The project(s) TipCalc.Core did not provide any metadata reference. This may be due to an invalid path, such as $(SolutionDir) being used in the csproj; try using relative paths instead.This may also be related to a missing default configuration directive. Refer to the Uno.SourceGenerator Readme.md file for more details.
2>c:\XXXXX.nuget\packages\uno.sourcegenerationtasks\1.21.0\build\MonoAndroid\Uno.SourceGenerationTasks.targets(94,3): error : at Uno.SourceGeneration.Host.SourceGeneratorHost.d 4.MoveNext() in C:\projects\uno-sourcegeneration\src\Uno.SourceGenerationHost.Shared\SourceGeneratorHost.cs:line 303
2>Done building project "TipCalc.UI.csproj" -- FAILED.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========