.Net Framework .resx portability to .Net Core -
in .net core there changes apis resource generated resx/designer.cs files need.
specifically type
no longer has assembly
property directly on it... core gets through type.gettypeinfo().assembly
the result designer.cs files incompatible between frameworks, multi-targeted solution cannot use resource files without compilation failing:
connectiondetails.designer.cs(42,170): error cs1061: 'type' not contain definition 'assembly' , no extension method 'assembly' accepting first argument of type 'type' found (are missing using directive or assembly reference?)
visual studio knows how generate these correctly depending on project/solution type, multi-targeted solutions isn't help.
i haven't been able find workaround works both frameworks, since designer.cs generated automatically.
has come solution this?
this a known bug, caused fact visual studio uses first item in targeted-frameworks list purpose of resx code generation. workaround move .net core or .net standard framework first position in targeted-framework list, i.e.
<propertygroup> <targetframeworks>netstandard1.0;netstandard1.3;net45</targetframeworks> </propertygroup>
Comments
Post a Comment