3
在.Net Core中,對資源生成的resx/designer.cs文件需要的API進行了一些更改。.Net Framework .resx可移植性至.Net Core
具體Type
不再直接擁有Assembly
屬性就可以了......核心得到這個通過Type.GetTypeInfo().Assembly
結果是designer.cs文件是框架之間的不兼容,所以多針對性的解決方案不能使用資源文件無需編譯失敗:
ConnectionDetails.Designer.cs(42,170): error CS1061: 'Type' does not contain a definition
for 'Assembly' and no extension method 'Assembly' accepting a first argument of type 'Type'
could be found (are you missing a using directive or an assembly reference?)
的Visual Studio知道如何根據項目/解決方案,這些類型生成正確的,但對於多針對性的解決方案,這是沒有太大的幫助。
我一直沒能找到一個適用於這兩個框架的解決方法,因爲designer.cs是自動生成的。
有沒有人想出解決方案呢?