使用新版本的.NET Core RC2,在使用新SDK 1.0.0-preview1-002702
编译项目时(从版本1.0.0-rc1-update1
迁移后),它为每个框架生成一个文件{{ 1}}包含属性dotnet-compile.assemblyinfo.cs
。例如:
System.Resources.NeutralResourcesLanguageAttribute
我的问题是,在编译新的.NET Standard框架之类的框架时,我现在必须向// <auto-generated> This file has been auto generated. </auto-generated>
[assembly:System.Reflection.AssemblyFileVersionAttribute("1.0.1.0")]
[assembly:System.Resources.NeutralResourcesLanguageAttribute("en-US")]
[assembly:System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v1.0")]
添加依赖项,否则它将无法编译。
有没有办法阻止这种情况?
这是我目前的project.json:
System.Resources.ResourceManager
答案 0 :(得分:2)
包含"language": "en-US"
属性,因为您要求将其包括在内,方法是在project.json中设置if(!canAccessLocation()){
requestLocationPermissions();
} else {
//start only if permission is granted
startActivity(new Intent(MyActivity.this, MyOtherActivity.class));
}
。
如果您不想依赖System.Resources.ResourceManager包,请从project.json中删除该行。