Hen*_*enk 6 c# uwp uno-platform
重现:
下载https://github.com/nventive/Uno.QuickStart
添加名为TestMe的.NETStandard2_0项目.
在MyApp.Droid项目中引用TestMe.
构建MyApp.Droid会带来编译错误:
System.InvalidOperationException:项目TestMe未提供任何元数据引用.这可能是由于路径无效,例如在csproj中使用$(SolutionDir); 尝试使用相对路径.这也可能与缺少的默认配置指令有关.有关更多详细信息,请参阅Uno.SourceGenerator Readme.md文件.at Uno.SourceGeneration.Host.SourceGeneratorHost.d__4.MoveNext()in C:\ projects\uno-sourcegeneration\src\Uno.SourceGenerationHost.Shared\SourceGeneratorHost.cs:line 303 MyApp.Droid
我已经尝试将TestMe.csproj更改为
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
Run Code Online (Sandbox Code Playgroud)
要么
<TargetFrameworks>net47;netstandard2.0</TargetFrameworks>
Run Code Online (Sandbox Code Playgroud)
没有成功.
这个问题有解决方法吗?
不幸的是,这是一个已知的Roslyn问题:https://github.com/nventive/Uno.SourceGeneration/issues/2
要解决此问题,您必须在TargetFrameworks节点中包含您要支持的所有平台,在您的情况下是MonoAndroid80(或类似).