简体   繁体   English

.net标准2.0部分类分组的方法

[英]How to .net standard 2.0 partial class grouping

I can not do partial class grouping for my problem in xamarin .net framework 2.0. 对于xamarin .net framework 2.0中的问题,我无法进行部分类分组。

enter image description here 在此处输入图片说明

<ItemGroup>
<EmbeddedResource Update="Pages\Checkout Pages\Resource1.resx">
  <Generator>ResXFileCodeGenerator</Generator>
  <DependentUpon>CartPage.cs</DependentUpon>
</EmbeddedResource>

I can set the Resx format file like this. 我可以这样设置Resx格式文件。 But I can not put the file named CartPage.Design.cs under CartPage.cs. 但是我不能将名为CartPage.Design.cs的文件放在CartPage.cs下。 How can I do it ? 我该怎么做 ?

This is generated in the .csproj file when Access Modifier is set to Public in the Resource1.resx view: 当在Resource1.resx视图中将Access Modifier设置为Public时,这将在.csproj文件中生成:

<ItemGroup>
  <Compile Update="Pages\CheckoutPages\Resource1.Designer.cs">
    <DesignTime>True</DesignTime>
    <AutoGen>True</AutoGen>
    <DependentUpon>Resource1.resx</DependentUpon>
  </Compile>
</ItemGroup>

<ItemGroup>
  <EmbeddedResource Update="Pages\CheckoutPages\Resource1.resx">
    <Generator>PublicResXFileCodeGenerator</Generator>
    <LastGenOutput>Resource1.Designer.cs</LastGenOutput>
  </EmbeddedResource>
</ItemGroup>

The .Designer.cs file is shown below the .resx file in the Solution Explorer. .Designer.cs文件显示在解决方案资源管理器中.resx文件下方。

The space characters in the folder name might be an issue. 文件夹名称中的空格字符可能是一个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Roslyn 编译 - 如何引用 .NET 标准 2.0 class 库 - Roslyn compilation - how to reference a .NET Standard 2.0 class library 如何从log4net为.NET Standard 2.0类库设置FileAppender记录器? - How do I setup a FileAppender logger from log4net for a .NET Standard 2.0 class library? 如何访问 .NET Standard 2.0 DLL 中的文件? - How to access a file in .NET Standard 2.0 DLL? 汇编版本不匹配? (.Net Core 2.0与.NET Standard 2类库) - Mismatch in assembly versioning? (.Net Core 2.0 with .NET Standard 2 class library) .NET Standard 2.0 Class 库能否依赖于 .NET Framework 4.7.2? - Can .NET Standard 2.0 Class Library depend on .NET Framework 4.7.2? 如何从 UWP 的 Net Standard 2.0 类库访问内容 - How to access content from a Net Standard 2.0 class libary from UWP .NET Standard 2.0中的WriteableBitmap - WriteableBitmap in .NET Standard 2.0 CA1062未在.Net Standard 2.0类库上进行评估 - CA1062 not evaluating on .Net Standard 2.0 class library 如何通过仅使用.NET Core SDK直接调用C#编译器来编译.NET Standard 2.0类库? - How can I compile a .NET Standard 2.0 class library by directly invoking the C# complier using only the .NET Core SDK? 如何创建针对.NET 2.0和.NET Standard的库? - How to create a library that targets both .NET 2.0 and .NET Standard?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM